16 namespace duds {
namespace hardware {
namespace devices {
18 template<
class SVT,
class SQT,
class TVT,
class TQT>
38 template<
class SVT,
class SQT,
class TVT,
class TQT>
102 const boost::uuids::uuid &
id,
110 static std::shared_ptr< GenericSensor <SVT, SQT, TVT, TQT> >
make(
113 return std::make_shared< GenericSensor <SVT, SQT, TVT, TQT> >(
123 static std::shared_ptr< GenericSensor <SVT, SQT, TVT, TQT> >
make(
125 const boost::uuids::uuid &
id,
128 return std::make_shared< GenericSensor <SVT, SQT, TVT, TQT> >(
173 #endif // #ifndef SENSOR_HPP boost::variant< std::string, duds::general::LanguageTaggedString, std::array< std::int32_t, 4 >, std::array< std::int64_t, 2 >, duds::data::int128_w, std::array< float, 4 >, std::array< double, 2 >, double, duds::data::Quantity, boost::recursive_wrapper< duds::data::QuantityNddArray >, duds::time::interstellar::Femtoseconds, duds::time::interstellar::Nanoseconds, duds::time::interstellar::FemtoTime, duds::time::interstellar::NanoTime, boost::uuids::uuid, boost::recursive_wrapper< duds::data::GenericValueTable >, std::shared_ptr< std::vector< char > >> GenericValue
A general value of a type can be serialized for transmission over a network and can be used with a re...
GenericSensor(Device *pdev, Token)
Make a sensor without setting the UUID.
unsigned int idx
The sensor index within the owning Device.
std::shared_ptr< GenericDevice< SVT, SQT, TVT, TQT > > sharedPtr()
Returns a shared pointer to this device object; will be empty if this object's destructor is running...
std::shared_ptr< Sensor > SensorSptr
std::shared_ptr< Device > DeviceSptr
A shared pointer type to the device type used by this sensor.
Something specific; a base class for identifying things.
GenericDevice< SVT, SQT, TVT, TQT > Device
The device type used by this sensor.
static std::shared_ptr< GenericSensor< SVT, SQT, TVT, TQT > > make(Device *pdev)
Make a sensor without setting the UUID.
ConstMeasurementSptr & measurement() const
Returns the current measurement object.
ConstMeasurementSptr meas
The current measurement object.
Represents a sensor on a specific Device; allows access to measurements without needing to use a Devi...
std::shared_ptr< Measurement > MeasurementSptr
A shared pointer type to the measurement type used by this sensor.
Represents something with one or more sensors that are sampled through the same hardware.
std::weak_ptr< Sensor > SensorWptr
GenericSensor(Device *pdev, const boost::uuids::uuid &id, unsigned int i, Token)
Make a new sensor.
duds::data::GenericMeasurement< SVT, SQT, TVT, TQT > Measurement
The measurement type provided by the sensors of the parent device.
std::weak_ptr< Device > DeviceWptr
A weak pointer type to the device type used by this sensor.
Device * dev
The owning device object.
Stores a sample of something along with a timestamp stored as a sample from a clock.
static std::shared_ptr< GenericSensor< SVT, SQT, TVT, TQT > > make(Device *pdev, const boost::uuids::uuid &id, unsigned int i)
Make a new sensor.
GenericSensor< duds::data::GenericValue, double, duds::time::interstellar::NanoTime, float > Sensor
std::shared_ptr< const Measurement > ConstMeasurementSptr
A shared pointer type to the const measurement type used by this sensor.
NanoClock::time_point NanoTime
A point in time in Interstellar Time stored in Nanoseconds.
unsigned int index() const
Returns the sensor's device specific index.
DeviceSptr device() const
Returns a shared pointer to the owning device.