|
typedef long | gps_second_type |
| Type second portion of a gps time.
|
|
typedef long | gps_nanosecond_type |
| Type nano second portion of a gps time.
|
|
typedef size_t | size_type |
| Type appropriate for length.
|
|
typedef std::vector< unsigned char > | data_type |
| Storage type for the data.
|
|
enum | channel_type {
CHANNEL_TYPE_UNKNOWN = 0
, CHANNEL_TYPE_ONLINE = ( 1 << 0 )
, CHANNEL_TYPE_RAW = ( 1 << 1 )
, CHANNEL_TYPE_RDS = ( 1 << 2 )
,
CHANNEL_TYPE_STREND = ( 1 << 3 )
, CHANNEL_TYPE_MTREND = ( 1 << 4 )
, CHANNEL_TYPE_TEST_POINT = ( 1 << 5 )
, CHANNEL_TYPE_STATIC = ( 1 << 6 )
} |
|
enum | data_type {
DATA_TYPE_UNKNOWN = 0
, DATA_TYPE_INT16 = ( 1 << 0 )
, DATA_TYPE_INT32 = ( 1 << 1 )
, DATA_TYPE_INT64 = ( 1 << 2 )
,
DATA_TYPE_FLOAT32 = ( 1 << 3 )
, DATA_TYPE_FLOAT64 = ( 1 << 4 )
, DATA_TYPE_COMPLEX32
, DATA_TYPE_UINT32 = ( 1 << 6 )
} |
| Defines the internal data representation. More...
|
|
typedef double | sample_rate_type |
| Defines the sample rate type.
|
|
typedef float | signal_gain_type |
| Defines the gain type.
|
|
typedef float | signal_slope_type |
| Defines the slope type.
|
|
typedef float | signal_offset_type |
| Defines the offset type.
|
|
typedef size_t | size_type |
| Defines sizes when dealing with channels.
|
|
typedef std::vector< std::string > | channel_names_type |
| A vector of channel names.
|
|
|
DLL_EXPORT | buffer () |
| Default constructor.
|
|
DLL_EXPORT | buffer (const channel &ChannelInfo, gps_second_type Second, gps_nanosecond_type NanoSecond, const void *Buffer, size_type BufferSize) |
| Constructor.
|
|
DLL_EXPORT | buffer (const channel &ChannelInfo, gps_second_type Second, gps_nanosecond_type NanoSecond, data_type &&Buffer) |
| Constructor.
|
|
DLL_EXPORT size_type | Samples () const |
| Retrieve the number of samples being stored.
|
|
DLL_EXPORT gps_second_type | Start () const |
| Retrieve the GPS start second of the data.
|
|
DLL_EXPORT gps_nanosecond_type | StartNano () const |
| Retrieve the GPS start nano second of the data.
|
|
DLL_EXPORT gps_second_type | Stop () const |
| Retrieve the GPS stop second of the data.
|
|
DLL_EXPORT gps_nanosecond_type | StopNano () const |
| Retrieve the GPS stop nanosecond of the data.
|
|
DLL_EXPORT void | swap (buffer &Source) |
| Exchange the contents of this container with another.
|
|
DLL_EXPORT void | resize (size_type N) |
| Resize the container to hold N elements.
|
|
template<typename T > |
const T * | cbegin () const |
| Return a constant data iterator for this buffer, that references the beginning of the data.
|
|
template<typename T > |
const T * | cend () const |
| Return a constant data iterator for this buffer, that references the just after the end of the data.
|
|
template<typename T > |
const T & | at (size_type index) const |
| This is a type aware, bounds checked lookup in the buffer.
|
|
DLL_EXPORT gps_second_type | samples_to_seconds (size_type offset_samples) const |
| Convert relative sample offsets to relative second offsets.
|
|
DLL_EXPORT gps_second_type | samples_to_trailing_nanoseconds (size_type offset_samples) const |
| Given a sample count, determine how many seconds and nanoseconds worth of data are avaialble, and return the nanosecond count.
|
|
DLL_EXPORT size_type | bytes_to_samples (size_type offset_bytes) const |
| Convert relative byte offsets to relative sample offsets.
|
|
DLL_EXPORT size_type | seconds_to_samples (gps_second_type offset_seconds, gps_nanosecond_type offset_nano=0) const |
| Convert relative second offsets to relative sample offsets.
|
|
DLL_EXPORT size_type | samples_to_bytes (size_type offset_samples) const |
| Convert relative sample offsets to relative byte offsets.
|
|
DLL_EXPORT void | reset_channel_info (const channel &ChannelInfo, gps_second_type Second, gps_nanosecond_type NanoSecond) |
| Reset the channel type. Set the sample count to 0.
|
|
DLL_EXPORT | channel () |
| Default constructor.
|
|
DLL_EXPORT | channel (const channel &Source) |
| Copy constructor.
|
|
DLL_EXPORT | channel (const std::string &Name, channel_type Type, data_type DataType, sample_rate_type SampleRate, signal_gain_type Gain, signal_slope_type Slope, signal_offset_type Offset, std::string Units) |
| Create a channel object.
|
|
DLL_EXPORT const std::string & | Name () const |
| Return the channel name.
|
|
DLL_EXPORT std::string | NameLong () const |
| Return the name with additional information.
|
|
DLL_EXPORT channel_type | Type () const |
| Return the type of the channel.
|
|
DLL_EXPORT data_type | DataType () const |
| Return the data type of the channel.
|
|
DLL_EXPORT size_type | DataTypeSize () const |
| Return the size in bytes of an individual sample from the channel.
|
|
DLL_EXPORT sample_rate_type | SampleRate () const |
| Return the sample rate of the channel.
|
|
DLL_EXPORT signal_gain_type | Gain () const |
| Return the gain of the channel.
|
|
DLL_EXPORT signal_slope_type | Slope () const |
| Return the slope of the channel.
|
|
DLL_EXPORT signal_offset_type | Offset () const |
| Return the offset of the channel.
|
|
DLL_EXPORT const std::string & | Units () const |
| Return the units of this channel.
|
|
DLL_EXPORT void | swap (channel &Source) |
| Swap this channel with another.
|
|
|
static DLL_EXPORT channel_type | convert_daq_chantype (int ChanType) |
| Convert from the legacy daqd channel types to a channel_type enum.
|
|
static DLL_EXPORT data_type | convert_daq_datatype (int DataType) |
| Convert from the legacy daqd data types to a data_type enum.
|
|
static DLL_EXPORT const std::string & | ToString (channel_type ChannelType) |
| Return a string representatino of the given channel_type.
|
|
static DLL_EXPORT const std::string & | ToString (data_type DataType) |
| Return a string representatino of the given data_type.
|
|
static DLL_EXPORT bool | IsSecondTrend (const std::string &Name) |
| Check the channel name to see if it is a second trend.
|
|
static DLL_EXPORT bool | IsMinuteTrend (const std::string &Name) |
| Check the channel name to see if it is a minute trend.
|
|
static DLL_EXPORT const channel_type | DEFAULT_CHANNEL_MASK |
| The combination of all valid channel types.
|
|
static DLL_EXPORT const data_type | DEFAULT_DATA_MASK |
| The combinatino of all valid data types.
|
|
static DLL_EXPORT const sample_rate_type | MIN_SAMPLE_RATE = 0.0f |
| Smallest sample rate possible.
|
|
static DLL_EXPORT const sample_rate_type | MAX_SAMPLE_RATE = 1e12f |
| Largest sample rate possible.
|
|
A buffer holds the data contents of a channel.
This class facilitates the storage of data and accompanying meta data.