PFIPController
Class ModifyADCUpdateStatusSubaction

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

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

The purpose of this class is to provide an instrument level subaction which can be used to enable or disable the updating of the ADC as it tracks the zenith angle of the telescope. 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/ModifyADCUpdateStatus. The subaction takes a single argument to it's inherited startAction method which should be set to either enable or disable depending on whether or not the caller wants to enable or disable the updating of the ADC.

Author:
Craige Bevil

Field Summary
private  ADCTCSTrack ADCTracker
          This is a reference to a ADC tracker class which we will control, this subaction basically allows the updating of the ADC position based on the TCS sky PA position to be controlled.
 
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
ModifyADCUpdateStatusSubaction(java.lang.String SequenceSubactionName, java.lang.String InstrumentName, ADCTCSTrack ADCTracker, org.omg.PortableServer.POA Poa, org.omg.CORBA.ORB Orb, MessageHandler SyslogMessageHandler, org.omg.CosNaming.NamingContextExt RootNamingServiceContext)
          The constructor
 
Method Summary
 boolean cancelAction()
          This is part of the interface to the SubActions operations which we are bound to implement, it results in the subaction being cancelled but in effect does nothing as this action is completed immediately as it only interacts with the software controller and not the 4MS itself
 void run()
          This is the run method, we must implement this method as the subclass is extends the TimerTask class.
 boolean startAction(java.lang.String[] subactionArgs, SubActionCompletionListener subActionInitiator)
          This method starts the subaction, it expects a single argument which is whether or not the ADC update should be enabled or disabled.
 
Methods inherited from class FourMS.SequenceSubaction
informSubactionInitiator, informSubactionInitiator, registerSubactionInNameService, returnResult, subActionEnded, waitForActionToComplete
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ADCTracker

private ADCTCSTrack ADCTracker
This is a reference to a ADC tracker class which we will control, this subaction basically allows the updating of the ADC position based on the TCS sky PA position to be controlled.

Constructor Detail

ModifyADCUpdateStatusSubaction

public ModifyADCUpdateStatusSubaction(java.lang.String SequenceSubactionName,
                                      java.lang.String InstrumentName,
                                      ADCTCSTrack ADCTracker,
                                      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
ADCTracker - This is a ADC tracker class which is to be controlled by the subaction.
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

startAction

public boolean startAction(java.lang.String[] subactionArgs,
                           SubActionCompletionListener subActionInitiator)
                    throws SubActionInProgressException,
                           UnableToStartSubactionException
This method starts the subaction, it expects a single argument which is whether or not the ADC update should be enabled or disabled. This should be specified as the first argument in the subactionArgs array.

Specified by:
startAction in interface SubActionOperations
Overrides:
startAction in class SequenceSubaction
Parameters:
subactionArgs - - This is a list of the arguments which pertain to this subaction
subActionInitiator - - This is a reference to the object that has started the subaction and must implement the iActionFinishedInterface. The subaction will rely on this interface in order to inform the initiator that the subaction has terminated.
Returns:
boolean
Throws:
SubActionInProgressException - Thrown if the subaction is already in progress when the caller attempts to initiate the action.
UnableToStartSubactionException - Thrown when there is a problem initiating the subaction

cancelAction

public boolean cancelAction()
                     throws SubActionNotInProgressException
This is part of the interface to the SubActions operations which we are bound to implement, it results in the subaction being cancelled but in effect does nothing as this action is completed immediately as it only interacts with the software controller and not the 4MS itself

Specified by:
cancelAction in interface SubActionOperations
Overrides:
cancelAction in class SequenceSubaction
Returns:
boolean
Throws:
SubActionNotInProgressException

run

public void run()
This is the run method, we must implement this method as the subclass is extends the TimerTask class. It is a null method in the case of this subaction.

Specified by:
run in interface java.lang.Runnable