FACT++  1.0
void FactGui::handleFtmFtuList ( const DimData d)
inlineprivate

Definition at line 2048 of file FactGui.h.

References FTM::DimFtuList::fAddr, FTM::DimFtuList::fDNA, FTM::DimFtuList::fNumBoards, FTM::DimFtuList::fNumBoardsCrate, FTM::DimFtuList::fPing, i, FTM::DimFtuList::IsActive(), DimData::ref(), str, and DimData::time.

Referenced by infoHandler().

2049  {
2050  if (!CheckSize(d, sizeof(FTM::DimFtuList)))
2051  return;
2052 
2053  fFtuPing->setChecked(false);
2054 
2055  const FTM::DimFtuList &sdata = d.ref<FTM::DimFtuList>();
2056 
2057  stringstream str;
2058  str << "<table width='100%'>" << setfill('0');
2059  str << "<tr><th>Num</th><th></th><th>Addr</th><th></th><th>DNA</th></tr>";
2060  for (int i=0; i<40; i++)
2061  {
2062  str << "<tr>";
2063  str << "<td align='center'>" << dec << i << hex << "</td>";
2064  str << "<td align='center'>:</td>";
2065  str << "<td align='center'>0x" << setw(2) << (int)sdata.fAddr[i] << "</td>";
2066  str << "<td align='center'>:</td>";
2067  str << "<td align='center'>0x" << setw(16) << sdata.fDNA[i] << "</td>";
2068  str << "</tr>";
2069  }
2070  str << "</table>";
2071 
2072  fFtuDNA->setText(str.str().c_str());
2073 
2074  fFtuAnswersTotal->setValue(sdata.fNumBoards);
2075  fFtuAnswersCrate0->setValue(sdata.fNumBoardsCrate[0]);
2076  fFtuAnswersCrate1->setValue(sdata.fNumBoardsCrate[1]);
2077  fFtuAnswersCrate2->setValue(sdata.fNumBoardsCrate[2]);
2078  fFtuAnswersCrate3->setValue(sdata.fNumBoardsCrate[3]);
2079 
2080  for (int i=0; i<40; i++)
2081  SetFtuLed(i, sdata.IsActive(i) ? sdata.fPing[i] : -1, d.time);
2082 
2083  SetFtuStatusLed(d.time);
2084  }
uint16_t fNumBoards
Definition: HeadersFTM.h:677
int i
Definition: db_dim_client.c:21
bool CheckSize(const DimData &d, size_t sz, bool print=true) const
Definition: FactGui.h:639
char str[80]
Definition: test_client.c:7
void SetFtuStatusLed(const Time &t)
Definition: FactGui.h:1899
uint8_t fPing[40]
Address of FTU board.
Definition: HeadersFTM.h:682
const Time time
Definition: DimData.h:9
uint8_t fNumBoardsCrate[4]
Number of boards answered in total.
Definition: HeadersFTM.h:678
uint8_t fAddr[40]
DNA of FTU board.
Definition: HeadersFTM.h:681
const T & ref(uint32_t offset=0) const
Definition: DimData.h:35
uint64_t fDNA[40]
Number of boards answered per crate.
Definition: HeadersFTM.h:680
bool IsActive(int i) const
Definition: HeadersFTM.h:703
void SetFtuLed(int idx, int counter, const Time &t)
Definition: FactGui.h:1884

+ Here is the call graph for this function:

+ Here is the caller graph for this function: