FACT++  1.0
int StateMachineDimControl::HandleStateChange ( const std::string &  server,
DimDescriptions state 
)

Definition at line 333 of file StateMachineDimControl.cc.

References State::comment, DimState::cur, DimDescribedState::description(), State::index, DimState::kNotAvailable, State::name, and DimState::state().

Referenced by HandleServerAdd().

334 {
335  fMutex.lock();
336  const State descr = dim->description();
337  const State state = State(dim->state(), descr.index==DimState::kNotAvailable?"":descr.name, descr.comment, dim->cur.first);
338  fCurrentStateList[server] = state;
339  fMutex.unlock();
340 
341  fStateCallback(server, state);
342 
343  return GetCurrentState();
344 }
int GetCurrentState() const
return the current state of the machine
std::string comment
Name (e.g. 'Connected')
Definition: State.h:13
std::function< void(const std::string &, const State &)> fStateCallback
int index
Definition: State.h:11
std::map< std::string, State > fCurrentStateList
std::string name
Index (e.g. 1)
Definition: State.h:12

+ Here is the call graph for this function:

+ Here is the caller graph for this function: