European
Southern
Observatory

ESO — Reaching New Heights in Astronomy

Countries taking part in the ESO

VLT Software Documentation

prsSEQ_STD_COMMANDS Class Reference

See man page prsSEQ_STD_COMMANDS(4)
More...

#include <prsSEQ_STD_COMMANDS.h>

List of all members.

Public Member Functions

 prsSEQ_STD_COMMANDS (const dbSYMADDRESS dbPoint)
virtual evhCB_COMPL_STAT StateCB (msgMESSAGE &msg, void *udata)
virtual evhCB_COMPL_STAT StatusCB (msgMESSAGE &msg, void *udata)
virtual evhCB_COMPL_STAT StandByCB (msgMESSAGE &msg, void *udata)
virtual evhCB_COMPL_STAT OffCB (msgMESSAGE &msg, void *udata)
virtual evhCB_COMPL_STAT SelfTestCB (msgMESSAGE &msg, void *udata)
virtual evhCB_COMPL_STAT TestCB (msgMESSAGE &msg, void *udata)
virtual evhCB_COMPL_STAT SimulatCB (msgMESSAGE &msg, void *udata)
virtual evhCB_COMPL_STAT StopSimCB (msgMESSAGE &msg, void *udata)
virtual evhCB_COMPL_STAT VerboseCB (msgMESSAGE &msg, void *udata)
vltINT32 GlobalState ()
const char * GlobalStateName ()
vltINT32 GlobalSubState ()
const char * GlobalSubStateName ()

Protected Member Functions

virtual evhCB_COMPL_STAT MirrorToAction (msgMESSAGE &msg, void *udata)

Private Attributes

dbSYMADDRESS dbBasePoint

Detailed Description

See man page prsSEQ_STD_COMMANDS(4)
Manpage of prsSEQ_STD_COMMANDS

prsSEQ_STD_COMMANDS

Section: Devices and Network Interfaces (4)
Updated: 2012-04-23 10:10
Index Return to man pages list
 

NAME

prsSEQ_STD_COMMANDS - Handles standard commands in the prsSeqncr

 

SYNOPSIS


#include "prsSEQ_STD_COMMANDS.h"

class prsSEQ_STD_COMMANDS : public prsSTD_COMMANDS
{
  public:
    prsSEQ_STD_COMMANDS(const dbSYMADDRESS  dbPoint);

    virtual evhCB_COMPL_STAT  StateCB(msgMESSAGE &msg, void *udata);
    virtual evhCB_COMPL_STAT  StatusCB(msgMESSAGE &msg, void *udata);
    virtual evhCB_COMPL_STAT  StandByCB(msgMESSAGE &msg, void *udata);
    virtual evhCB_COMPL_STAT  OnlineCB(msgMESSAGE &msg, void *udata);
    virtual evhCB_COMPL_STAT  OffCB(msgMESSAGE &msg, void *udata);
    virtual evhCB_COMPL_STAT  SelfTestCB(msgMESSAGE &msg, void *udata);
    virtual evhCB_COMPL_STAT  TestCB(msgMESSAGE &msg, void *udata);
    virtual evhCB_COMPL_STAT  SimulatCB(msgMESSAGE &msg, void *udata);
    virtual evhCB_COMPL_STAT  StopSimCB(msgMESSAGE &msg, void *udata);
    virtual evhCB_COMPL_STAT  VerboseCB(msgMESSAGE &msg, void *udata);

    vltINT32          GlobalState();
    const char*       GlobalStateName();
    vltINT32          GlobalSubState();
    const char*       GlobalSubStateName();

  protected:
    virtual evhCB_COMPL_STAT  MirrorToAction(msgMESSAGE &msg, void *udata);

  private:
    const dbSYMADDRESS  dbBasePoint;
};

 

PARENT CLASS


prsSTD_COMMANDS

 

DESCRIPTION


This class overload the default behaviour for some standard commands
implemented by the base class prsSTD_COMMANDS, in order to meet
the specific requirements of the prsSeqncr process
This class assumes that its own database image point has a parent
point and this contains a "state" and a "substate" attribute, that are
used as global state and substate for the whole module.

 

PUBLIC METHODS


prsSEQ_STD_COMMANDS(const dbSYMADDRESS  dbPoint);
  Initialize the name state table using prsStateNameMap and
  load the symbolic address of its parent point, where is assumes are
  the "state" and "substate" attributes.

evhCB_COMPL_STAT  StateCB(msgMESSAGE &msg, void *udata);
evhCB_COMPL_STAT  StatusCB(msgMESSAGE &msg, void *udata);
  These two callbacks are used for the STATE and STATUS commands.
  They read the value of the "state" and "substate" attributes in the
  paren database point and format the reply to be sent

evhCB_COMPL_STAT  StandByCB(msgMESSAGE &msg, void *udata);
evhCB_COMPL_STAT  OnlineCB(msgMESSAGE &msg, void *udata);
evhCB_COMPL_STAT  OffCB(msgMESSAGE &msg, void *udata);
  In this simple first implementation the commands just set the local
  state of prsControl to the requeste value.
  This forces the global state (that is calculated with a calculation
  engine formula, to change state as well.
  It would be better to add also some checks to verify if it is possible
  to switch to the new state, if this requires aborting a PRESET on course
  and so on (may be also to coordinate wqith prsAction).

evhCB_COMPL_STAT  SelfTestCB(msgMESSAGE &msg, void *udata);
evhCB_COMPL_STAT  TestCB(msgMESSAGE &msg, void *udata);
  In this simple implementation the commands just send an OK message
  to the originator, like in the base class.
  They have been overloaded here just to make easier to implement later
  a real behaviour, performing really some test.

evhCB_COMPL_STAT  SimulatCB(msgMESSAGE &msg, void *udata);
evhCB_COMPL_STAT  StopSimCB(msgMESSAGE &msg, void *udata);
evhCB_COMPL_STAT  VerboseCB(msgMESSAGE &msg, void *udata);
  This commands work locally as the base class, setting the database
  corresponding variable to the requested value, by they also mirror
  the command to the prsAction task

vltINT32          GlobalState();
const char*       GlobalStateName();
vltINT32          GlobalSubState();
const char*       GlobalSubStateName();
  These method return the index value or the string corresponding to the
  global state and substate of the module.
  They read these value from the attributes that must be in the
  parent point

 

PROTECTED METHODS


evhCB_COMPL_STAT  MirrorToAction(msgMESSAGE &msg, void *udata);
  This methods receive a message structure and use it to mirror a
  command also to praActions.
  No wait is done to receive replies of any kind from praAction

 

PRIVATE DATA MEMBERS


const dbSYMADDRESS  dbBasePoint;
  Symbolic address of the database parent point, that is assumed to
  contain module's global state and substate.
  It is set in the constructor.

 

ON LINE DATABASE


The class shares with prsSEQ_MAIN_TASK an instance of the prsCONTROL class.
From this class it uses the attributes inherited from the base class
evhSTD_COMMANDS and the actionStdDbCmd attribute, that must contain
the process name for the prsAction task, to whome it must send mirrored
commands.

  CLASS evhSTD_COMMANDS prsCONTROL
 

BEGIN //


      ATTRIBUTE BYTES64 readySetup   "prsReadySetup.targ"
      ATTRIBUTE BYTES64 defaultSetup "prsDefaultSetup.targ"
      ATTRIBUTE BYTES64 currentSetup "prsCurrentSetup.targ"

      ATTRIBUTE BYTES64 setupDic     "ESO-VLT-DIC.TCS"
      ATTRIBUTE BYTES64 setupAlias   "prs.alias"

      ATTRIBUTE INT32           readyTimeout 0
      ATTRIBUTE INT32           stopTimeout  0

      ATTRIBUTE evhDB_COMMAND  presetDbCmd
 

BEGIN //


            ATTRIBUTE BYTES32   destination  "prsAction"
 

END //


      ATTRIBUTE evhDB_COMMAND  stopDbCmd
 

BEGIN //


            ATTRIBUTE BYTES32   destination  "prsAction"
 

END //


      ATTRIBUTE evhDB_COMMAND  actionStdDbCmd
 

BEGIN //


            ATTRIBUTE BYTES32   destination  "prsAction"
 

END //


It is also asumed that the parent point of the instance or prsCONTROL
contains a "state" and a "substate" attributes, that are used as global
state and substate for the whole module.

 

CAUTIONS


Some of the standard commands are implemented in a trivial way:
to make more safe the application should be improved.



 

Index

NAME
SYNOPSIS
PARENT CLASS
DESCRIPTION
PUBLIC METHODS
PROTECTED METHODS
PRIVATE DATA MEMBERS
ON LINE DATABASE
BEGIN //
BEGIN //
END //
BEGIN //
END //
BEGIN //
END //
CAUTIONS

This document was created by man2html, using the manual pages.
Time: 10:10:48 GMT, April 23, 2012

Definition at line 27 of file prsSEQ_STD_COMMANDS.h.


Constructor & Destructor Documentation

prsSEQ_STD_COMMANDS::prsSEQ_STD_COMMANDS ( const dbSYMADDRESS  dbPoint  ) 

Member Function Documentation

vltINT32 prsSEQ_STD_COMMANDS::GlobalState (  ) 

Definition at line 517 of file prsSEQ_STD_COMMANDS.C.

References dbBasePoint, prsERR_ACCESS_DATABASE, prsGSTATE_ANAME, and prsMOD.

Referenced by GlobalStateName().

const char * prsSEQ_STD_COMMANDS::GlobalStateName (  ) 

Definition at line 537 of file prsSEQ_STD_COMMANDS.C.

References GlobalState().

Referenced by StateCB(), and StatusCB().

vltINT32 prsSEQ_STD_COMMANDS::GlobalSubState (  ) 

Definition at line 548 of file prsSEQ_STD_COMMANDS.C.

References dbBasePoint, prsERR_ACCESS_DATABASE, prsGSUBSTATE_ANAME, and prsMOD.

Referenced by GlobalSubStateName().

const char * prsSEQ_STD_COMMANDS::GlobalSubStateName (  ) 

Definition at line 569 of file prsSEQ_STD_COMMANDS.C.

References GlobalSubState().

Referenced by StatusCB().

evhCB_COMPL_STAT prsSEQ_STD_COMMANDS::MirrorToAction ( msgMESSAGE &  msg,
void *  udata 
) [protected, virtual]

Definition at line 586 of file prsSEQ_STD_COMMANDS.C.

References prsMIRROR_DB_CMD.

Referenced by SimulatCB(), StopSimCB(), and VerboseCB().

evhCB_COMPL_STAT prsSEQ_STD_COMMANDS::OffCB ( msgMESSAGE &  msg,
void *  udata 
) [virtual]

Definition at line 376 of file prsSEQ_STD_COMMANDS.C.

evhCB_COMPL_STAT prsSEQ_STD_COMMANDS::SelfTestCB ( msgMESSAGE &  msg,
void *  udata 
) [virtual]

Definition at line 388 of file prsSEQ_STD_COMMANDS.C.

evhCB_COMPL_STAT prsSEQ_STD_COMMANDS::SimulatCB ( msgMESSAGE &  msg,
void *  udata 
) [virtual]

Definition at line 430 of file prsSEQ_STD_COMMANDS.C.

References MirrorToAction(), prsERR_MIRROR_CMD, and prsMOD.

evhCB_COMPL_STAT prsSEQ_STD_COMMANDS::StandByCB ( msgMESSAGE &  msg,
void *  udata 
) [virtual]

Definition at line 364 of file prsSEQ_STD_COMMANDS.C.

evhCB_COMPL_STAT prsSEQ_STD_COMMANDS::StateCB ( msgMESSAGE &  msg,
void *  udata 
) [virtual]

Definition at line 262 of file prsSEQ_STD_COMMANDS.C.

References GlobalStateName().

evhCB_COMPL_STAT prsSEQ_STD_COMMANDS::StatusCB ( msgMESSAGE &  msg,
void *  udata 
) [virtual]

Definition at line 302 of file prsSEQ_STD_COMMANDS.C.

References GlobalStateName(), and GlobalSubStateName().

evhCB_COMPL_STAT prsSEQ_STD_COMMANDS::StopSimCB ( msgMESSAGE &  msg,
void *  udata 
) [virtual]

Definition at line 459 of file prsSEQ_STD_COMMANDS.C.

References MirrorToAction(), prsERR_MIRROR_CMD, and prsMOD.

evhCB_COMPL_STAT prsSEQ_STD_COMMANDS::TestCB ( msgMESSAGE &  msg,
void *  udata 
) [virtual]

Definition at line 409 of file prsSEQ_STD_COMMANDS.C.

evhCB_COMPL_STAT prsSEQ_STD_COMMANDS::VerboseCB ( msgMESSAGE &  msg,
void *  udata 
) [virtual]

Definition at line 488 of file prsSEQ_STD_COMMANDS.C.

References MirrorToAction(), prsERR_MIRROR_CMD, and prsMOD.


Member Data Documentation

dbSYMADDRESS prsSEQ_STD_COMMANDS::dbBasePoint [private]

Definition at line 51 of file prsSEQ_STD_COMMANDS.h.

Referenced by GlobalState(), and GlobalSubState().


The documentation for this class was generated from the following files:
Generated on Mon Apr 23 10:12:43 2012 for INTROOT API by doxygen 1.6.3