PFIPController
Class MoveADCElements

java.lang.Object
  extended by FourMS.SequenceSubaction
      extended by PFIPController.MoveADCElements
All Implemented Interfaces:
SubActionCompletionListenerOperations, SubActionOperations, java.lang.Runnable

public class MoveADCElements
extends SequenceSubaction
implements java.lang.Runnable, SubActionOperations

This class implements a software controller level sequence subaction which will result in the two elements (ADI and ADO) of the ADC being set to the demanded value which is a value in degrees between 0 and 90. Note that we set the outer element is to theta * -1 of the value that we set the inner element of the ADC. The object is a persistent CORBA object which will be registered with the name service and can then subsequently be used by CORBA client. It implements the standard SubAction IDL interface and it itself is a CORBA object which is registered with the Name service and subsequently can be invoked by remote CORBA clients.

The subaction will be registered in the name service as PFIPController/SequenceSubaction/MoveADCElements should it need to be accessed and used by a CORBA client

Author:
Craige Bevil

Field Summary
(package private)  SubAction ADIPrimitiveSubaction
          This is a reference to the subaction which can be used to move the ADO which is the inner element of the ADC.
(package private)  SubAction ADOPrimitiveSubaction
          This is a reference to the subaction which can be used to move the ADO which is the inner element of the ADC.
 
Fields inherited from class FourMS.SequenceSubaction
ActionCompletionListener, ActionCompletionListenerImpl, ActionState, ExpectedNoOfArgs, InstrumentName, NumberOfSubactionsInSequenceOutstanding, Orb, ParameterNoticeBoard, Poa, RootNamingServiceContext, SecondsBeforeTimeout, SequenceSubActionInitiatorCB, SequenceSubactionName, SubactionArgumentList, SubactionThread, SyslogMessageHandler, TimeOut
 
Constructor Summary
MoveADCElements(java.lang.String SequenceSubactionName, java.lang.String InstrumentName, org.omg.PortableServer.POA Poa, org.omg.CORBA.ORB Orb, MessageHandler SyslogMessageHandler, org.omg.CosNaming.NamingContextExt RootNamingServiceContext)
          The constructor
 
Method Summary
 void run()
          This is the run method.
 
Methods inherited from class FourMS.SequenceSubaction
cancelAction, informSubactionInitiator, informSubactionInitiator, registerSubactionInNameService, returnResult, startAction, subActionEnded, waitForActionToComplete
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface FourMSControllerInterfaces.SubActionOperations
cancelAction, startAction
 

Field Detail

ADOPrimitiveSubaction

SubAction ADOPrimitiveSubaction
This is a reference to the subaction which can be used to move the ADO which is the inner element of the ADC.


ADIPrimitiveSubaction

SubAction ADIPrimitiveSubaction
This is a reference to the subaction which can be used to move the ADO which is the inner element of the ADC.

Constructor Detail

MoveADCElements

public MoveADCElements(java.lang.String SequenceSubactionName,
                       java.lang.String InstrumentName,
                       org.omg.PortableServer.POA Poa,
                       org.omg.CORBA.ORB Orb,
                       MessageHandler SyslogMessageHandler,
                       org.omg.CosNaming.NamingContextExt RootNamingServiceContext)
The constructor

Parameters:
SequenceSubactionName - This is the name of the subaction sequence for reporting purposes, this should correspond to the name that is given to the object in the name service
InstrumentName - This is the name of the instrument to which this subaction is associated
Poa - This is a reference to the POA to be used by this object
Orb - This is a reference to the ORB
SyslogMessageHandler - A syslog message handler which will be used for error reporting
RootNamingServiceContext - This is a reference to the root context of the naming service so that we can
Method Detail

run

public void run()
This is the run method. When the subaction is intiated, a thread is started and this is the method which is called and when the thread is started.

The move of the ADO is a compound action which results in the two mechanisms of the ADC being moved in tandem. These are the inner element (ADI) and the outer element (ADO). The inner is set to theta (expressed in degrees) and the outer element is sent to theta * -1

Specified by:
run in interface java.lang.Runnable