Open Lighting Architecture  0.9.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ola::rdm::Sensor Class Reference

Detailed Description

Holds information about a single sensor.

Inheritance diagram for ola::rdm::Sensor:
ola::rdm::FakeSensor ola::rdm::LoadSensor

Classes

struct  SensorOptions

Public Member Functions

 Sensor (ola::rdm::rdm_sensor_type type, ola::rdm::rdm_pid_unit unit, ola::rdm::rdm_pid_prefix prefix, const std::string &description, const SensorOptions &options)
rdm_sensor_type Type () const
rdm_pid_unit Unit () const
rdm_pid_prefix Prefix () const
int16_t RangeMin () const
int16_t RangeMax () const
int16_t NormalMin () const
int16_t NormalMax () const
const std::string & Description () const
int16_t Lowest () const
int16_t Highest () const
int16_t Recorded () const
int16_t FetchValue ()
 Get the current value, store any new min or max and return it.
void Record ()
int16_t Reset ()
uint8_t RecordedSupportBitMask () const

Protected Member Functions

virtual int16_t PollSensor ()=0
 Actually get the value from the Sensor.

Protected Attributes

const ola::rdm::rdm_sensor_type m_type
const ola::rdm::rdm_pid_unit m_unit
const ola::rdm::rdm_pid_prefix m_prefix
const std::string m_description
const bool m_recorded_value_support
const bool m_recorded_range_support
const int16_t m_range_min
const int16_t m_range_max
const int16_t m_normal_min
const int16_t m_normal_max
int16_t m_lowest
int16_t m_highest
int16_t m_recorded

Member Function Documentation

int16_t ola::rdm::Sensor::FetchValue ( )
inline

Get the current value, store any new min or max and return it.

Returns
the current value of the sensor.
virtual int16_t ola::rdm::Sensor::PollSensor ( )
protectedpure virtual

Actually get the value from the Sensor.

Returns
the value of the sensor when polled.

Implemented in ola::rdm::FakeSensor, and ola::rdm::LoadSensor.

void ola::rdm::Sensor::Record ( )
inline

Get the current value and record it for later collection.

int16_t ola::rdm::Sensor::Reset ( )
inline

Reset a sensor's min/max/recorded values.


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