FACT++  1.0
void MessageImp::StateChanged ( const Time time,
const std::string &  server,
const std::string &  msg,
int  state 
)

This is a special write function formatting a string when the state of a state machine has changed.

If the state is <-1 nothing is done.

Calls the virtual function IndicateStateChange

Parameters
timeThe time assigned to the message
serverThe server name which is emitting the state change
msgThe message text
stateThe new state of the system

Definition at line 64 of file MessageImp.cc.

References IndicateStateChange(), kInfo, and Write().

Referenced by IndicateStateChange(), and StateClient::infoHandler().

65 {
66  if (state<-1)
67  return;
68 
69  ostringstream out;
70  out << server << ": Changed state to " << state << " '" << msg << "' received.";
71 
72  Write(time, out.str(), MessageImp::kInfo);
73 
74  IndicateStateChange(time, server);
75 }
An info telling something which can be interesting to know.
Definition: MessageImp.h:17
virtual int Write(const Time &time, const std::string &txt, int qos=kMessage)
Definition: MessageImp.cc:133
virtual void IndicateStateChange(const Time &, const std::string &)
Definition: MessageImp.h:36

+ Here is the call graph for this function:

+ Here is the caller graph for this function: