trikRuntime
trikControl::SensorInterface Class Referenceabstract

Abstract sensor, inherited by various sensor types. More...

#include <sensorInterface.h>

Inheritance diagram for trikControl::SensorInterface:
Collaboration diagram for trikControl::SensorInterface:

Public Types

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...
 

Public Slots

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

virtual int minValue () const =0
 Gets minimal possible value for sensor reading received by read() slot. More...
 
virtual int maxValue () const =0
 Gets maximal possible value for sensor reading received by read() slot. More...
 
- Public Member Functions inherited from trikControl::DeviceInterface
 DeviceInterface ()=default
 
virtual ~DeviceInterface ()=default
 
virtual Status status () const =0
 Returns current status of the device. More...
 

Additional Inherited Members

- 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...
 

Detailed Description

Abstract sensor, inherited by various sensor types.

Member Enumeration Documentation

Enumerator
analogSensor 
digitalSensor 
specialSensor 

Member Function Documentation

virtual int trikControl::SensorInterface::maxValue ( ) const
pure virtual

Gets maximal possible value for sensor reading received by read() slot.

Implemented in trikControl::RangeSensor, trikControl::DigitalSensor, and trikControl::AnalogSensor.

virtual int trikControl::SensorInterface::minValue ( ) const
pure virtual

Gets minimal possible value for sensor reading received by read() slot.

Implemented in trikControl::RangeSensor, trikControl::DigitalSensor, and trikControl::AnalogSensor.

virtual int trikControl::SensorInterface::read ( )
pure virtualslot

Returns current reading of a sensor.

virtual int trikControl::SensorInterface::readRawData ( )
pure virtualslot

Returns current raw reading of a sensor.


The documentation for this class was generated from the following file: