|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectFourMS.FourMSConversions
public class FourMSConversions
This class will be used to hold the standard conversion methods which will be used to convert parameters coming to and from the 4MS microprocessor. This class may be subclassed by instrument specific conversion classes to give a full complement of conversion routines specific to a given instrument. This class provides the base conversions for all 4MS systems.
Probably one of the more prominent conversion routines contained within is a method which can convert filter names for a given mechanism to and from engineering units when provided with the logical name of the filter. In order to do this, it interacts with the filter management database which is hosted upon the whtics computer. See http://whtics.roque.ing.iac.es for more information on the filter database.
Field Summary | |
---|---|
protected java.sql.Connection |
DBConnection
This is the connection to the database which will be used for reading back filter data. |
int |
DemandFilterPositionToActualPositionOffset
This is the offset to be applied to filter positions as the come to and from the micro. |
int |
DemandSelectablePositionToActualPositionOffset
This is the offset to be applied to selectable mechanism positions as the come to and from the micro. |
java.util.Hashtable<java.lang.String,java.lang.Integer> |
EngineeringToFilterNominalPositionOffsets
This is a hash table which contains the offsets engineering values for filter positions to the nominal starting position of 1 in the filter management system. |
protected java.lang.String |
InstrumentName
This is the name of the instrument which the conversions are associated with |
protected org.omg.CORBA.ORB |
Orb
This is a reference to the CORBA ORB which we we will use |
protected iParameterNoticeBoard.ParameterNoticeBoardSupplier |
ParameterNoticeBoard
This is reference to the remote proxy CORBA object which will be used to access the parameter noticeboard. |
protected MessageHandler |
SyslogMessageHandler
This is a syslog object which will be used to report errors etc |
Constructor Summary | |
---|---|
FourMSConversions()
This is the constructor for this class |
Method Summary | |
---|---|
java.lang.String |
convertBeamPosition(java.lang.Integer ConversionType,
java.lang.String MechanismName,
java.lang.Integer MessageCode,
java.lang.String InputParameter)
This will convert a binary value which indicates that something is either in the beam or out of the beam. |
java.lang.String |
convertDoorPosition(java.lang.Integer ConversionType,
java.lang.String MechanismName,
java.lang.Integer MessageCode,
java.lang.String InputParameter)
This will convert a binary value which indicates that a mechanism is either open or closed according to the logic in the following table. |
java.lang.String |
doubleConversion(java.lang.Integer ConversionType,
java.lang.String MechanismName,
java.lang.Integer MessageCode,
java.lang.String InputParameter)
This method converts between string and double format. |
java.lang.String |
filterConversion(java.lang.Integer ConversionType,
java.lang.String MechanismName,
java.lang.Integer MessageCode,
java.lang.String InputParameter)
This operation can be used to convert a filter position to an actual filter name It is intended that this operation will only be called from a class which is subclassing it as it needs additional information in order to perform the conversion such as the filter name, mechanism and instrument. |
java.lang.String |
hexConversion(java.lang.Integer ConversionType,
java.lang.String MechanismName,
java.lang.Integer MessageCode,
java.lang.String InputParameter)
This conversion method is expected to convert an integer to a hex number to send out to the 4MS and vice-versa depending on the direction of the conversion to be applied. |
java.lang.String |
integerConversion(java.lang.Integer ConversionType,
java.lang.String MechanismName,
java.lang.Integer MessageCode,
java.lang.String InputParameter)
The purpose of this method is to convert a string type into an integer |
java.lang.String |
nullConversion(java.lang.Integer ConversionType,
java.lang.String MechanismName,
java.lang.Integer MessageCode,
java.lang.String InputParameter)
This conversion method is null conversion, the input is passed as the output. |
java.lang.String |
selectableMechanismConversion(java.lang.Integer ConversionType,
java.lang.String MechanismName,
java.lang.Integer MessageCode,
java.lang.String InputParameter)
This operation can be used to convert a position in a selectable mechanism such as a dekker tray for example to and from it's engineering value to it's logical value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.util.Hashtable<java.lang.String,java.lang.Integer> EngineeringToFilterNominalPositionOffsets
public int DemandFilterPositionToActualPositionOffset
This value will be overrode if the EngineeringToFilterNominalPositionOffsets hash is specified.
public int DemandSelectablePositionToActualPositionOffset
protected org.omg.CORBA.ORB Orb
protected iParameterNoticeBoard.ParameterNoticeBoardSupplier ParameterNoticeBoard
protected java.lang.String InstrumentName
protected MessageHandler SyslogMessageHandler
protected java.sql.Connection DBConnection
Constructor Detail |
---|
public FourMSConversions()
Method Detail |
---|
public java.lang.String doubleConversion(java.lang.Integer ConversionType, java.lang.String MechanismName, java.lang.Integer MessageCode, java.lang.String InputParameter) throws ConversionFailedException
ConversionType
- - This is the direction of the conversion
to be performed, this should be either
FourMSConstants.LOGICALTOENGINEERING or
FourMSConstants.ENGINEERINGTOLOGICALMechanismName
- This is the name of the mechanism which the conversion is associated withMessageCode
- This is the message type of the message e.g. 800InputParameter
- This is the parameter to be converted
ConversionFailedException
public java.lang.String nullConversion(java.lang.Integer ConversionType, java.lang.String MechanismName, java.lang.Integer MessageCode, java.lang.String InputParameter) throws ConversionFailedException
ConversionType
- - This is the direction of the conversion
to be performed, this should be either
FourMSConstants.LOGICALTOENGINEERING or
FourMSConstants.ENGINEERINGTOLOGICALInputParameter
-
ConversionFailedException
public java.lang.String hexConversion(java.lang.Integer ConversionType, java.lang.String MechanismName, java.lang.Integer MessageCode, java.lang.String InputParameter) throws ConversionFailedException
ConversionType
- - This is the direction of the conversion
to be performed, this should be either
FourMSConstants.LOGICALTOENGINEERING or
FourMSConstants.ENGINEERINGTOLOGICALInputParameter
-
ConversionFailedException
public java.lang.String integerConversion(java.lang.Integer ConversionType, java.lang.String MechanismName, java.lang.Integer MessageCode, java.lang.String InputParameter) throws ConversionFailedException
ConversionType
- - This is the direction of the conversion
to be performed, this should be either
FourMSConstants.LOGICALTOENGINEERING or
FourMSConstants.ENGINEERINGTOLOGICALMechanismName
- This is the name of the mechanism which the conversion is associated withMessageCode
- This is the message type of the message e.g. 800InputParameter
- - This is the parameter to be converted
from a string to an integer. This could be the position number
in the filter ring or the name of a filter for which we have to
establish the filter number.
ConversionFailedException
public java.lang.String convertBeamPosition(java.lang.Integer ConversionType, java.lang.String MechanismName, java.lang.Integer MessageCode, java.lang.String InputParameter) throws ConversionFailedException
Engineering Value | Logical Value | Semantics |
---|---|---|
0 | OUT | Out of the light beam |
1 | IN | In the light beam |
ConversionType
- - This is the direction of the conversion
to be performed, this should be either
FourMSConstants.LOGICALTOENGINEERING or
FourMSConstants.ENGINEERINGTOLOGICALMechanismName
- This is the name of the mechanism which
the conversion is associated with. This might be for instance
MFWMessageCode
- This is the message type of the message
e.g. 800InputParameter
- This is the value which is to be converted.
ConversionFailedException
public java.lang.String convertDoorPosition(java.lang.Integer ConversionType, java.lang.String MechanismName, java.lang.Integer MessageCode, java.lang.String InputParameter) throws ConversionFailedException
Engineering Value | Logical Value | Semantics |
---|---|---|
0 | OPEN | The mechanism is open |
1 | CLOSE | The mechanism is closed |
ConversionType
- - This is the direction of the conversion
to be performed, this should be either
FourMSConstants.LOGICALTOENGINEERING or
FourMSConstants.ENGINEERINGTOLOGICALMechanismName
- This is the name of the mechanism which
the conversion is associated with. This might be for instance
MFWMessageCode
- This is the message type of the message
e.g. 800InputParameter
- This is the value which is to be converted.
ConversionFailedException
public java.lang.String filterConversion(java.lang.Integer ConversionType, java.lang.String MechanismName, java.lang.Integer MessageCode, java.lang.String InputParameter) throws ConversionFailedException
ConversionType
- - This is the direction of the conversion
to be performed, this should be either
FourMSConstants.LOGICALTOENGINEERING or
FourMSConstants.ENGINEERINGTOLOGICALMechanismName
- This is the name of the mechanism which
the conversion is associated with. This might be for instance
MFWMessageCode
- This is the message type of the message
e.g. 800InputParameter
- This is either the filter position or the
filter name to be converted
ConversionFailedException
ConversionFailedException
public java.lang.String selectableMechanismConversion(java.lang.Integer ConversionType, java.lang.String MechanismName, java.lang.Integer MessageCode, java.lang.String InputParameter) throws ConversionFailedException
In order for the method to work, it is reliant on the selectablemechanism table in the ICS database in order to establish both the engineering and the logical values. This table is indexed using the MechanismName in order to establish names and the positions of all of the selectable options associated with that mechanism name.
ConversionType
- - This is the direction of the conversion
to be performed, this should be either
FourMSConstants.LOGICALTOENGINEERING or
FourMSConstants.ENGINEERINGTOLOGICALMechanismName
- This is the name of the mechanism which
the conversion is associated with. This might be for instance
MFWMessageCode
- This is the message type of the message
e.g. 800InputParameter
- This is either the filter position or the
filter name to be converted
ConversionFailedException
ConversionFailedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |