FACT++  1.0
void FactGui::SetFtuStatusLed ( const Time t)
inlineprivate

Definition at line 1899 of file FactGui.h.

References count.

1900  {
1901  const int max = fFtuStatus.max();
1902 
1903  switch (max)
1904  {
1905  case 0:
1906  SetLedColor(fStatusFTULed, kLedGray, t);
1907  fStatusFTULabel->setText("All disabled");
1908  fStatusFTULabel->setToolTip("All FTUs are disabled");
1909  break;
1910 
1911  case 1:
1912  SetLedColor(fStatusFTULed, kLedGreen, t);
1913  fStatusFTULabel->setToolTip("Communication with FTU is smooth.");
1914  fStatusFTULabel->setText("ok");
1915  break;
1916 
1917  case 2:
1918  SetLedColor(fStatusFTULed, kLedOrange, t);
1919  fStatusFTULabel->setText("Warning");
1920  fStatusFTULabel->setToolTip("At least one FTU didn't answer immediately");
1921  break;
1922 
1923  case 3:
1924  SetLedColor(fStatusFTULed, kLedRed, t);
1925  fStatusFTULabel->setToolTip("At least one FTU didn't answer!");
1926  fStatusFTULabel->setText("ERROR");
1927  break;
1928  }
1929 
1930  const int cnt = count(&fFtuStatus[0], &fFtuStatus[40], 0);
1931  fFtuAllOn->setEnabled(cnt!=0);
1932  fFtuAllOff->setEnabled(cnt!=40);
1933  }
void SetLedColor(QPushButton *button, LedColor_t col, const Time &t)
Definition: FactGui.h:156
int count
Definition: db_dim_server.c:18
valarray< int8_t > fFtuStatus
Definition: FactGui.h:71