mswMOD_LIST_COMMAND
Section: Devices and Network Interfaces (4)
Updated: 2012-04-23 10:09
Index
Return to man pages list
NAME
mswMOD_LIST_COMMAND - Basic class to broadcast commands to a
set of modules described in the mode switching list
SYNOPSIS
class mswMOD_LIST_COMMAND : public evhDB_LIST_COMMAND
{
public:
mswMOD_LIST_COMMAND(const dbSYMADDRESS dbPoint = dbEMPTY);
~mswMOD_LIST_COMMAND();
virtual ccsCOMPL_STAT Send(msgMESSAGE &msg);
virtual ccsCOMPL_STAT Send(msgMESSAGE &msg,
const vltINT8 mode,
const vltINT8 phase = mswSEND_NO_PHASE,
const vltINT8 focus = 0);
ccsCOMPL_STAT SetSendMode(const vltINT8 mode,
const vltINT8 phase= mswSEND_NO_PHASE,
const vltINT8 focus = 0);
virtual const char *DbPoint();
virtual ccsCOMPL_STAT DbPoint(const dbSYMADDRESS dbPoint);
mswMOD_LIST *GetList();
virtual ccsCOMPL_STAT CopyConfig(evhDB_COMMAND &cmd);
fndStdObjectDef(mswMOD_LIST_COMMAND, evhDB_LIST_COMMAND)
protected:
virtual mswMOD_LIST *CreateList();
virtual int _ReplyCB(msgMESSAGE &msg, void *udata);
ccsCOMPL_STAT SendPhaseStep();
private:
mswMOD_LIST *list;
vltINT8 sendMode;
vltINT8 sendPhase;
vltINT8 sendFocus;
vltINT8 currentSendMode;
vltINT8 currentSendPhase;
vltINT8 currentPhase;
vltINT8 maxPhase;
msgMESSAGE msg;
};
PARENT CLASS
evhDB_LIST_COMMAND
DESCRIPTION
These classes are part of the public msw library.
mswMOD_LIST_COMMAND requires a database
support point where the list is stored and can be accessed.
Typically this will be the msw list point in the standard TCS
mode switching database branch, i.e. ":Appl_data:TCS:msw:list".
The default value is built assuming a standard TCS database
and using the tcsDbRoot(3) function.
The Send() method is used to send commands to the units described in
the msw table, according to the selected mode and phase selection
criteria.
The mode selection identifies which modules will get the command (all
required modules, tracking module, guiding modules....)
The phase selection identify in which order. By default all commands
are sent in parallel, but it is possible to define in the table
a START and/or STOP phase. In this case the phase is defined by
an integer >= 0. All commands in the same phase are sent in parallel
and the system waits for completion of all commands in a phase before
sending the commands in higher phases.
PUBLIC METHODS
mswMOD_LIST_COMMAND::mswMOD_LIST_COMMAND();
mswMOD_LIST_COMMAND::mswMOD_LIST_COMMAND(const dbSYMADDRESS dbPoint);
Creates the object and initialize data.
Two constructors are provided.
The first one defines the online database support point calling
the standard tcsDbRoot(4) function and appenting the
default relative path from the TCS database root point,
assuming a complete default TCS database structure.
This is what will be generally used.
The second one receives as parameter the symbolic address of
online database support point for the object, i.e. the point
where the object can find configuration and run time values.
This will be typically used for testing purposes.
mswMOD_LIST_COMMAND::~mswMOD_LIST_COMMAND();
ccsCOMPL_STAT mswMOD_LIST_COMMAND::CopyConfig(evhDB_COMMAND &cmd);
Overloading of a basic method inherited evhDB_LIST_COMMAND.
It is internally used by the evhDB_CMD_xxx classes to make
copies of the configuration of a COMMAND class. It behaves
like a copy constructor, but copies only the internal
configuration of the object, without allocating any memory.
ccsCOMPL_STAT mswMOD_LIST_COMMAND::Send(msgMESSAGE &msg);
ccsCOMPL_STAT mswMOD_LIST_COMMAND::Send(msgMESSAGE &msg,
const vltINT8 mode,
const vltINT8 phase = mswSEND_NO_PHASE);
Broadcasts the message to all modules in the list according
to filtering criteria and send phase.
Default is all required modules and NO send phase
The filtering criteria and send phase can be changed by
the SetSendMode method.
mswMOD_LIST *mswMOD_LIST_COMMAND::GetList();
Gets the module list
ccsCOMPL_STAT mswMOD_LIST_COMMAND::SetSendMode(const vltINT8 mode,
const vltINT8 phase = mswSEND_NO_PHASE);
Sets the filtering criteria and send phase for the Send() method
according to mode.
Currently the following values for mode are valid:
mswSEND_REQUIRED - to send to all required modules
mswSEND_TRACKING - to send to all required tracking modules
mswSEND_GUIDING - to send to all required modules for GUIDING
(see MOD_LIST for definition of this)
Currently the following values for the send phase are valid:
mswSEND_NO_PHASE - to send all commands at the same time
mswSEND_START_PHASE - to send commands as in START PHASE
mswSEND_STOP_PHASE - to send commands as in STOP PHASE
When a new mode is set, it is applied to the next actually sent
command. An on-going command is not disturbed by the setting of
new criteria.
ccsCOMPL_STAT mswMOD_LIST_COMMAND::DbPoint(const dbSYMADDRESS point)
Defines a new database root point for the list, reloading it if
necessary.
const char *mswMOD_LIST_COMMAND::DbPoint()
Returns the DbPoint.
PROTECTED METHODS
mswMOD_LIST *mswMOD_LIST_COMMAND::CreateList();
Creates the module list object (class mswMOD_LIST)
int mswMOD_LIST_COMMAND::_ReplyCB(msgMESSAGE &msg, void *udata);
Overwrite the correponding method of the evhDB_COMMAND base class to handle
command send phases.
ccsCOMPL_STAT mswMOD_LIST_COMMAND::SendPhaseStep();
Sends all commands for the next phase.
PRIVATE DATA MEMBERS
mswMOD_LIST *list;
pointer to module list
vltINT8 sendMode;
vltINT8 sendPhase;
filtering criteria for Send() methods mode and phase.
The following data members are internally used to handle an
on-going command:
vltINT8 currentSendMode;
vltINT8 currentSendPhase;
filtering for mode and phase used in the currently on-going
command
vltINT8 currentPhase;
current phase for the on-going command. when all commands
in the current phase are completed, the ones in the next
phase are sent
vltINT8 maxPhase;
maximin phase in the table for the on-going command
msgMESSAGE msg;
message corresponding to the on-going command
ON LINE DATABASE
The class will tipically point to an instance of the mswMOD_LIST_MANAGER
database class, but it just assumes that the given database point
contains the attribute:
ATTRIBUTE Table modules(mswNO_OF_MODULES,
BYTES32 modName,
BYTES32 modId,
BYTES256 modSymbAddr,
INT8 startPhase,
INT8 stopPhase,
INT8 tracking,
INT8 focus,
BOOLEAN required,
BOOLEAN ignore,
BYTES256 userField)
EXAMPLES
Could add here code from trkws using libmsw
SEE ALSO
tcsDbRoot(3)
Index
- NAME
-
- SYNOPSIS
-
- PARENT CLASS
-
- DESCRIPTION
-
- PUBLIC METHODS
-
- PROTECTED METHODS
-
- PRIVATE DATA MEMBERS
-
- ON LINE DATABASE
-
- EXAMPLES
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 10:09:27 GMT, April 23, 2012