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

Definition at line 1384 of file FactGui.h.

References i, DimData::ptr(), and DimData::time.

Referenced by infoHandler().

1385  {
1386  if (!CheckSize(d, 41))
1387  {
1388  fStatusEventBuilderLabel->setText("Offline");
1389  fStatusEventBuilderLabel->setToolTip("FADs or fadctrl seems to be offline.");
1390  fGroupEthernet->setEnabled(false);
1391  fGroupOutput->setEnabled(false);
1392 
1393  SetLedColor(fStatusEventBuilderLed, kLedGray, d.time);
1394  return;
1395  }
1396 
1397  const uint8_t *ptr = d.ptr<uint8_t>();
1398 
1399  for (int i=0; i<40; i++)
1400  {
1401  const uint8_t stat1 = ptr[i]&3;
1402  const uint8_t stat2 = ptr[i]>>3;
1403 
1404  if (stat1==0 && stat2==0)
1405  {
1407  continue;
1408  }
1409  if (stat1>=2 && stat2==8)
1410  {
1412  continue;
1413  }
1414 
1415  if (stat1==1 && stat2==1)
1417  else
1419  }
1420 
1421 
1422  const bool runs = ptr[40]!=0;
1423 
1424  fStatusEventBuilderLabel->setText(runs?"Running":"Not running");
1425  fStatusEventBuilderLabel->setToolTip(runs?"Event builder thread running.":"Event builder thread stopped.");
1426 
1427  fGroupEthernet->setEnabled(runs);
1428  fGroupOutput->setEnabled(runs);
1429 
1430  SetLedColor(fStatusEventBuilderLed, runs?kLedGreen:kLedRed, d.time);
1431 
1432 // fFadConnections.assign(ptr, ptr+40);
1433  }
int i
Definition: db_dim_client.c:21
bool CheckSize(const DimData &d, size_t sz, bool print=true) const
Definition: FactGui.h:639
void SetLedColor(QPushButton *button, LedColor_t col, const Time &t)
Definition: FactGui.h:156
const Time time
Definition: DimData.h:9
const T * ptr(uint32_t offset=0) const
Definition: DimData.h:32
QPushButton * fFadLED[40]
Definition: MainWindow.h:24

+ Here is the call graph for this function:

+ Here is the caller graph for this function: