FACT++  1.0
EventImp & StateMachineImp::AddEvent ( const std::string &  name,
const std::string &  fmt,
int  s1 = -1,
int  s2 = -1,
int  s3 = -1,
int  s4 = -1,
int  s5 = -1 
)
protected

Calling this function, a new (named) event is added to the state machine. Therefore an instance of type DimEvent is created and added to the list of available commands fListOfEvents.

Parameters
nameThe command name which should initiate the transition. The DimCommand will be constructed with the name given to the constructor and this name, e.g. "DRIVE/CHANGE_STATE_TO_NEW_STATE"
fmtA format as defined by the dim system can be given for the command. However, it has no real meaning except that it is stored within the DimCommand object. However, the user must make sure that the data of received commands is properly extracted. No check is done.
s1,s2,s3,s4,s5A list of states from which a transition to targetstate is allowed by this command.

Definition at line 589 of file StateMachineImp.cc.

References AddEvent(), and str.

590 {
591  ostringstream str;
592  str << s1 << ' ' << s2 << ' ' << s3 << ' ' << s4 << ' ' << s5;
593  return AddEvent(name, str.str(), fmt);
594 }
EventImp & AddEvent(const std::string &name, const std::string &states, const std::string &fmt)
char str[80]
Definition: test_client.c:7

+ Here is the call graph for this function: