nidas v1.2.3
|
The gcc buildin atomic operations are not supported on arm, and one must use -march=i686 for them to work on 32 bit x86. More...
#include <Sample.h>
Public Member Functions | |
SampleHeader (sampleType t=CHAR_ST) | |
dsm_time_t | getTimeTag () const |
void | setTimeTag (dsm_time_t val) |
unsigned int | getDataByteLength () const |
Get the value of the length member of the header. | |
void | setDataByteLength (unsigned int val) |
Set the length member of the header. | |
dsm_sample_id_t | getId () const |
void | setId (dsm_sample_id_t val) |
dsm_sample_id_t | getRawId () const |
void | setRawId (dsm_sample_id_t val) |
unsigned int | getDSMId () const |
Get the DSM identifier for the sample. | |
void | setDSMId (unsigned int val) |
unsigned int | getSpSId () const |
Get the sample identifier for the sample. | |
void | setSpSId (unsigned int val) |
unsigned char | getType () const |
Get the data type of this sample. | |
Static Public Member Functions | |
static unsigned int | getSizeOf () |
static unsigned int | getMaxDataLength () |
Protected Attributes | |
dsm_time_t | _tt |
Time-tag in non-leap microseconds since Jan 1, 1970 00:00 GMT. | |
dsm_sample_length_t | _length |
Length of data (# of bytes) in the sample - does not include header fields. | |
dsm_sample_id_t | _tid |
An identifier for this sample consisting of packed bit fields. | |
The gcc buildin atomic operations are not supported on arm, and one must use -march=i686 for them to work on 32 bit x86.
The header fields of a Sample: a time_tag, a data length field, and an identifier.
|
inline |
Get the value of the length member of the header.
This is the length in bytes of the data portion of the sample.
References _length.
Referenced by PacketReader::checkPacket(), nidas::core::Sample::getDataByteLength(), nidas::dynld::SampleInputStream::nextSample(), nidas::core::operator<<(), and nidas::dynld::SampleInputStream::sampleFromHeader().
Get the DSM identifier for the sample.
References _tid, and GET_DSM_ID.
Referenced by nidas::core::Sample::getDSMId().
|
inline |
References _tid, and GET_FULL_ID.
Referenced by PacketReader::checkPacket(), nidas::core::Sample::getId(), nidas::core::operator<<(), and nidas::dynld::SampleInputStream::sampleFromHeader().
References nidas::core::maxValue().
Referenced by nidas::core::SampleT< DataT >::getMaxDataLength().
|
inline |
References _tid.
Referenced by nidas::core::Sample::getRawId(), and nidas::dynld::SampleInputStream::nextSample().
Referenced by PacketReader::checkPacket(), nidas::dynld::SampleInputStream::checkUnexpectedEOF(), nidas::core::Sample::getHeaderLength(), nidas::dynld::SampleInputStream::nextSample(), nidas::dynld::SampleInputStream::parseInputHeader(), nidas::dynld::UDPSampleOutput::receive(), nidas::dynld::SampleInputStream::sampleFromHeader(), and nidas::dynld::SampleOutputStream::write().
Get the sample identifier for the sample.
References _tid, and GET_SPS_ID.
Referenced by nidas::core::Sample::getSpSId().
|
inline |
Get the data type of this sample.
The type can only be set in the constructor.
References _tid, and GET_SAMPLE_TYPE.
Referenced by PacketReader::checkPacket(), nidas::core::operator<<(), and nidas::dynld::SampleInputStream::sampleFromHeader().
Set the length member of the header.
This is the length in bytes.
References _length, and nidas::core::getSample().
Referenced by nidas::dynld::SampleInputStream::nextSample(), nidas::dynld::UDPSampleOutput::receive(), and nidas::core::SampleT< DataT >::setDataLength().
References _tid, and SET_DSM_ID.
Referenced by nidas::core::Sample::setDSMId().
|
inline |
References _tid, and SET_FULL_ID.
Referenced by nidas::core::Sample::setId().
|
inline |
References _tid, and nidas::core::getSample().
Referenced by nidas::dynld::SampleInputStream::nextSample(), nidas::dynld::UDPSampleOutput::receive(), and nidas::core::Sample::setRawId().
References _tid, and SET_SPS_ID.
Referenced by nidas::core::Sample::setSpSId().
|
inline |
References _tt, and nidas::core::getSample().
Referenced by nidas::dynld::SampleInputStream::nextSample(), nidas::dynld::UDPSampleOutput::receive(), and nidas::core::Sample::setTimeTag().
|
protected |
Length of data (# of bytes) in the sample - does not include header fields.
Referenced by getDataByteLength(), and setDataByteLength().
|
protected |
An identifier for this sample consisting of packed bit fields.
The most significant 6 bits are a data type enumeration (float, double etc), which is accessed with set/getType().
The other 26 bits are the sample identifier, which is further broken into 10 bits of a DSM identifier, acccessed with get/setDSMId(), and 16 bits of a sensor/sample identifier, accessed with get/setSpSId().
Referenced by getDSMId(), getId(), getRawId(), getSpSId(), getType(), setDSMId(), setId(), setRawId(), and setSpSId().
|
protected |
Time-tag in non-leap microseconds since Jan 1, 1970 00:00 GMT.
Referenced by getTimeTag(), and setTimeTag().