FACT++  1.0
template<class T , class S >
StateMachineSQMControl< T, S >::StateMachineSQMControl ( ostream &  out = cout)
inline

Definition at line 372 of file sqmctrl.cc.

References StateMachineSQMControl< T, S >::Disconnect(), SQM::State::kConnected, SQM::State::kDisconnected, SQM::State::kValid, StateMachineSQMControl< T, S >::Reconnect(), and StateMachineSQMControl< T, S >::SetVerbosity().

372  :
373  StateMachineAsio<T>(out, "SQM_CONTROL"), fSQM(*this, *this)
374  {
375  // State names
376  T::AddStateName(SQM::State::kDisconnected, "Disconnected",
377  "No connection to Sky Quality Meter");
378 
379  T::AddStateName(SQM::State::kConnected, "Connected",
380  "Connection established, but no valid message received");
381 
382  T::AddStateName(SQM::State::kValid, "Valid",
383  "Valid message received");
384 
385  // Commands
386  //T::AddEvent("SEND_COMMAND", "C")
387  // (bind(&StateMachineSQMControl::SendCommand, this, placeholders::_1))
388  // ("Send command to SQM");
389 
390  // Verbosity commands
391  T::AddEvent("SET_VERBOSE", "B")
392  (bind(&StateMachineSQMControl::SetVerbosity, this, placeholders::_1))
393  ("set verbosity state"
394  "|verbosity[bool]:disable or enable verbosity for received data (yes/no), except dynamic data");
395 
396  //T::AddEvent("ENABLE")
397  // (bind(&StateMachineSQMControl::Send, this, "veto_60"))
398  // ("Enable trigger signal once a second vetoed at every exact minute");
399 
400  //T::AddEvent("DISABLE")
401  // (bind(&StateMachineSQMControl::Send, this, "veto_on"))
402  // ("Diable trigger output");
403 
404  // Conenction commands
405  T::AddEvent("DISCONNECT")
407  ("disconnect from ethernet");
408 
409  T::AddEvent("RECONNECT", "O")
410  (bind(&StateMachineSQMControl::Reconnect, this, placeholders::_1))
411  ("(Re)connect ethernet connection to SQM, a new address can be given"
412  "|[host][string]:new ethernet address in the form <host:port>");
413 
414  }
int Reconnect(const EventImp &evt)
Definition: sqmctrl.cc:325
int SetVerbosity(const EventImp &evt)
Definition: sqmctrl.cc:343

+ Here is the call graph for this function: