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

Definition at line 354 of file StateMachineDimControl.cc.

References State::comment, State::index, State::name, and DimDescribedState::states.

Referenced by HandleServerAdd().

355 {
356  const lock_guard<mutex> guard(fMutex);
357 
358  const auto is = fCurrentStateList.find(server);
359  for (auto it=dim->states.begin(); it!=dim->states.end(); it++)
360  {
361  fStateDescriptionList[make_pair(server, it->index)] = make_pair(it->name, it->comment);
362  if (is==fCurrentStateList.end())
363  continue;
364 
365  State &s = is->second;
366  if (s.index==it->index)
367  {
368  s.name = it->name;
369  s.comment = it->comment;
370  }
371  }
372 
373  return GetCurrentState();
374 }
int GetCurrentState() const
return the current state of the machine
std::string comment
Name (e.g. &#39;Connected&#39;)
Definition: State.h:13
std::map< std::pair< std::string, int32_t >, std::pair< std::string, std::string > > fStateDescriptionList
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 caller graph for this function: