|
nidas v1.2.3
|
#include "SampleLengthException.h"#include <nidas/util/ThreadSupport.h>#include <nidas/util/MutexCount.h>#include <nidas/util/time_constants.h>#include <nidas/linux/types.h>#include <climits>#include <iostream>#include <cstring>#include <initializer_list>#include <cmath>#include "sample_type_traits.h"#include "SamplePool.h"Go to the source code of this file.
Classes | |
| class | nidas::core::SampleHeader |
| 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... | |
| class | nidas::core::Sample |
| Interface to a data sample. More... | |
| class | nidas::core::SampleT< DataT > |
| A typed Sample, with data of type DataT. More... | |
| class | nidas::core::SampleChar |
Namespaces | |
| namespace | nidas |
| Root namespace for the NCAR In-Situ Data Acquisition Software. | |
| namespace | nidas::core |
| The essential core classes of nidas. | |
Macros | |
| #define | GET_SAMPLE_TYPE(tid) ((tid) >> 26) |
| macros to get and set fields of the tid member of a Sample. | |
| #define | SET_SAMPLE_TYPE(tid, val) (((tid) & 0x03ffffff) | ((unsigned int)(val) << 26)) |
| #define | GET_FULL_ID(tid) ((tid) & 0x03ffffff) |
| #define | SET_FULL_ID(tid, val) (((tid) & 0xfc000000) | ((val) & 0x03ffffff)) |
| #define | GET_DSM_ID(tid) (((tid) & 0x03ff0000) >> 16) |
| #define | SET_DSM_ID(tid, val) (((tid) & 0xfc00ffff) | (((unsigned int)(val) & 0x3ff) << 16)) |
| #define | GET_SPS_ID(tid) ((tid) & 0xffff) |
| #define | GET_SHORT_ID(tid) ((tid) & 0xffff) |
| #define | SET_SPS_ID(tid, val) (((tid) & 0xffff0000) | ((val) & 0xffff)) |
| #define | SET_SHORT_ID(tid, val) (((tid) & 0xffff0000) | ((val) & 0xffff)) |
| #define | MUTEX_PROTECT_REF_COUNTS |
| Whether to use mutexes to make sure the reference count increments and decrement-and-test operations are atomic. | |
Typedefs | |
| typedef long long | nidas::core::dsm_time_t |
| Posix time in microseconds, the number of non-leap microseconds since 1970 Jan 1 00:00 UTC. | |
| typedef unsigned int | nidas::core::dsm_sample_id_t |
Functions | |
| Sample * | nidas::core::getSample (sampleType type, unsigned int len) |
| A convienence method for getting a sample of an enumerated type from a pool. | |
| template<class T > | |
| SampleT< T > * | nidas::core::getSample (unsigned int len) |
| A convenience function for getting a typed sample from a pool. | |
| SampleT< char > * | nidas::core::getSample (const char *data) |
| Get a char sample from the pool filled with the given null-terminated string data. | |
Variables | |
| const float | nidas::core::floatNAN = nanf("") |
| Value of a float NAN for general use. | |
| const double | nidas::core::doubleNAN = nan("") |
| #define GET_DSM_ID | ( | tid | ) | (((tid) & 0x03ff0000) >> 16) |
Referenced by nidas::dynld::StatisticsProcessor::addRequestedSampleTag(), nidas::core::SampleClock::addSampleDate(), nidas::core::DSMSensor::addSampleTag(), nidas::core::TimetagAdjuster::adjust(), nidas::dynld::StatisticsCruncher::attach(), PacketReader::checkPacket(), SampleCounter::collectMetadata(), nidas::core::NearestResamplerAtRate::connect(), nidas::core::SamplePipeline::connect(), nidas::dynld::raf::CVIProcessor::connectSource(), nidas::core::NearestResampler::ctorCommon(), nidas::core::Site::findSensor(), nidas::core::SampleSorter::flush(), nidas::core::NidasApp::formatId(), nidas::core::SampleTag::fromDOMElement(), SampleCounter::generateStreamId(), nidas::core::DSMSensor::getDSMId(), nidas::core::SampleHeader::getDSMId(), nidas::core::SampleTag::getDSMId(), nidas::core::Project::getUniqueSampleId(), nidas::dynld::ParoSci_202BG_P::init(), nidas::dynld::ParoSci_202BG_T::init(), nidas::core::BadSampleFilter::invalidSampleHeader(), nidas::core::TimetagAdjuster::log(), nidas::core::SampleMatcher::match(), nidas::core::SampleTracer::msg(), nidas::core::SampleTracer::msg(), nidas::core::NearestResamplerAtRate::NearestResamplerAtRate(), nidas::core::operator<<(), DataStats::printReport(), nidas::dynld::isff::Wind2D::process(), nidas::dynld::isff::WisardMote::process(), nidas::dynld::raf::DSMMesaSensor::process(), nidas::core::NearestResampler::receive(), nidas::core::NearestResamplerAtRate::receive(), nidas::core::SampleSorter::receive(), DumpClient::receive(), nidas::dynld::AsciiOutput::receive(), MergeVerifier::reportBackward(), MergeVerifier::reportDuplicate(), MergeVerifier::reportMissing(), SensorExtract::run(), nidas::core::SampleSorter::run(), nidas::dynld::raf::SyncRecordSource::selectVariablesFromSensor(), nidas::dynld::isff::Wind2D::validateSscanfs(), nidas::dynld::WxtSensor::wxtValidateSscanfs(), and nidas::dynld::raf::SyncRecordSource::~SyncRecordSource().
| #define GET_FULL_ID | ( | tid | ) | ((tid) & 0x03ffffff) |
| #define GET_SAMPLE_TYPE | ( | tid | ) | ((tid) >> 26) |
macros to get and set fields of the tid member of a Sample.
The 32 bit unsigned int tid is made of two fields: 26 least significant bits containing the FULL_ID 6 most significant bits containing a SAMPLE_TYPE enumeration (0-63) The FULL_ID field is further split into a DSM id and sensor-plus-sample (SPS) id: 10 most significant bits containing the DSM_ID (0-1023) 16 least significant bits containing the SPS_ID (0-65535)
Referenced by nidas::core::SampleHeader::getType().
| #define GET_SHORT_ID | ( | tid | ) | ((tid) & 0xffff) |
Referenced by nidas::core::SampleClock::addSampleDate(), nidas::core::DSMSensor::addSampleTag(), nidas::dynld::raf::CVIProcessor::connectSource(), nidas::core::NidasApp::formatSampleId(), nidas::dynld::ParoSci_202BG_P::init(), nidas::dynld::ParoSci_202BG_T::init(), nidas::core::SampleMatcher::match(), nidas::dynld::isff::Wind2D::process(), nidas::dynld::raf::DSMMesaSensor::process(), nidas::core::NearestResamplerAtRate::receive(), nidas::dynld::AsciiOutput::receive(), MergeVerifier::reportBackward(), MergeVerifier::reportDuplicate(), MergeVerifier::reportMissing(), nidas::core::SampleSorter::run(), nidas::dynld::isff::Wind2D::validateSscanfs(), and nidas::dynld::WxtSensor::wxtValidateSscanfs().
| #define GET_SPS_ID | ( | tid | ) | ((tid) & 0xffff) |
Referenced by nidas::dynld::StatisticsProcessor::addRequestedSampleTag(), nidas::core::TimetagAdjuster::adjust(), nidas::dynld::StatisticsCruncher::attach(), PacketReader::checkPacket(), SampleCounter::collectMetadata(), nidas::core::NearestResamplerAtRate::connect(), nidas::core::SamplePipeline::connect(), nidas::core::NearestResampler::ctorCommon(), nidas::core::Site::findSensor(), nidas::core::SampleSorter::flush(), nidas::core::SampleTag::fromDOMElement(), SampleCounter::generateStreamId(), nidas::core::SampleIOProcessor::getSampleId(), nidas::core::DSMSensor::getSensorId(), nidas::core::SampleHeader::getSpSId(), nidas::core::SampleTag::getSpSId(), nidas::core::Project::getUniqueSampleId(), nidas::core::TimetagAdjuster::log(), nidas::core::SampleTracer::msg(), nidas::core::SampleTracer::msg(), nidas::core::NearestResamplerAtRate::NearestResamplerAtRate(), nidas::core::operator<<(), nidas::dynld::isff::WisardMote::process(), nidas::core::NearestResampler::receive(), nidas::core::NearestResamplerAtRate::receive(), nidas::core::SampleSorter::receive(), nidas::dynld::raf::SyncRecordSource::selectVariablesFromSensor(), and nidas::dynld::raf::SyncRecordSource::~SyncRecordSource().
| #define MUTEX_PROTECT_REF_COUNTS |
Whether to use mutexes to make sure the reference count increments and decrement-and-test operations are atomic.
| #define SET_DSM_ID | ( | tid, | |
| val ) (((tid) & 0xfc00ffff) | (((unsigned int)(val) & 0x3ff) << 16)) |
Referenced by nidas::core::Project::getUniqueSampleId(), SensorExtract::parseRunstring(), nidas::dynld::ParoSci_202BG_P::readParams(), nidas::dynld::ParoSci_202BG_T::readParams(), SensorExtract::run(), nidas::core::DSMSensor::setDSMId(), nidas::core::SampleHeader::setDSMId(), and nidas::core::SampleTag::setDSMId().
| #define SET_FULL_ID | ( | tid, | |
| val ) (((tid) & 0xfc000000) | ((val) & 0x03ffffff)) |
| #define SET_SAMPLE_TYPE | ( | tid, | |
| val ) (((tid) & 0x03ffffff) | ((unsigned int)(val) << 26)) |
| #define SET_SHORT_ID | ( | tid, | |
| val ) (((tid) & 0xffff0000) | ((val) & 0xffff)) |
| #define SET_SPS_ID | ( | tid, | |
| val ) (((tid) & 0xffff0000) | ((val) & 0xffff)) |