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

Definition at line 486 of file gcn.cc.

References StateMachineGCN< T, S >::Disconnect(), State::kConnected, State::kDisconnected, FTM::State::kValid, StateMachineGCN< T, S >::Reconnect(), StateMachineGCN< T, S >::SetDebugRx(), and StateMachineGCN< T, S >::SetVerbosity().

486  :
487  StateMachineAsio<T>(out, "GCN"), fGCN(*this, *this)
488  {
489  // State names
490  T::AddStateName(State::kDisconnected, "Disconnected",
491  "No connection to GCN.");
492  T::AddStateName(State::kConnected, "Connected",
493  "Connection to GCN established.");
494  T::AddStateName(State::kValid, "Valid",
495  "Connection valid (keep alive received within past 2min)");
496 
497  // Verbosity commands
498  T::AddEvent("SET_VERBOSE", "B:1")
499  (bind(&StateMachineGCN::SetVerbosity, this, placeholders::_1))
500  ("set verbosity state"
501  "|verbosity[bool]:disable or enable verbosity for received data (yes/no), except dynamic data");
502  T::AddEvent("SET_DEBUG_RX", "B:1")
503  (bind(&StateMachineGCN::SetDebugRx, this, placeholders::_1))
504  ("Set debux-rx state"
505  "|debug[bool]:dump received text and parsed text to console (yes/no)");
506 
507 
508  // Conenction commands
509  T::AddEvent("DISCONNECT", State::kConnected)
510  (bind(&StateMachineGCN::Disconnect, this))
511  ("disconnect from ethernet");
512  T::AddEvent("RECONNECT", "O", State::kDisconnected, State::kConnected)
513  (bind(&StateMachineGCN::Reconnect, this, placeholders::_1))
514  ("(Re)connect ethernet connection to FTM, a new address can be given"
515  "|[host][string]:new ethernet address in the form <host:port>");
516 
517  fGCN.StartConnect();
518  }
int SetDebugRx(const EventImp &evt)
Definition: gcn.cc:475
int Disconnect()
Definition: gcn.cc:420
int Reconnect(const EventImp &evt)
Definition: gcn.cc:428
int SetVerbosity(const EventImp &evt)
Definition: gcn.cc:465

+ Here is the call graph for this function: