|
DUDS
|
Distributed Update of Data from Something
|
A template for a sample from an insturment. More...
#include <Sample.hpp>
Public Types | |
| typedef QT | Quality |
| typedef VT | Value |
Public Member Functions | |
| void | clear () |
| Initializes the sample to hold no data. More... | |
| bool | isClear () const |
| Returns true when this object contains no sample data. More... | |
| CompactSample< VT, QT > | makeCompactSample () const |
| Produce a CompactSample using the data in this Sample. More... | |
| operator CompactSample< VT, QT > () const | |
| Produce a CompactSample using the data in this Sample. More... | |
Static Public Member Functions | |
| static constexpr QT | unspecified () |
| Returns the value used to represent an unspecified or unknown accuracy, precision, resolution, or error. More... | |
Public Attributes | |
| QT | accuracy |
| The expected accuracy of the instrument under the conditions in which the sample was taken. More... | |
| QT | estError |
| The estimated error of the observation. More... | |
| boost::uuids::uuid | origin |
| The UUID for the source instrument of this sample. More... | |
| QT | precision |
| The expected precision of the instrument under the conditions in which the sample was taken. More... | |
| QT | resolution |
| The expected resolution of the instrument under the conditions in which the sample was taken. More... | |
| VT | value |
| The value sampled from the insturment. More... | |
A template for a sample from an insturment.
| VT | The type used to store the value meausred by the insturment. In most cases, this should be either GenericValue for flexibility, or double for less memory usage. In the case of a time stamp rather than an interval, the value should be an integer to avoid loss of resolution the further the time is from time zero. GenericValue includes time types. |
| QT | The type used to store quality information about the sampled value. In the case of a time stamp, a double or float could be used. Units are be the same as in VT, unless VT is one of the duds::time::interstellar time types and QT is a floating point type, in which case the units are seconds. Unsigned intergers must not be used. |
Definition at line 81 of file Sample.hpp.
| typedef QT duds::data::GenericSample< VT, QT >::Quality |
Definition at line 83 of file Sample.hpp.
| typedef VT duds::data::GenericSample< VT, QT >::Value |
Definition at line 82 of file Sample.hpp.
|
inline |
Initializes the sample to hold no data.
Definition at line 143 of file Sample.hpp.
|
inline |
Returns true when this object contains no sample data.
Not called isEmpty() because all fields will contain data, and it suggests the result will be true after calling clear().
Definition at line 154 of file Sample.hpp.
| CompactSample< VT, QT > duds::data::GenericSample< VT, QT >::makeCompactSample | ( | ) | const |
Produce a CompactSample using the data in this Sample.
Definition at line 284 of file Sample.hpp.
|
inline |
Produce a CompactSample using the data in this Sample.
Definition at line 136 of file Sample.hpp.
|
inlinestatic |
Returns the value used to represent an unspecified or unknown accuracy, precision, resolution, or error.
Definition at line 88 of file Sample.hpp.
| QT duds::data::GenericSample< VT, QT >::accuracy |
The expected accuracy of the instrument under the conditions in which the sample was taken.
This is how far from correct the value could be.
Definition at line 107 of file Sample.hpp.
Referenced by duds::hardware::devices::clocks::GenericCppClock< CLK, SVT, SQT, TVT, TQT >::sampleTime().
| QT duds::data::GenericSample< VT, QT >::estError |
The estimated error of the observation.
This is primarily to support the estimated error field reported by adjtimex() on Linux, but may have application elsewhere.
Definition at line 120 of file Sample.hpp.
Referenced by duds::hardware::devices::clocks::GenericCppClock< CLK, SVT, SQT, TVT, TQT >::sampleTime().
| boost::uuids::uuid duds::data::GenericSample< VT, QT >::origin |
The UUID for the source instrument of this sample.
If this is nil (all zero), the Sample will be considered clear of data by isClear().
Definition at line 96 of file Sample.hpp.
| QT duds::data::GenericSample< VT, QT >::precision |
The expected precision of the instrument under the conditions in which the sample was taken.
This is how much the sample value may vary when the measured property is the same; think of it as consistency or repeatability.
Definition at line 114 of file Sample.hpp.
Referenced by duds::hardware::devices::clocks::GenericCppClock< CLK, SVT, SQT, TVT, TQT >::sampleTime().
| QT duds::data::GenericSample< VT, QT >::resolution |
The expected resolution of the instrument under the conditions in which the sample was taken.
This is the smallest increment the insturment can represent. Since the Sample object may store the value in different units than the instrument reports, this value is not determined by the types used in the Sample object.
Definition at line 128 of file Sample.hpp.
Referenced by duds::hardware::devices::clocks::GenericCppClock< CLK, SVT, SQT, TVT, TQT >::sampleTime().
| VT duds::data::GenericSample< VT, QT >::value |
The value sampled from the insturment.
This should normally be a Quantity type, or a GenericValue storing a Quantity object.
Definition at line 102 of file Sample.hpp.
Referenced by duds::hardware::devices::clocks::GenericCppClock< CLK, SVT, SQT, TVT, TQT >::sampleTime().