trikRuntime
|
Analog TRIK sensor. More...
#include <analogSensor.h>
Public Slots | |
int | read () override |
Returns current reading of a sensor. More... | |
int | readRawData () override |
Returns current raw reading of a sensor. More... | |
Public Slots inherited from trikControl::SensorInterface | |
virtual int | read ()=0 |
Returns current reading of a sensor. More... | |
virtual int | readRawData ()=0 |
Returns current raw reading of a sensor. More... | |
Public Member Functions | |
AnalogSensor (const QString &port, const trikKernel::Configurer &configurer, MspCommunicatorInterface &communicator) | |
Constructor. More... | |
Status | status () const override |
Returns current status of the device. More... | |
int | minValue () const override |
Gets minimal possible value for sensor reading received by read() slot. More... | |
int | maxValue () const override |
Gets maximal possible value for sensor reading received by read() slot. More... | |
Public Member Functions inherited from trikControl::DeviceInterface | |
DeviceInterface ()=default | |
virtual | ~DeviceInterface ()=default |
Additional Inherited Members | |
Public Types inherited from trikControl::SensorInterface | |
enum | Type { Type::analogSensor, Type::digitalSensor, Type::specialSensor } |
Public Types inherited from trikControl::DeviceInterface | |
enum | Status { Status::permanentFailure, Status::temporaryFailure, Status::off, Status::starting, Status::ready, Status::stopping } |
Device status. More... | |
Static Public Member Functions inherited from trikControl::DeviceInterface | |
static Status | combine (const DeviceInterface &underlying, const DeviceInterface::Status &dependent) |
Helper method to return status of a device relying on other device to work. More... | |
Analog TRIK sensor.
AnalogSensor::AnalogSensor | ( | const QString & | port, |
const trikKernel::Configurer & | configurer, | ||
MspCommunicatorInterface & | communicator | ||
) |
Constructor.
port | - port on which this sensor is configured. |
configurer | - configurer object containing preparsed XML files with sensor parameters. |
communicator | - I2C communicator used to query sensor. |
|
overridevirtual |
Gets maximal possible value for sensor reading received by read() slot.
Implements trikControl::SensorInterface.
|
overridevirtual |
Gets minimal possible value for sensor reading received by read() slot.
Implements trikControl::SensorInterface.
|
overrideslot |
Returns current reading of a sensor.
|
overrideslot |
Returns current raw reading of a sensor.
|
overridevirtual |
Returns current status of the device.
Implements trikControl::DeviceInterface.