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