Generic hardware access library
|
SequencerCommand to define a new Variable. More...
#include <DefineCommand.hh>
Public Member Functions | |
DefineCommand (std::string variableName, bool hasInitialization, CommandSequence &sequence) | |
virtual | ~DefineCommand () |
void | setInitValuePointer (uint32_t *initValPtr) |
Used by the DefineFactory. | |
void | setInitValue (uint32_t initVal) |
Used by the DefineFactory. | |
void | excecute (const HardwareDeviceInterface &device) const throw () |
This routine is common to all Sequencer commands. | |
Private Attributes | |
bool | hasInitialization |
uint32_t | initValue |
uint32_t * | initValuePtr |
std::string | variableName |
CommandSequence & | sequence |
uint32_t * | variablePtr |
SequencerCommand to define a new Variable.
Variable name must start with a "$". The syntax is "define $name [initValue]";
If the initValue is omitted the variable initialized to 0 BEFORE THE SEQUENCE IS EXCECUTED FOR THE FIRST TIME (i.e. at creation time of the sequence). This means that if the sequence is excecuted a second time, the value of the variable is the same as the one at the end of the previous excecution of the sequence (if not a program has changed its value in the meantime with the setVariable method of the CommandSequencer). If initValue is given the Variable is initialized to this value EACH TIME THE SEQUENCE IS EXCECUTED
Definition at line 40 of file DefineCommand.hh.
HAL::DefineCommand::DefineCommand | ( | std::string | variableName, |
bool | hasInitialization, | ||
HAL::CommandSequence & | sequence | ||
) |
Definition at line 4 of file DefineCommand.cc.
virtual HAL::DefineCommand::~DefineCommand | ( | ) | [inline, virtual] |
Definition at line 48 of file DefineCommand.hh.
void HAL::DefineCommand::excecute | ( | const HardwareDeviceInterface & | device | ) | const throw () [virtual] |
This routine is common to all Sequencer commands.
It does what it pretends to do.
Implements HAL::SequencerCommand.
Definition at line 30 of file DefineCommand.cc.
void HAL::DefineCommand::setInitValue | ( | uint32_t | initVal | ) |
Used by the DefineFactory.
Definition at line 26 of file DefineCommand.cc.
void HAL::DefineCommand::setInitValuePointer | ( | uint32_t * | initValPtr | ) |
Used by the DefineFactory.
Definition at line 22 of file DefineCommand.cc.
bool HAL::DefineCommand::hasInitialization [private] |
Definition at line 62 of file DefineCommand.hh.
uint32_t HAL::DefineCommand::initValue [private] |
Definition at line 63 of file DefineCommand.hh.
uint32_t* HAL::DefineCommand::initValuePtr [private] |
Definition at line 64 of file DefineCommand.hh.
CommandSequence& HAL::DefineCommand::sequence [private] |
Definition at line 66 of file DefineCommand.hh.
std::string HAL::DefineCommand::variableName [private] |
Definition at line 65 of file DefineCommand.hh.
uint32_t* HAL::DefineCommand::variablePtr [private] |
Definition at line 67 of file DefineCommand.hh.