|
DUDS
|
Distributed Update of Data from Something
|
Represents a sensor on a specific Device; allows access to measurements without needing to use a Device object. More...
#include <Sensor.hpp>
Classes | |
| struct | Token |
Public Types | |
| typedef std::shared_ptr< const Measurement > | ConstMeasurementSptr |
| A shared pointer type to the const measurement type used by this sensor. More... | |
| typedef GenericDevice< SVT, SQT, TVT, TQT > | Device |
| The device type used by this sensor. More... | |
| typedef std::shared_ptr< Device > | DeviceSptr |
| A shared pointer type to the device type used by this sensor. More... | |
| typedef std::weak_ptr< Device > | DeviceWptr |
| A weak pointer type to the device type used by this sensor. More... | |
| typedef duds::data::GenericMeasurement< SVT, SQT, TVT, TQT > | Measurement |
| The measurement type provided by the sensors of the parent device. More... | |
| typedef std::shared_ptr< Measurement > | MeasurementSptr |
| A shared pointer type to the measurement type used by this sensor. More... | |
Public Member Functions | |
| DeviceSptr | device () const |
| Returns a shared pointer to the owning device. More... | |
| unsigned int | index () const |
| Returns the sensor's device specific index. More... | |
| ConstMeasurementSptr & | measurement () const |
| Returns the current measurement object. More... | |
Public Member Functions inherited from duds::Something | |
| virtual | ~Something ()=0 |
| std::string | getName () const |
| Returns the name for the current locale. More... | |
| const general::LanguageTaggedStringMap & | names () const |
| Returns the set of names for all locales and languages. More... | |
| bool | operator!= (const Something &s) const |
| Something objects are compared using the someId member. More... | |
| bool | operator< (const Something &s) const |
| Something objects are compared using the someId member. More... | |
| bool | operator<= (const Something &s) const |
| Something objects are compared using the someId member. More... | |
| bool | operator== (const Something &s) const |
| Something objects are compared using the someId member. More... | |
| bool | operator> (const Something &s) const |
| Something objects are compared using the someId member. More... | |
| bool | operator>= (const Something &s) const |
| Something objects are compared using the someId member. More... | |
| template<class DerivedClass > | |
| std::shared_ptr< DerivedClass > | sharedPtr () const |
| Returns a shared pointer to this object for a derived class. More... | |
| const boost::uuids::uuid & | uuid () const |
| Returns the object's unique identifier. More... | |
Static Public Member Functions | |
| static std::shared_ptr< GenericSensor< SVT, SQT, TVT, TQT > > | make (Device *pdev) |
| Make a sensor without setting the UUID. More... | |
| static std::shared_ptr< GenericSensor< SVT, SQT, TVT, TQT > > | make (Device *pdev, const boost::uuids::uuid &id, unsigned int i) |
| Make a new sensor. More... | |
Protected Member Functions | |
| GenericSensor (Device *pdev, Token) | |
| Make a sensor without setting the UUID. More... | |
| GenericSensor (Device *pdev, const boost::uuids::uuid &id, unsigned int i, Token) | |
| Make a new sensor. More... | |
Protected Member Functions inherited from duds::Something | |
| Something ()=default | |
| Simple constructor. More... | |
| Something (const boost::uuids::uuid &id) | |
| Creates Something with the given UUID. More... | |
| void | setUuid (const boost::uuids::uuid &id) |
| Sets the UUID that is associated with this object. More... | |
Private Attributes | |
| Device * | dev |
| The owning device object. More... | |
| unsigned int | idx |
| The sensor index within the owning Device. More... | |
| ConstMeasurementSptr | meas |
| The current measurement object. More... | |
Friends | |
| class | GenericDevice< SVT, SQT, TVT, TQT > |
Additional Inherited Members | |
Protected Attributes inherited from duds::Something | |
| general::LanguageTaggedStringMap | ltnames |
| A name for this item intended for user presentation. More... | |
Represents a sensor on a specific Device; allows access to measurements without needing to use a Device object.
| SVT | Sample value type |
| SQT | Sample quality type |
| TVT | Time value type |
| TQT | Time quality type |
Definition at line 39 of file Sensor.hpp.
| typedef std::shared_ptr<const Measurement> duds::hardware::devices::GenericSensor< SVT, SQT, TVT, TQT >::ConstMeasurementSptr |
A shared pointer type to the const measurement type used by this sensor.
Definition at line 65 of file Sensor.hpp.
| typedef GenericDevice<SVT, SQT, TVT, TQT> duds::hardware::devices::GenericSensor< SVT, SQT, TVT, TQT >::Device |
The device type used by this sensor.
Definition at line 45 of file Sensor.hpp.
| typedef std::shared_ptr<Device> duds::hardware::devices::GenericSensor< SVT, SQT, TVT, TQT >::DeviceSptr |
A shared pointer type to the device type used by this sensor.
Definition at line 49 of file Sensor.hpp.
| typedef std::weak_ptr<Device> duds::hardware::devices::GenericSensor< SVT, SQT, TVT, TQT >::DeviceWptr |
A weak pointer type to the device type used by this sensor.
Definition at line 53 of file Sensor.hpp.
| typedef duds::data::GenericMeasurement<SVT, SQT, TVT, TQT> duds::hardware::devices::GenericSensor< SVT, SQT, TVT, TQT >::Measurement |
The measurement type provided by the sensors of the parent device.
Definition at line 57 of file Sensor.hpp.
| typedef std::shared_ptr<Measurement> duds::hardware::devices::GenericSensor< SVT, SQT, TVT, TQT >::MeasurementSptr |
A shared pointer type to the measurement type used by this sensor.
Definition at line 61 of file Sensor.hpp.
|
inlineprotected |
Make a sensor without setting the UUID.
| pdev | The owning device. |
Definition at line 92 of file Sensor.hpp.
|
inlineprotected |
Make a new sensor.
| pdev | The owning device. |
| id | The UUID for this sensor. |
| i | The sensor's device specific index. |
Definition at line 100 of file Sensor.hpp.
|
inline |
Returns a shared pointer to the owning device.
Definition at line 144 of file Sensor.hpp.
|
inline |
Returns the sensor's device specific index.
Definition at line 135 of file Sensor.hpp.
|
inlinestatic |
Make a sensor without setting the UUID.
| pdev | The owning device. |
Definition at line 110 of file Sensor.hpp.
Referenced by duds::hardware::devices::clocks::GenericClock< SVT, SQT, TVT, TQT >::GenericClock().
|
inlinestatic |
Make a new sensor.
| pdev | The owning device. |
| id | The UUID for this sensor. |
| i | The sensor's device specific index. |
Definition at line 123 of file Sensor.hpp.
|
inline |
Returns the current measurement object.
The measurement object will be replaced when the device is sampled, so repeated calls to this function can return different objects.
Definition at line 156 of file Sensor.hpp.
|
friend |
Definition at line 40 of file Sensor.hpp.
|
private |
The owning device object.
When the device is destructed, it will set this to nullptr.
Definition at line 71 of file Sensor.hpp.
Referenced by duds::hardware::devices::GenericSensor< SVT, SQT, TVT, TQT >::device().
|
private |
The sensor index within the owning Device.
Should this object be used without a Device, set this to -1.
Definition at line 83 of file Sensor.hpp.
Referenced by duds::hardware::devices::GenericSensor< SVT, SQT, TVT, TQT >::index().
|
private |
The current measurement object.
Definition at line 75 of file Sensor.hpp.
Referenced by duds::hardware::devices::GenericSensor< SVT, SQT, TVT, TQT >::measurement().