nidas  v1.2-1520
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
nidas::core::SampleT< DataT > Class Template Reference

A typed Sample, with data of type DataT. More...

#include <Sample.h>

Inheritance diagram for nidas::core::SampleT< DataT >:
Inheritance graph
[legend]

Public Member Functions

 SampleT ()
 
 ~SampleT ()
 
sampleType getType () const
 Get the type of the sample. More...
 
unsigned int getDataLength () const
 Get number of elements of type DataT in data. More...
 
void setDataLength (unsigned int val)
 Set the number of elements of type DataT in data. More...
 
void * getVoidDataPtr ()
 Get a void* pointer to the data portion of the sample. More...
 
const void * getConstVoidDataPtr () const
 Get a const void* pointer to the data portion of the sample. More...
 
DataT * getDataPtr ()
 
const DataT * getConstDataPtr () const
 
double getDataValue (unsigned int i) const
 Implementation of virtual method. More...
 
void setDataValue (unsigned int i, double val)
 Implementation of virtual method. More...
 
void setDataValue (unsigned int i, float val)
 Implementation of virtual method. More...
 
unsigned int getAllocLength () const
 Get number of elements allocated in data portion of sample. More...
 
unsigned int getAllocByteLength () const
 Get number of bytes allocated in data portion of sample. More...
 
void allocateData (unsigned int val)
 Allocate data. More...
 
void reallocateData (unsigned int val)
 Re-allocate data, space, keeping contents. More...
 
void freeReference () const
 Decrement the reference count for this sample. More...
 
void setTimeTag (dsm_time_t val)
 
dsm_time_t getTimeTag () const
 Time-tag in non-leap microseconds since Jan 1, 1970 00:00 GMT. More...
 
void setId (dsm_sample_id_t val)
 Set the id portion of the sample header. More...
 
dsm_sample_id_t getId () const
 Get the id portion of the sample header. More...
 
void setRawId (dsm_sample_id_t val)
 Set the full, raw id portion of the sample header. More...
 
dsm_sample_id_t getRawId () const
 
void setSpSId (unsigned int val)
 Set the short id portion of the sample header, containing the sensor + sample ids. More...
 
unsigned int getSpSId () const
 Get the short id portion of the sample header. More...
 
void setDSMId (unsigned int val)
 Set the DSM (data system) id portion of the sample header. More...
 
unsigned int getDSMId () const
 Get the DSM (data system) id portion of the sample header. More...
 
unsigned int getDataByteLength () const
 Get the number of bytes in data portion of sample. More...
 
unsigned int getHeaderLength () const
 Number of bytes in header. More...
 
const void * getHeaderPtr () const
 Get a pointer to the header portion of the sample. More...
 
void holdReference () const
 Increment the reference count for this sample. More...
 

Static Public Member Functions

static unsigned int getMaxDataLength ()
 Maximum number of elements in data. More...
 
static int sizeofDataType ()
 

Protected Member Functions

 SampleT (const SampleT &)
 No copy. More...
 
SampleToperator= (const SampleT &)
 No assignment. More...
 

Protected Attributes

DataT * _data
 Pointer to the actual data. More...
 
unsigned int _allocLen
 Number of bytes allocated in data. More...
 
SampleHeader _header
 
int _refCount
 The reference count. More...
 
nidas::util::Mutex _refLock
 

Static Protected Attributes

static int _nsamps
 Global count of the number of samples in use by a process. More...
 

Detailed Description

template<class DataT>
class nidas::core::SampleT< DataT >

A typed Sample, with data of type DataT.

Constructor & Destructor Documentation

template<class DataT>
nidas::core::SampleT< DataT >::SampleT ( )
inline
template<class DataT>
nidas::core::SampleT< DataT >::~SampleT ( )
inline
template<class DataT>
nidas::core::SampleT< DataT >::SampleT ( const SampleT< DataT > &  )
protected

No copy.

Member Function Documentation

template<class DataT>
void nidas::core::SampleT< DataT >::allocateData ( unsigned int  val)
inlinevirtual

Allocate data.

Parameters
val,:number of DataT's to allocated.

Implements nidas::core::Sample.

template<class DataT >
void nidas::core::SampleT< DataT >::freeReference ( ) const
virtual

Decrement the reference count for this sample.

Free a reference to a sample.

If the reference count is zero, then put the Sample into the SamplePool. freeReference() can be performed on a const Sample. However if at any moment a user of a const Sample has called freeReference more times than they have called holdReference, then they have violated the contract of a const Sample. Once the sample goes back into the sample pool it may be altered.

Samples can be used like normal variables without reference counting: { SampleT< samp; // automatic variable samp.setTimeTag(99); ... } // automatic variable destroyed

Or the reference count capability can be used. Here one saves samples into a buffer, and then later pops them off.

void pushSample(const Sample* samp) { samp->holdReference(); buffer.push_back(samp); } const Sample* popSample() { const Sample* samp = buffer.back(); buffer.pop_back(); samp->freeReference(); return samp; }

// Get sample from SamplePool. // The reference count will be one after the sample // is fetched from the pool - holdReference is // called for you by SamplePool. Sample* samp = SamplePool::getInstance()->getSample(100); ... pushSample(samp); ... samp = popSample(); ... // When you're completely done with it, call freeReference(). samp->freeReference();

Return it to its pool if no-one is using it.

Implements nidas::core::Sample.

References nidas::core::SamplePool< SampleType >::putSample().

Referenced by nidas::core::SampleAverager::flush(), nidas::dynld::isff::MOSMote::process(), nidas::dynld::TSI_CPC3772::process(), nidas::dynld::isff::CSI_CRX_Binary::process(), nidas::dynld::iss::WICORSensor::process(), nidas::dynld::raf::PPT_Serial::process(), TestSource::run(), nidas::dynld::isff::GOESOutput::run(), nidas::core::CharacterSensor::searchSampleScanners(), nidas::core::NearestResamplerAtRate::~NearestResamplerAtRate(), and nidas::dynld::raf::SyncRecordSource::~SyncRecordSource().

template<class DataT>
unsigned int nidas::core::SampleT< DataT >::getAllocByteLength ( ) const
inlinevirtual

Get number of bytes allocated in data portion of sample.

Implements nidas::core::Sample.

template<class DataT>
unsigned int nidas::core::SampleT< DataT >::getAllocLength ( ) const
inlinevirtual

Get number of elements allocated in data portion of sample.

Implements nidas::core::Sample.

Referenced by nidas::core::SampleT< char >::setDataLength().

template<class DataT>
const DataT* nidas::core::SampleT< DataT >::getConstDataPtr ( ) const
inline
template<class DataT>
const void* nidas::core::SampleT< DataT >::getConstVoidDataPtr ( ) const
inlinevirtual

Get a const void* pointer to the data portion of the sample.

Implements nidas::core::Sample.

Referenced by nidas::dynld::TSI_CPC3772::process(), nidas::dynld::iss::WICORSensor::process(), and nidas::core::CharacterSensor::searchSampleScanners().

unsigned int nidas::core::Sample::getDataByteLength ( ) const
inlineinherited
template<class DataT>
unsigned int nidas::core::SampleT< DataT >::getDataLength ( ) const
inlinevirtual

Get number of elements of type DataT in data.

Implements nidas::core::Sample.

Referenced by nidas::dynld::raf::TwoD64_USB::process(), nidas::dynld::TSI_CPC3772::process(), nidas::dynld::raf::CVI_LV_Input::process(), nidas::dynld::isff::PacketInputStream::readSamples(), nidas::dynld::psql::PSQLSampleOutput::receive(), nidas::dynld::raf::CVIProcessor::receive(), nidas::dynld::isff::GOESOutput::receive(), nidas::core::NearestResampler::receive(), nidas::dynld::isff::GOESOutput::run(), nidas::dynld::isff::SE_GOESXmtr::transmitDataSE110(), nidas::dynld::isff::SE_GOESXmtr::transmitDataSE120(), nidas::dynld::isff::WisardMote::unpack100thSec(), nidas::dynld::isff::WisardMote::unpack10thSec(), nidas::dynld::isff::WisardMote::unpackAccumSec(), nidas::dynld::isff::WisardMote::unpackCNR2(), nidas::dynld::isff::WisardMote::unpackGsoil(), nidas::dynld::isff::WisardMote::unpackInt16(), nidas::dynld::isff::WisardMote::unpackInt32(), nidas::dynld::isff::WisardMote::unpackNR01(), nidas::dynld::isff::WisardMote::unpackPicTime(), nidas::dynld::isff::WisardMote::unpackPicTimeFields(), nidas::dynld::isff::WisardMote::unpackPower(), nidas::dynld::isff::WisardMote::unpackQsoil(), nidas::dynld::isff::WisardMote::unpackRlw(), nidas::dynld::isff::WisardMote::unpackRlwKZ(), nidas::dynld::isff::WisardMote::unpackRnet(), nidas::dynld::isff::WisardMote::unpackRsw(), nidas::dynld::isff::WisardMote::unpackRsw2(), nidas::dynld::isff::WisardMote::unpackStatus(), nidas::dynld::isff::WisardMote::unpackTP01(), nidas::dynld::isff::WisardMote::unpackTRH(), nidas::dynld::isff::WisardMote::unpackTsoil(), nidas::dynld::isff::WisardMote::unpackUint16(), nidas::dynld::isff::WisardMote::unpackUint32(), and nidas::dynld::isff::WisardMote::unpackXbee().

template<class DataT>
DataT* nidas::core::SampleT< DataT >::getDataPtr ( )
inline

Referenced by nidas::core::DSMSensor::applyConversions(), nidas::dynld::StatisticsCruncher::computeStats(), nidas::dynld::isff::GOESOutput::connected(), nidas::dynld::isff::NCAR_TRH::convertVariable(), nidas::dynld::ParoSci_202BG_P::createPressureSample(), nidas::dynld::raf::SidsNetSensor::createSamples(), nidas::dynld::raf::TwoD_USB::createSamples(), nidas::core::SampleAverager::flush(), nidas::core::NearestResampler::flush(), nidas::dynld::isff::NCAR_TRH::ifanFilter(), nidas::dynld::raf::SPP300_Serial::process(), nidas::dynld::raf::SPP100_Serial::process(), nidas::dynld::raf::SPP200_Serial::process(), nidas::dynld::raf::Watlow::process(), nidas::dynld::raf::BCPD_Serial::process(), nidas::dynld::raf::CDP_Serial::process(), nidas::dynld::isff::Licor7500::process(), nidas::dynld::iss::TiltSensor::process(), nidas::dynld::raf::PIP_Serial::process(), nidas::dynld::raf::PHIPS_UDP::process(), nidas::dynld::raf::LamsNetSensor::process(), nidas::dynld::isff::ATIK_Sonic::process(), nidas::dynld::raf::TwoD_House::process(), nidas::dynld::isff::CU_Coldwire::process(), nidas::dynld::GPS_Novatel_Serial::process(), nidas::dynld::isff::MOSMote::process(), nidas::dynld::ParoSci_202BG_T::process(), nidas::dynld::TSI_CPC3772::process(), nidas::dynld::GPS_NMEA_Serial::process(), nidas::dynld::isff::CSI_CRX_Binary::process(), nidas::dynld::raf::PSI9116_Sensor::process(), nidas::dynld::isff::CSI_IRGA_Sonic::process(), nidas::dynld::iss::WICORSensor::process(), nidas::dynld::IEEE_Float::process(), nidas::dynld::isff::NCAR_TRH::process(), nidas::dynld::raf::UHSAS_Serial::process(), nidas::dynld::raf::CVI_LV_Input::process(), nidas::dynld::raf::LamsSensor::process(), nidas::dynld::raf::PPT_Serial::process(), nidas::dynld::IR104_Relays::process(), nidas::dynld::raf::A2DBoardTempSensor::process(), nidas::dynld::A2DSensor::process(), nidas::dynld::isff::CSAT3_Sonic::process(), nidas::dynld::DSC_Event::process(), nidas::dynld::DSC_PulseCounter::process(), nidas::dynld::isff::Wind2D::process(), nidas::dynld::raf::A2D_Serial::process(), nidas::dynld::DSC_FreqCounter::process(), nidas::dynld::raf::IRIGSensor::process(), nidas::dynld::raf::DSMAnalogSensor::process(), nidas::dynld::WxtSensor::process(), nidas::dynld::raf::DSMArincSensor::process(), nidas::dynld::raf::DSMArincSensor::processAlta(), nidas::dynld::raf::TwoD64_USB::processSOR(), nidas::dynld::raf::TwoD64_USB_v3::processSOR(), nidas::dynld::raf::DSMAnalogSensor::processTemperature(), nidas::dynld::isff::PacketInputStream::readSamples(), nidas::dynld::isff::GOESOutput::receive(), nidas::core::NearestResampler::receive(), nidas::core::SampleAverager::receive(), nidas::dynld::isff::GOESOutput::run(), nidas::core::CharacterSensor::searchSampleScanners(), nidas::dynld::raf::SyncRecordSource::sendSyncHeader(), nidas::core::DSMSensor::trimUnparsed(), nidas::dynld::isff::WisardMote::unpack100thSec(), nidas::dynld::isff::WisardMote::unpack10thSec(), nidas::dynld::isff::WisardMote::unpackAccumSec(), nidas::dynld::isff::WisardMote::unpackCNR2(), nidas::dynld::isff::WisardMote::unpackGsoil(), nidas::dynld::isff::WisardMote::unpackInt16(), nidas::dynld::isff::WisardMote::unpackInt32(), nidas::dynld::isff::WisardMote::unpackNR01(), nidas::dynld::isff::WisardMote::unpackPicTime(), nidas::dynld::isff::WisardMote::unpackPicTimeFields(), nidas::dynld::isff::WisardMote::unpackPower(), nidas::dynld::isff::WisardMote::unpackQsoil(), nidas::dynld::isff::WisardMote::unpackRlw(), nidas::dynld::isff::WisardMote::unpackRlwKZ(), nidas::dynld::isff::WisardMote::unpackRnet(), nidas::dynld::isff::WisardMote::unpackRsw(), nidas::dynld::isff::WisardMote::unpackRsw2(), nidas::dynld::isff::WisardMote::unpackStatus(), nidas::dynld::isff::WisardMote::unpackTP01(), nidas::dynld::isff::WisardMote::unpackTRH(), nidas::dynld::isff::WisardMote::unpackTsoil(), nidas::dynld::isff::WisardMote::unpackUint16(), nidas::dynld::isff::WisardMote::unpackUint32(), nidas::dynld::isff::WisardMote::unpackXbee(), and ARLIngest::writeLine().

template<class DataT>
double nidas::core::SampleT< DataT >::getDataValue ( unsigned int  i) const
inlinevirtual

Implementation of virtual method.

Implements nidas::core::Sample.

unsigned int nidas::core::Sample::getDSMId ( ) const
inlineinherited

Get the DSM (data system) id portion of the sample header.

References nidas::core::Sample::_header, and nidas::core::SampleHeader::getDSMId().

Referenced by NidsMerge::receiveAllowedDsm(), and NidsMerge::run().

unsigned int nidas::core::Sample::getHeaderLength ( ) const
inlineinherited
const void* nidas::core::Sample::getHeaderPtr ( ) const
inlineinherited

Get a pointer to the header portion of the sample.

References nidas::core::Sample::_header.

Referenced by nidas::core::operator<<().

dsm_sample_id_t nidas::core::Sample::getId ( ) const
inlineinherited
template<class DataT>
static unsigned int nidas::core::SampleT< DataT >::getMaxDataLength ( )
inlinestatic
dsm_sample_id_t nidas::core::Sample::getRawId ( ) const
inlineinherited
unsigned int nidas::core::Sample::getSpSId ( ) const
inlineinherited

Get the short id portion of the sample header.

This is the portion of the id without the DSM id.

References nidas::core::Sample::_header, and nidas::core::SampleHeader::getSpSId().

Referenced by NidsMerge::run().

dsm_time_t nidas::core::Sample::getTimeTag ( ) const
inlineinherited

Time-tag in non-leap microseconds since Jan 1, 1970 00:00 GMT.

References nidas::core::Sample::_header, and nidas::core::SampleHeader::getTimeTag().

Referenced by SampleToDatabase::accumulate(), SampleCounter::accumulateData(), SampleCounter::accumulateSample(), nidas::dynld::BlockStats::addGoodSample(), nidas::core::SampleClock::addSampleDate(), nidas::core::CharacterSensor::adjustTimeTag(), nidas::core::DSMSensor::applyConversions(), nidas::dynld::raf::A2D_Serial::checkCkSum(), nidas::dynld::raf::SyncRecordSource::checkTime(), nidas::dynld::raf::SyncRecordSource::computeSlotIndex(), nidas::dynld::isff::NCAR_TRH::convertVariable(), nidas::dynld::BlockStats::endBadBlock(), nidas::dynld::raf::SyncServer::handleSample(), nidas::dynld::isff::NCAR_TRH::ifanFilter(), nidas::core::SampleMatcher::match(), nidas::dynld::raf::SyncServer::openStream(), nidas::core::SampleTimetagComparator::operator()(), nidas::core::SampleHeaderComparator::operator()(), nidas::core::FullSampleComparator::operator()(), nidas::dynld::raf::TwoD64_USB::process(), nidas::dynld::raf::SPP300_Serial::process(), nidas::dynld::raf::BCPD_Serial::process(), nidas::dynld::raf::CDP_Serial::process(), nidas::dynld::raf::SPP100_Serial::process(), nidas::dynld::raf::SPP200_Serial::process(), nidas::dynld::raf::Watlow::process(), nidas::dynld::isff::Licor7500::process(), nidas::dynld::raf::PIP_Serial::process(), nidas::dynld::raf::LamsNetSensor::process(), nidas::dynld::isff::ATIK_Sonic::process(), nidas::dynld::isff::CU_Coldwire::process(), nidas::dynld::TSI_CPC3772::process(), nidas::dynld::iss::WICORSensor::process(), nidas::dynld::IEEE_Float::process(), nidas::dynld::isff::CSI_IRGA_Sonic::process(), nidas::dynld::raf::UHSAS_Serial::process(), nidas::dynld::isff::Wind3D::process(), nidas::dynld::raf::CVI_LV_Input::process(), nidas::dynld::raf::VCSEL_Serial::process(), nidas::dynld::isff::CSAT3_Sonic::process(), nidas::dynld::isff::Wind2D::process(), nidas::dynld::raf::DSMAnalogSensor::process(), nidas::dynld::WxtSensor::process(), nidas::dynld::raf::SyncRecordReader::read(), nidas::dynld::isff::GOESOutput::receive(), nidas::core::NearestResampler::receive(), nidas::core::SampleAverager::receive(), nidas::dynld::raf::SyncRecordSource::receive(), MergeVerifier::reportBackward(), MergeVerifier::reportDuplicate(), MergeVerifier::reportMissing(), nidas::core::MessageStreamScanner::requestBiggerSample(), DataStats::restartStats(), MergeVerifier::run(), NidsMerge::run(), SensorExtract::run(), DmdA2dCk::run(), nidas::dynld::isff::GOESOutput::run(), nidas::core::SampleSorter::run(), nidas::dynld::raf::SyncRecordReader::scanHeader(), nidas::dynld::raf::SyncRecordSource::sendSyncHeader(), nidas::dynld::raf::SyncRecordSource::sendSyncRecord(), nidas::dynld::raf::Extract2D::setTimeStamp(), nidas::dynld::isff::WisardMote::unpack10thSec(), nidas::dynld::isff::WisardMote::unpackAccumSec(), and nidas::dynld::isff::WisardMote::unpackTsoil().

template<class DataT>
sampleType nidas::core::SampleT< DataT >::getType ( ) const
inlinevirtual

Get the type of the sample.

Implements nidas::core::Sample.

template<class DataT>
void* nidas::core::SampleT< DataT >::getVoidDataPtr ( )
inlinevirtual

Get a void* pointer to the data portion of the sample.

Implements nidas::core::Sample.

Referenced by nidas::core::MessageStreamScanner::requestBiggerSample().

void nidas::core::Sample::holdReference ( ) const
inlineinherited

Increment the reference count for this sample.

Sample supports a form of reference counting. See freeReference. We have to use a hack-like cast of the this pointer to a const so that holdReference can be used on a const Sample. The SamplePool class supports Sample reference counting.

References nidas::core::Sample::_refCount, nidas::core::Sample::_refLock, nidas::util::Mutex::lock(), and nidas::util::Mutex::unlock().

template<class DataT>
SampleT& nidas::core::SampleT< DataT >::operator= ( const SampleT< DataT > &  )
protected

No assignment.

template<class DataT>
void nidas::core::SampleT< DataT >::reallocateData ( unsigned int  val)
inlinevirtual

Re-allocate data, space, keeping contents.

Parameters
val,:number of DataT's to allocated.

Implements nidas::core::Sample.

template<class DataT>
void nidas::core::SampleT< DataT >::setDataLength ( unsigned int  val)
inlinevirtual
template<class DataT>
void nidas::core::SampleT< DataT >::setDataValue ( unsigned int  i,
double  val 
)
inlinevirtual

Implementation of virtual method.

Implements nidas::core::Sample.

template<class DataT>
void nidas::core::SampleT< DataT >::setDataValue ( unsigned int  i,
float  val 
)
inlinevirtual

Implementation of virtual method.

Implements nidas::core::Sample.

void nidas::core::Sample::setDSMId ( unsigned int  val)
inlineinherited

Set the DSM (data system) id portion of the sample header.

References nidas::core::Sample::_header, and nidas::core::SampleHeader::setDSMId().

Referenced by ARLIngest::writeLine().

void nidas::core::Sample::setId ( dsm_sample_id_t  val)
inlineinherited

Set the id portion of the sample header.

The id typically identifies the data system and sensor of origin of the sample.

References nidas::core::Sample::_header, and nidas::core::SampleHeader::setId().

Referenced by nidas::dynld::StatisticsCruncher::computeStats(), nidas::dynld::isff::GOESOutput::connected(), nidas::dynld::ParoSci_202BG_P::createPressureSample(), nidas::dynld::raf::SidsNetSensor::createSamples(), nidas::dynld::raf::TwoD_USB::createSamples(), nidas::core::SampleAverager::flush(), nidas::core::NearestResampler::flush(), nidas::dynld::isff::NCAR_TRH::ifanFilter(), nidas::core::DriverSampleScanner::nextSample(), nidas::core::MessageStreamScanner::nextSampleByLength(), nidas::core::MessageStreamScanner::nextSampleSepBOM(), nidas::core::MessageStreamScanner::nextSampleSepEOM(), nidas::dynld::raf::SPP300_Serial::process(), nidas::dynld::raf::CDP_Serial::process(), nidas::dynld::raf::SPP100_Serial::process(), nidas::dynld::raf::SPP200_Serial::process(), nidas::dynld::raf::Watlow::process(), nidas::dynld::raf::BCPD_Serial::process(), nidas::dynld::iss::TiltSensor::process(), nidas::dynld::isff::Licor7500::process(), nidas::dynld::raf::PHIPS_UDP::process(), nidas::dynld::raf::PIP_Serial::process(), nidas::dynld::isff::ATIK_Sonic::process(), nidas::dynld::raf::LamsNetSensor::process(), nidas::dynld::isff::CU_Coldwire::process(), nidas::dynld::raf::TwoD_House::process(), nidas::dynld::GPS_Novatel_Serial::process(), nidas::dynld::ParoSci_202BG_T::process(), nidas::dynld::isff::MOSMote::process(), nidas::dynld::TSI_CPC3772::process(), nidas::dynld::GPS_NMEA_Serial::process(), nidas::dynld::isff::CSI_CRX_Binary::process(), nidas::dynld::raf::PSI9116_Sensor::process(), nidas::dynld::iss::WICORSensor::process(), nidas::dynld::IEEE_Float::process(), nidas::dynld::isff::CSI_IRGA_Sonic::process(), nidas::dynld::raf::UHSAS_Serial::process(), nidas::dynld::raf::CVI_LV_Input::process(), nidas::dynld::raf::PPT_Serial::process(), nidas::dynld::raf::LamsSensor::process(), nidas::dynld::IR104_Relays::process(), nidas::dynld::raf::A2DBoardTempSensor::process(), nidas::dynld::A2DSensor::process(), nidas::dynld::isff::CSAT3_Sonic::process(), nidas::dynld::DSC_PulseCounter::process(), nidas::dynld::DSC_Event::process(), nidas::dynld::isff::Wind2D::process(), nidas::dynld::raf::A2D_Serial::process(), nidas::dynld::DSC_FreqCounter::process(), nidas::dynld::raf::IRIGSensor::process(), nidas::dynld::raf::DSMAnalogSensor::process(), nidas::dynld::WxtSensor::process(), nidas::dynld::raf::DSMArincSensor::process(), nidas::dynld::isff::WisardMote::process(), nidas::dynld::raf::DSMArincSensor::processAlta(), nidas::dynld::raf::TwoD64_USB::processSOR(), nidas::dynld::raf::TwoD64_USB_v3::processSOR(), nidas::dynld::raf::DSMAnalogSensor::processTemperature(), nidas::dynld::isff::PacketInputStream::readSamples(), nidas::core::NearestResampler::receive(), nidas::core::SampleAverager::receive(), nidas::core::MessageStreamScanner::requestBiggerSample(), SensorExtract::run(), TestSource::run(), nidas::dynld::isff::GOESOutput::run(), nidas::dynld::SampleInputStream::sampleFromHeader(), nidas::core::CharacterSensor::searchSampleScanners(), and nidas::dynld::raf::SyncRecordSource::sendSyncHeader().

void nidas::core::Sample::setRawId ( dsm_sample_id_t  val)
inlineinherited

Set the full, raw id portion of the sample header.

This method is not typically used except when doing raw IO on a sample. The raw id contains an enumeration of the sample type, along with the fields returned by getId().

References nidas::core::Sample::_header, and nidas::core::SampleHeader::setRawId().

void nidas::core::Sample::setSpSId ( unsigned int  val)
inlineinherited

Set the short id portion of the sample header, containing the sensor + sample ids.

This is the portion of the id without the DSM id.

References nidas::core::Sample::_header, and nidas::core::SampleHeader::setSpSId().

Referenced by ARLIngest::writeLine().

void nidas::core::Sample::setTimeTag ( dsm_time_t  val)
inlineinherited

References nidas::core::Sample::_header, and nidas::core::SampleHeader::setTimeTag().

Referenced by nidas::core::SampleClock::addSampleDate(), nidas::core::CharacterSensor::adjustTimeTag(), nidas::dynld::raf::SyncRecordSource::allocateRecord(), nidas::dynld::StatisticsCruncher::computeStats(), nidas::dynld::isff::GOESOutput::connected(), nidas::dynld::ParoSci_202BG_P::createPressureSample(), nidas::dynld::raf::SidsNetSensor::createSamples(), nidas::dynld::raf::TwoD_USB::createSamples(), nidas::core::SampleAverager::flush(), nidas::core::NearestResampler::flush(), NidsMerge::flushSorter(), nidas::dynld::isff::NCAR_TRH::ifanFilter(), nidas::core::DriverSampleScanner::nextSample(), nidas::core::DatagramSampleScanner::nextSample(), nidas::core::MessageStreamScanner::nextSampleByLength(), nidas::core::MessageStreamScanner::nextSampleSepBOM(), nidas::core::MessageStreamScanner::nextSampleSepEOM(), nidas::dynld::raf::SPP300_Serial::process(), nidas::dynld::raf::Watlow::process(), nidas::dynld::raf::BCPD_Serial::process(), nidas::dynld::raf::CDP_Serial::process(), nidas::dynld::raf::SPP100_Serial::process(), nidas::dynld::raf::SPP200_Serial::process(), nidas::dynld::isff::Licor7500::process(), nidas::dynld::iss::TiltSensor::process(), nidas::dynld::raf::PHIPS_UDP::process(), nidas::dynld::raf::PIP_Serial::process(), nidas::dynld::raf::TwoD_House::process(), nidas::dynld::isff::ATIK_Sonic::process(), nidas::dynld::raf::LamsNetSensor::process(), nidas::dynld::isff::CU_Coldwire::process(), nidas::dynld::GPS_Novatel_Serial::process(), nidas::dynld::isff::MOSMote::process(), nidas::dynld::ParoSci_202BG_T::process(), nidas::dynld::TSI_CPC3772::process(), nidas::dynld::GPS_NMEA_Serial::process(), nidas::dynld::isff::CSI_CRX_Binary::process(), nidas::dynld::raf::PSI9116_Sensor::process(), nidas::dynld::iss::WICORSensor::process(), nidas::dynld::IEEE_Float::process(), nidas::dynld::isff::CSI_IRGA_Sonic::process(), nidas::dynld::raf::UHSAS_Serial::process(), nidas::dynld::raf::CVI_LV_Input::process(), nidas::dynld::raf::PPT_Serial::process(), nidas::dynld::raf::LamsSensor::process(), nidas::dynld::raf::VCSEL_Serial::process(), nidas::dynld::IR104_Relays::process(), nidas::dynld::raf::A2DBoardTempSensor::process(), nidas::dynld::A2DSensor::process(), nidas::dynld::isff::CSAT3_Sonic::process(), nidas::dynld::DSC_PulseCounter::process(), nidas::dynld::DSC_Event::process(), nidas::dynld::isff::Wind2D::process(), nidas::dynld::raf::A2D_Serial::process(), nidas::dynld::DSC_FreqCounter::process(), nidas::dynld::raf::IRIGSensor::process(), nidas::dynld::raf::DSMAnalogSensor::process(), nidas::dynld::WxtSensor::process(), nidas::dynld::raf::DSMArincSensor::process(), nidas::dynld::isff::WisardMote::process(), nidas::dynld::raf::DSMArincSensor::processAlta(), nidas::dynld::raf::TwoD64_USB::processSOR(), nidas::dynld::raf::TwoD64_USB_v3::processSOR(), nidas::dynld::raf::DSMAnalogSensor::processTemperature(), nidas::dynld::isff::PacketInputStream::readSamples(), nidas::core::NearestResampler::receive(), nidas::core::SampleAverager::receive(), nidas::core::MessageStreamScanner::requestBiggerSample(), MergeVerifier::run(), TestSource::run(), nidas::dynld::isff::GOESOutput::run(), nidas::core::SampleSorter::run(), nidas::dynld::SampleInputStream::sampleFromHeader(), nidas::core::CharacterSensor::searchSampleScanners(), nidas::dynld::raf::SyncRecordSource::sendSyncHeader(), and ARLIngest::writeLine().

template<class DataT>
static int nidas::core::SampleT< DataT >::sizeofDataType ( )
inlinestatic

Member Data Documentation

template<class DataT>
unsigned int nidas::core::SampleT< DataT >::_allocLen
protected
template<class DataT>
DataT* nidas::core::SampleT< DataT >::_data
protected
SampleHeader nidas::core::Sample::_header
protectedinherited
int Sample::_nsamps
staticprotectedinherited

Global count of the number of samples in use by a process.

Incremented in the constructor, decremented in the destructor. Useful for development debugging to track leaks.

Referenced by nidas::core::Sample::Sample(), and nidas::core::Sample::~Sample().

int nidas::core::Sample::_refCount
mutableprotectedinherited

The reference count.

Referenced by nidas::core::Sample::holdReference().

nidas::util::Mutex nidas::core::Sample::_refLock
mutableprotectedinherited

The documentation for this class was generated from the following file: