|
LRAUV
revA
|
This class allows one to control loads on a load controller channel. More...
#include <AnalogToDigital.h>

Public Member Functions | |
| AnalogToDigital (const ConfigURI &adCfg, const ConfigURI &vrefCfg, const ConfigURI &resCfg, bool useHardware, Logger &logger) | |
| Constructor. More... | |
| AnalogToDigital (const ConfigURI &adCfg, const ConfigURI &vrefCfg, const ConfigURI &resCfg, const ConfigURI &timeoutCfg, bool useHardware, Logger &logger) | |
| virtual | ~AnalogToDigital () |
| void | startRead () |
| Starts a read from the device Useful for slow devices. More... | |
| float | readCounts () |
| Reads from the device. More... | |
| float | readVolts () |
| Reads from the device and multiplies by vref per bit. More... | |
| float | read (float scale) |
| Reads from the device and multiplies by scale. More... | |
Static Private Member Functions | |
| static double | ReadTimeout (const ConfigURI &timeoutUri, Logger &logger) |
| static float | ReadVRefPerBit (const ConfigURI &vrefCfg, const ConfigURI &resCfg, Logger &logger) |
Private Attributes | |
| bool | useHardware_ |
| DeviceIOStream | io_ |
| float | vrefPerBit_ |
| Timespan | timeout_ |
| bool | started_ |
| Timestamp | startTime_ |
| Logger & | logger_ |
This class allows one to control loads on a load controller channel.
| AnalogToDigital::AnalogToDigital | ( | const ConfigURI & | adCfg, |
| const ConfigURI & | vrefCfg, | ||
| const ConfigURI & | resCfg, | ||
| bool | useHardware, | ||
| Logger & | logger | ||
| ) |
Constructor.
| AnalogToDigital::AnalogToDigital | ( | const ConfigURI & | adCfg, |
| const ConfigURI & | vrefCfg, | ||
| const ConfigURI & | resCfg, | ||
| const ConfigURI & | timeoutCfg, | ||
| bool | useHardware, | ||
| Logger & | logger | ||
| ) |
|
virtual |
|
inline |
Reads from the device and multiplies by scale.
References readCounts().
Referenced by readVolts(), Depth_Keller::run(), and Turner_Cyclops_rhodamine::runnable().
| float AnalogToDigital::readCounts | ( | ) |
Reads from the device.
References Timestamp::asMillis(), InStream::bytesRead(), Timestamp::elapsed(), Syslog::INFO, io_, DeviceIOStream::isReadable(), logger_, Timestamp::Now(), DeviceIOStream::read(), Timespan::sleepFor(), started_, startTime_, Logger::syslog(), and timeout_.
Referenced by read(), and PAR_Licor::run().
References Slate::ReadOnce(), and Units::SECOND.
|
inline |
Reads from the device and multiplies by vref per bit.
References read(), and vrefPerBit_.
Referenced by Onboard::run(), and CBIT::scanGFChan().
|
staticprivate |
References Units::BIT, Slate::ReadOnce(), and Units::VOLT.
| void AnalogToDigital::startRead | ( | ) |
Starts a read from the device Useful for slow devices.
References io_, DeviceIOStream::isWritable(), Timestamp::Now(), started_, startTime_, and DeviceIOStream::write().
Referenced by PAR_Licor::initialize(), Depth_Keller::initialize(), PAR_Licor::run(), Depth_Keller::run(), Turner_Cyclops_rhodamine::runnable(), and Turner_Cyclops_rhodamine::start().
|
private |
Referenced by readCounts(), and startRead().
|
private |
Referenced by readCounts().
|
private |
Referenced by readCounts(), and startRead().
|
private |
Referenced by readCounts(), and startRead().
|
private |
Referenced by readCounts().
|
private |
|
private |
Referenced by readVolts().