|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectFourMS.FourMSController
public abstract class FourMSController
This class describes the main 4MS class which will be used to control a 4MS microprocessor. This is the boundary class for the package through which all control of the 4MS will be affected. It allows subactions to be started on the mechanism and then subsequently cancelled if necessary. Controlling objects will be informed of the progress of the actions upon the 4MS via the implemenation of interfaces provided by the package.
This class provides a base set of functionality for the control of 4MS based instruments. This class should be extended by classes more specific to the instrument to be controlled in order to fine tune control.
This class creates the software representations of the mechanisms
and the actions which can be performed on them mechanisms. Each
action is a CORBA operation which can be invoked from external
clients (or internal ones also). Irrespective of the function of
the action, it posseses the same interface and behaviour to an
external client. See SubAction
for the
details of this interface.
This class implements the CORBA interface InstrumentControllerOperations which allows third party applications to shut down the instrument controller, change it's trace level, enable and disable debug and also handshake with the application.
Field Summary | |
---|---|
protected FourMSCommsMonitor |
CommunicationsMonitor
A communications monitor on the 4MS which will report if the communications timeout |
private org.omg.CosNaming.NamingContextExt |
ControllerNameServiceContext
This is the context in the COS naming service into which we should store the details of mechanisms and the subactions which are associated with them |
protected java.sql.Connection |
DBConnection
This is used to hold a database connection to the WHT OCS postgres database where the configuration data for the mechanisms which are to be simulated is held |
protected FourMSParameterConverter |
ER412FourMSParameterConverter
This will be used to convert parameters backwards and forewards from engineering units and back again |
protected FourMSMessageHandler |
ER412MessageHandler
This is the message handler which will be responisble for sending the messages out to the 4MS and receiving incoming messages coming back from the 4MS |
protected MessageListener |
ER412MessageListener
This will be used for listening to messages coming in from the 4MS microprocessor and then handing them over to the ER412 message handler for processing. |
protected java.lang.String |
InstrumentName
This is the name of the instrument associated with the 4MS. |
protected java.util.Hashtable<java.lang.String,Mechanism> |
Mechanisms
Holds the details of all of the mechanisms which are to be found on this 4MS microprocessor. |
private boolean |
MechanismsCreated
Flag which indicates if the mechanisms have already been created |
protected FourMSControllerMessageDispatcher |
MessageDispatcher
This will be used to dispatch messages to the appropriate object in order to be processed |
protected org.omg.CORBA.ORB |
Orb
The CORBA request broker or ORB which will be used for handling CORBA requests |
protected iParameterNoticeBoard.ParameterNoticeBoardSupplier |
ParameterNoticeBoard
This is reference to the remote proxy CORBA object which will be used to access the parameter noticeboard |
protected org.omg.PortableServer.POA |
Poa
The portable object adapter which will be used by this class |
private java.lang.String |
PortServerDevice
This is the name of device which we need to open in order to communicate with the port server and ultimately the 4MS. |
protected org.omg.CosNaming.NamingContextExt |
RootNamingServiceContext
This is a reference to the COS naming service |
private int |
SimulationPort
This is the simulation port number which is used for communicating with the simulator if we are starting in simulation mode |
MessageHandler |
SyslogMessageHandler
This is a syslog object which will be used to report errors etc |
Constructor Summary | |
---|---|
FourMSController(java.lang.String[] args,
java.lang.String ER412SourceName,
java.lang.String ER412DestinationName,
MessageHandler SyslogMessageHandler,
FourMSParameterConverter ER412FourMSParameterConverter,
java.lang.String ORBPersistentPort,
java.lang.String ORBServerID,
java.lang.String InstrumentName,
java.lang.String dbHost)
This is the constructor for this class |
Method Summary | |
---|---|
void |
closeDown(java.lang.String CloseDownMessage)
This is an obligation to the CORBA instrument controller interface which permits the application to be closed down in a controlled manner. |
protected boolean |
createMechanisms()
This method will be called to create the mechanisms objects which are associated with the 4MS module. |
boolean |
handshake()
This is an obligation to the CORBA instrument controller interface which permits a third party to ascertain if the instrument controller is responding. |
boolean |
listenForFourMSController(boolean SimulationMode)
This method will be called and will result in the application starting up a listening thread which will be responsible for listening for input coming back from the 4MS which is attached to this controller. |
void |
setDebugState(boolean DebugState)
This is an obligation to the CORBA instrument controller interface which permits the debug of the application to be enabled or disabled. |
void |
setTraceLevel(double TraceLevel)
This is an obligation to the CORBA instrument controller interface which permits the trace level of the application to be set, in this application there is no different trace levels enabled. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected FourMSCommsMonitor CommunicationsMonitor
protected iParameterNoticeBoard.ParameterNoticeBoardSupplier ParameterNoticeBoard
protected java.lang.String InstrumentName
private int SimulationPort
private java.lang.String PortServerDevice
private boolean MechanismsCreated
protected java.util.Hashtable<java.lang.String,Mechanism> Mechanisms
protected FourMSMessageHandler ER412MessageHandler
protected MessageListener ER412MessageListener
public MessageHandler SyslogMessageHandler
protected FourMSControllerMessageDispatcher MessageDispatcher
protected FourMSParameterConverter ER412FourMSParameterConverter
protected java.sql.Connection DBConnection
protected org.omg.CORBA.ORB Orb
protected org.omg.PortableServer.POA Poa
private org.omg.CosNaming.NamingContextExt ControllerNameServiceContext
protected org.omg.CosNaming.NamingContextExt RootNamingServiceContext
Constructor Detail |
---|
public FourMSController(java.lang.String[] args, java.lang.String ER412SourceName, java.lang.String ER412DestinationName, MessageHandler SyslogMessageHandler, FourMSParameterConverter ER412FourMSParameterConverter, java.lang.String ORBPersistentPort, java.lang.String ORBServerID, java.lang.String InstrumentName, java.lang.String dbHost)
ER412FourMSParameterConverter
- - When this object is created it
should be provided with a 4MS parameter convertor. This will
subsequently used to convert micro units to logical units and
vice versa.
Note that the object is not typed and that the creator should
ensure that the for the given instrument that is to be
controlled by the 4MS controller class, the object that is
provided here has ALL of the conversion operations required by
the 4MS instrument controller.args
- These are the command line arguments which were passed into the application on startup.SyslogMessageHandler
- This will be used for syslog error handlingER412SourceName
- - This is the value which is expected to
be expressed in the source name of messages coming into the simulator.ER412DestinationName
- - This is the expected value of the
destination field in the messages that are sent to this process
from a 4MS transmitter.ORBPersistentPort
- This is the number of a port which will be used to access persistent objectsORBServerID
- This is an integer string which indicates the ID associated with the ORB server and will be used for persistenceInstrumentName
- This is the name of the instrument which is being controlled.dbHost
- This is the name of the machine which is hosting the database.Method Detail |
---|
public boolean listenForFourMSController(boolean SimulationMode)
SimulationMode
- Set to true if we are to be running in simulation mode
protected boolean createMechanisms()
public void setDebugState(boolean DebugState)
setDebugState
in interface iInstrumentController.InstrumentControllerOperations
DebugState
- Whether or not debug should be enabled or disabled.public void setTraceLevel(double TraceLevel)
setTraceLevel
in interface iInstrumentController.InstrumentControllerOperations
TraceLevel
- The expected trace level of the application when debug is enabled.public void closeDown(java.lang.String CloseDownMessage)
closeDown
in interface iInstrumentController.InstrumentControllerOperations
CloseDownMessage
- The text of a message which is to be put
into the syslog when the application closes downpublic boolean handshake()
handshake
in interface iInstrumentController.InstrumentControllerOperations
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |