ISISController
Class SetCurrentGrating

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

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

This class implements a software controller level sequence subaction which will result in the name of the current grating for the specified arm being updated in the system. It will result in the name of the current grating and the details associated with the grating being updated in the database and also in the parameter noticeboard. The details of the gratings are used in the calculation of the Central Wavelength.

The subaction will take two arguments, the name of the arm and the name of the grating. the action will then verify the existence of the grating in the ICS database and then update the database and the parameter noticeboard accordingly.

After the grating has been updated it will be necessary to a execute GRR200/GRB200 in order to ensure that the central wavelength is recalculated based upon the the new grating information.

The object is a persistent CORBA object which will be registered with the name service and can then subsequently be used by CORBA clients. It implements the standard Subaction IDL interface.

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

Version:
$Id: SetCurrentGrating.java,v 1.3 2005/05/19 14:18:37 cb Exp $
Author:
Craige Bevil


Field Summary
private  SubAction BlueGratingISTATAction
          This is the ISTAT CORBA subaction for the blue grating
private  java.sql.Connection DBConnection
          A live database connection to the ICS database which will be used to update the details of the current filter which is located in the respective arm.
private  iParameterNoticeBoard.ParameterNoticeBoardSupplier ParameterNoticeBoard
          This is reference to the remote proxy CORBA object which will be used to access the parameter name service so that we may access status information relating to the ISIS system.
private  SubAction RedGratingISTATAction
          This is the ISTAT CORBA subaction for the red grating
 
Fields inherited from class FourMS.SequenceSubaction
ActionCompletionListener, ActionCompletionListenerImpl, ActionState, ExpectedNoOfArgs, InstrumentName, NumberOfSubactionsInSequenceOutstanding, Orb, Poa, RootNamingServiceContext, SecondsBeforeTimeout, SequenceSubActionInitiatorCB, SequenceSubactionName, SubactionArgumentList, SubactionThread, SyslogMessageHandler, TimeOut
 
Constructor Summary
SetCurrentGrating(java.lang.String SequenceSubactionName, java.sql.Connection DBConnection, 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 which represents the thread within which the action will run.
 
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

ParameterNoticeBoard

private iParameterNoticeBoard.ParameterNoticeBoardSupplier ParameterNoticeBoard
This is reference to the remote proxy CORBA object which will be used to access the parameter name service so that we may access status information relating to the ISIS system.


BlueGratingISTATAction

private SubAction BlueGratingISTATAction
This is the ISTAT CORBA subaction for the blue grating


RedGratingISTATAction

private SubAction RedGratingISTATAction
This is the ISTAT CORBA subaction for the red grating


DBConnection

private java.sql.Connection DBConnection
A live database connection to the ICS database which will be used to update the details of the current filter which is located in the respective arm.

Constructor Detail

SetCurrentGrating

public SetCurrentGrating(java.lang.String SequenceSubactionName,
                         java.sql.Connection DBConnection,
                         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 which represents the thread within which the action will run. When the subaction is intiated, a thread is started and this is the method which is called and when the thread is started.

The purpose of the method is to calculate the central wavelength for the specified grating and subsequently set the grating to that position.

Specified by:
run in interface java.lang.Runnable