FACT++  1.0
State::states_t ConnectionBias::GetStatus ( )
inline

Definition at line 1496 of file biasctrl.cc.

References State::kConnecting, State::kDisconnected, BIAS::State::kInitializing, BIAS::State::kNotReferenced, kNumChannels, BIAS::kNumChannelsPerBoard, BIAS::State::kOverCurrent, BIAS::State::kRamping, Agilent::State::kVoltageOff, and Agilent::State::kVoltageOn.

1497  {
1498  if (!IsConnected())
1499  return State::kDisconnected;
1500 
1501  if (IsConnecting())
1502  return State::kConnecting;
1503 
1504  if (fIsInitializing)
1505  return State::kInitializing;
1506 
1507  if (fIsRamping)
1508  return State::kRamping;
1509 
1510  for (int ch=0; ch<kNumChannels; ch++)
1511  if (fPresent[ch/kNumChannelsPerBoard] && fCurrent[ch]<0)
1512  return State::kOverCurrent;
1513 
1514  bool isoff = true;
1515  for (int ch=0; ch<kNumChannels; ch++)
1516  if (fPresent[ch/kNumChannelsPerBoard] && fDacActual[ch]!=0)
1517  isoff = false;
1518  if (isoff)
1519  return State::kVoltageOff;
1520 
1521  for (int ch=0; ch<kNumChannels; ch++)
1522  if (fPresent[ch/kNumChannelsPerBoard] && fDacActual[ch]!=fDacTarget[ch])
1523  return State::kNotReferenced;
1524 
1525  return State::kVoltageOn;
1526  }
vector< int16_t > fCurrent
Definition: biasctrl.cc:72
bool IsConnecting() const
bool fIsRamping
Definition: biasctrl.cc:60
int fIsInitializing
Definition: biasctrl.cc:59
bool IsConnected() const
vector< bool > fPresent
Definition: biasctrl.cc:45
vector< uint16_t > fDacTarget
Definition: biasctrl.cc:99
vector< uint16_t > fDacActual
Definition: biasctrl.cc:101