FACT++  1.0
template<class T>
int StateMachineFAD< T >::ListSlots ( )
inlineprivate

Definition at line 1159 of file fadctrl.cc.

References Connection::GetEndpoint(), i, Connection::IsClosed(), ConnectionFAD::IsConfigured(), Connection::IsConnected(), Connection::IsConnecting(), ConnectionFAD::IsTransmissionBlocked(), and str.

Referenced by StateMachineFAD< T >::StateMachineFAD().

1160  {
1161  for (BoardList::iterator i=fBoards.begin(); i!=fBoards.end(); i++)
1162  {
1163  const int &idx = i->first;
1164  const ConnectionFAD *fad = i->second;
1165 
1166  ostringstream str;
1167  str << "Slot " << setw(2) << idx << ": " << fad->GetEndpoint();
1168 
1169  if (fad->IsConnecting())
1170  str << " (0:connecting, ";
1171  else
1172  {
1173  if (fad->IsClosed())
1174  str << " (0:disconnected, ";
1175  if (fad->IsConnected())
1176  str << " (0:connected, ";
1177  }
1178 
1179  switch (fStatus2[idx])
1180  {
1181  case 0: str << "1:disconnected)"; break;
1182  case 8: str << "1:connected)"; break;
1183  default: str << "1:connecting)"; break;
1184  }
1185 
1186  if (fad->IsTransmissionBlocked())
1187  str << " [cmd_blocked]";
1188 
1189  if (fStatus2[idx]==8 && IsIgnored(idx))
1190  str << " [data_ignored]";
1191 
1192  if (fad->IsConnected() && fStatus2[idx]==8 && fad->IsConfigured())
1193  str << " [configured]";
1194 
1195  T::Out() << str.str() << endl;
1196  }
1197 
1198  T::Out() << "Event builder thread:";
1199  if (!IsThreadRunning())
1200  T::Out() << " not";
1201  T::Out() << " running" << endl;
1202 
1203  // FIXME: Output state
1204 
1205  return T::GetCurrentState();
1206  }
BoardList fBoards
Definition: fadctrl.cc:555
int i
Definition: db_dim_client.c:21
char str[80]
Definition: test_client.c:7
bool IsConnected() const
Definition: Connection.h:145
bool IsTransmissionBlocked() const
Definition: fadctrl.cc:500
bool IsConnecting() const
Definition: Connection.h:146
const boost::asio::ip::tcp::endpoint & GetEndpoint() const
Definition: Connection.h:153
vector< uint8_t > fStatus2
Definition: fadctrl.cc:1396
bool IsIgnored(int i) const
int IsClosed() const
Definition: Connection.h:142
bool IsConfigured() const
Definition: fadctrl.cc:530

+ Here is the call graph for this function:

+ Here is the caller graph for this function: