FACT++  1.0
int ConnectionInterlock::GetState ( ) const
inline

Definition at line 263 of file pwrctrl.cc.

References Power::Status::fDriveFeedbackOn, Power::Status::fPwrBiasOn, Power::Status::fPwrPumpOn, Power::Status::fWaterFlowOk, Power::Status::fWaterLevelOk, Time::IsValid(), Power::State::kBiasOn, Power::State::kCameraOn, Power::State::kConnected, Power::State::kCoolingFailure, Power::State::kDisconnected, Power::State::kDriveOn, kMaxAddr, and Power::State::kSystemOff.

264  {
265  // Timeout
266  if (!fLastReport.IsValid() || Time()>fLastReport+boost::posix_time::seconds(fInterval*3))
268 
269  // No data received yet
270  if (!fIsValid)
272 
273  /*
274  bool fWaterFlowOk;
275  bool fWaterLevelOk;
276  bool fPwrBiasOn;
277  bool fPwr24VOn;
278  bool fPwrPumpOn;
279  bool fPwrDriveOn;
280  bool fDriveMainSwitchOn;
281  bool fDriveFeedbackOn;
282  */
283 
286 
287  const int rc =
291 
292  return rc==0 ? Power::State::kSystemOff : rc;
293  }
bool fWaterLevelOk
Definition: HeadersPower.h:32
Adds some functionality to boost::posix_time::ptime for our needs.
Definition: Time.h:30
bool fDriveFeedbackOn
Definition: HeadersPower.h:41
Power::Status fStatus
Definition: pwrctrl.cc:47
bool IsValid() const
Definition: Time.h:90
uint16_t fInterval
Definition: pwrctrl.cc:33

+ Here is the call graph for this function: