FACT++  1.0
bool ConnectionBias::CheckChannelVoltage ( uint16_t  ch,
float  volt 
)
inline

Definition at line 912 of file biasctrl.cc.

References Error().

913  {
914  if (volt>fVoltageMaxAbs)
915  {
916  ostringstream msg;
917  msg << "CheckChannelVoltage - Set voltage " << volt << "V of channel " << ch << " exceeds absolute limit of " << fVoltageMaxAbs << "V.";
918  Warn(msg);
919  return false;
920  }
921 
922  if (fOperationVoltage[ch]<=0)
923  return true;
924 
925  if (volt>fOperationVoltage[ch]+fVoltageMaxRel) // FIXME: fVoltageMaxRel!!!
926  {
927  ostringstream msg;
928  msg << "CheckChannelVoltage - Set voltage " << volt << "V of channel " << ch << " exceeds limit of " << fVoltageMaxRel << "V above operation voltage " << fOperationVoltage[ch] << "V + limit " << fVoltageMaxRel << "V.";
929  Error(msg);
930  return false;
931  }
932 
933  return true;
934  }
int Error(const std::string &str)
Definition: MessageImp.h:49
float fVoltageMaxRel
Definition: biasctrl.cc:97
int Warn(const std::string &str)
Definition: MessageImp.h:48
float fVoltageMaxAbs
Definition: biasctrl.cc:96
vector< float > fOperationVoltage
Definition: biasctrl.cc:90

+ Here is the call graph for this function: