FACT++
1.0
|
StateMachineDim::StateMachineDim | ( | std::ostream & | out = std::cout , |
const std::string & | name = "DEFAULT" |
||
) |
The constrcutor first initialized DimStart with the given machine name. DimStart is just a wrapper which constructor calls DimServer::start() to ensure that initializing the Dim sub-system, is the first what is done.
The second objet instantiated is the MessageDim class which offers the MESSAGE service used to broadcast logging messages to other Dim clients.
After this the services STATE and VERSION are setup. STATE will be used to broadcast the state of the machine. Version broadcasts the global version number of the StateMachineDim implementation
After redirecting the handler which handels dim's EXIT command to ourself (it will then call StateMachineDim::exitHandler) and adding human readable state names for the default states implemented by StateMachingImp the state is set to kSM_Initializing. Warning: The EXIT handler is global!
name | The name with which the dim-services should be prefixed, e.g. "DRIVE" will lead to "DRIVE/SERVICE". It is also propagated to DimServer::start() |
out | A refrence to an ostream which allows to redirect the log-output to something else than cout. The default is cout. The reference is propagated to fLog |
Definition at line 63 of file StateMachineDim.cc.
References StateMachineImp::SetDefaultStateNames().