FACT++  1.0
int StateMachineSmartFACT::HandleFtmFtuList ( const EventImp d)
inlineprivate

Definition at line 1697 of file smartfact.cc.

References FTM::DimFtuList::fPing, EventImp::GetJavaDate(), i, FTM::DimFtuList::IsActive(), HTML::kWhite, and EventImp::Ref().

Referenced by StateMachineSmartFACT().

1698  {
1699  if (!CheckDataSize(d, "FtmControl:FtuList", sizeof(FTM::DimFtuList)))
1700  return GetCurrentState();
1701 
1702  const FTM::DimFtuList &sdata = d.Ref<FTM::DimFtuList>();
1703 
1704  ostringstream out;
1705  out << d.GetJavaDate() << '\n';
1706 
1707  int cnt = 0;
1708  for (int i=0; i<4; i++)
1709  {
1710  out << HTML::kWhite << '\t';
1711  for (int j=0; j<10; j++)
1712  if (sdata.IsActive(i*10+j))
1713  {
1714  if (sdata.fPing[i*10+j]==1)
1715  {
1716  out << '*';
1717  cnt++;
1718  }
1719  else
1720  out << sdata.fPing[i*10+j];
1721  }
1722  else
1723  out << '-';
1724  out << '\n';
1725  }
1726 
1727  fFtmControlFtuOk = cnt==40;
1728 
1729  ofstream(fPath+"/ftu.data") << out.str();
1730 
1731  return GetCurrentState();
1732  }
int GetCurrentState() const
return the current state of the machine
bool CheckDataSize(const EventImp &d, const char *name, size_t size, bool min=false)
Definition: smartfact.cc:669
int i
Definition: db_dim_client.c:21
uint8_t fPing[40]
Address of FTU board.
Definition: HeadersFTM.h:682
static const string kWhite
Definition: smartfact.cc:74
uint64_t GetJavaDate() const
Definition: EventImp.cc:303
bool IsActive(int i) const
Definition: HeadersFTM.h:703
const T & Ref(size_t offset=0) const
Definition: EventImp.h:82

+ Here is the call graph for this function:

+ Here is the caller graph for this function: