|
| typedef std::shared_ptr< GenericClock< SVT, SQT, TVT, TQT > > | ClockSptr |
| |
| typedef duds::data::GenericMeasurement< SVT, SQT, TVT, TQT > | Measurement |
| | The measurement type provided by the instruments of this device. More...
|
| |
| typedef clocks::GenericClock< SVT, SQT, TVT, TQT > | Clock |
| | The clock driver type used by the instruments of this device for time stamps. More...
|
| |
| typedef std::shared_ptr< Clock > | ClockSptr |
| | A shared pointer type to the clock type used by this device. More...
|
| |
| typedef std::shared_ptr< const Measurement > | ConstMeasurementSptr |
| | A shared pointer type to the const measurement type used by this device. More...
|
| |
| typedef std::shared_ptr< const Sensor > | ConstSensorSptr |
| | A shared pointer type to the const sensor type used by this device. More...
|
| |
| typedef duds::data::GenericMeasurement< SVT, SQT, TVT, TQT > | Measurement |
| | The measurement type provided by the instruments of this device. More...
|
| |
| typedef std::shared_ptr< Measurement > | MeasurementSptr |
| | A shared pointer type to the measurement type used by this device. More...
|
| |
| typedef GenericSensor< SVT, SQT, TVT, TQT > | Sensor |
| | The sensor type used by this device. More...
|
| |
| typedef std::shared_ptr< Sensor > | SensorSptr |
| | A shared pointer type to the sensor type used by this device. More...
|
| |
| typedef std::weak_ptr< Sensor > | SensorWptr |
| | A weak pointer type to the sensor type used by this device. More...
|
| |
|
| template<class Ratio , class Src , class Dest > |
| static void | convert (Dest &dest, const Src &src) |
| | General template to convert time in one format to another. More...
|
| |
| template<class Ratio , class Src > |
| static void | convert (duds::time::interstellar::FemtoTime &dest, const Src &src) |
| | Template specialization to convert time in one format to FemtoTime. More...
|
| |
| template<class Ratio , class Src > |
| static void | convert (duds::time::interstellar::NanoTime &dest, const Src &src) |
| | Template specialization to convert time in one format to NanoTime. More...
|
| |
| template<class Ratio , class Src > |
| static void | convert (duds::data::GenericValue &dest, const Src &src) |
| | Template specialization to convert time in one format to FemtoTime in a GenericValue. More...
|
| |
| template<class Ratio , class IST , class Src > |
| static void | convertIST (IST &dest, const Src &src) |
| | Template to convert time in one format to one of the types defined in duds::time::interstellar. More...
|
| |
| template<class Ratio , class IST > |
| static void | convertIST (IST &dest, const duds::data::int128_t &src) |
| | More specialized template to convert time stored in a 128-bit integer to one of the types defined in duds::time::interstellar. More...
|
| |
template<class SVT, class SQT, class TVT, class TQT>
class duds::hardware::devices::clocks::GenericClock< SVT, SQT, TVT, TQT >
The foundation to a clock driver.
- Todo:
- Need to include a way to get a UUID for the clock from a config file.
- Template Parameters
-
| SVT | Sample value type |
| SQT | Sample quality type |
| TVT | Time value type |
| TQT | Time quality type |
- Author
- Jeff Jackowski
Definition at line 78 of file Clock.hpp.
template<class SVT, class SQT, class TVT, class TQT>
template<class Ratio , class Src , class Dest >
General template to convert time in one format to another.
- Template Parameters
-
| Ratio | The ratio of one second to one unit of Src. |
| Src | The source type. |
| Dest | The destination type. This implementation is for a floating point type. |
- Parameters
-
| dest | Where to put the converted time value. Not a return value because some destination types are large. |
| src | The source time. |
Definition at line 97 of file Clock.hpp.
template<class SVT, class SQT, class TVT, class TQT>
template<class Ratio , class Src >
Template specialization to convert time in one format to FemtoTime in a GenericValue.
- Template Parameters
-
| Ratio | The ratio of one second to one unit of Src. |
| Src | The source type. |
- Parameters
-
| dest | Where to put the converted time value. |
| src | The source time. |
Definition at line 172 of file Clock.hpp.
template<class SVT, class SQT, class TVT, class TQT>
template<class Ratio , class IST , class Src >
Template to convert time in one format to one of the types defined in duds::time::interstellar.
- Template Parameters
-
| Ratio | The ratio of one second to one unit of Src. |
| IST | The destination time type. It should be a time point type from duds::time::interstellar. |
| Src | The source type. |
- Parameters
-
| dest | Where to put the converted time value. |
| src | The source time. |
Definition at line 111 of file Clock.hpp.
template<class SVT, class SQT, class TVT, class TQT>
template<class Ratio , class IST >
More specialized template to convert time stored in a 128-bit integer to one of the types defined in duds::time::interstellar.
The specialization is needed to deal with a type conversion of the 128-bit integer from Boost's multiprecision library. It is not needed if the compiler provides a 128-bit integer type.
- Template Parameters
-
| Ratio | The ratio of one second to one unit of Src. |
| IST | The destination time type. It should be a time point type from duds::time::interstellar. |
- Parameters
-
| dest | Where to put the converted time value. |
| src | The source time. |
Definition at line 130 of file Clock.hpp.
template<class SVT, class SQT, class TVT, class TQT>
Samples the time from this clock stores it in the measured field of the Measurement object of the device's first sensor.
The timestamp field will be clear.
Implements duds::hardware::devices::GenericDevice< SVT, SQT, TVT, TQT >.
Implemented in duds::hardware::devices::clocks::GenericPosixClock< SVT, SQT, TVT, TQT >, duds::hardware::devices::clocks::GenericLinuxClock< SVT, SQT, TVT, TQT >, and duds::hardware::devices::clocks::GenericCppClock< CLK, SVT, SQT, TVT, TQT >.
template<class SVT, class SQT, class TVT, class TQT>
Samples the time from this clock and the given clock, then stores the measurement.
The sample from this clock will be in the measured field of the Measurement object, while the sample from the given clock will be in the timestamp field.
- Parameters
-
| clock | The clock that will be sampled for the timestamp in the resulting measurement. If it is this clock, the clock must only be sampled once and the same time must be in both the measured and timestamp fields of the Measurement object. Different types may be used to hold the time in those fields so they might not evaluate as equal. |
Implemented in duds::hardware::devices::clocks::GenericPosixClock< SVT, SQT, TVT, TQT >, duds::hardware::devices::clocks::GenericLinuxClock< SVT, SQT, TVT, TQT >, and duds::hardware::devices::clocks::GenericCppClock< CLK, SVT, SQT, TVT, TQT >.
template<class SVT, class SQT, class TVT, class TQT>
Returns true if the clock properly reports the time during a leap second.
Should the clock replay the second 59 for the leap second, then two seconds appear the same making the time ambiguous. If the clock reports 60 for the second field during a leap second, increments normally, or otherwise makes the leap second distinct, then it is unambiguous.
Ideally, ambiguous clocks should also indicate the problem in the reported quality values. For example, if a clock replays the previous second during the leap second, the accracy value should increase by a second starting one second before the leap second and continuing until after the leap second.
Implemented in duds::hardware::devices::clocks::GenericPosixClock< SVT, SQT, TVT, TQT >, duds::hardware::devices::clocks::GenericLinuxClock< SVT, SQT, TVT, TQT >, and duds::hardware::devices::clocks::GenericCppClock< CLK, SVT, SQT, TVT, TQT >.