26#ifndef NIDAS_CORE_SAMPLETAG_H
27#define NIDAS_CORE_SAMPLETAG_H
37namespace nidas {
namespace core {
221 _rate = (val > 0.0) ? 1.0 / val : 0.0;
276 const std::vector<const Variable*>&
getVariables()
const;
337 toDOMParent(xercesc::DOMElement* parent,
bool complete)
const;
343 toDOMElement(xercesc::DOMElement* node,
bool complete)
const;
#define GET_FULL_ID(tid)
Definition Sample.h:79
#define GET_SPS_ID(tid)
Definition Sample.h:85
#define SET_SPS_ID(tid, val)
Definition Sample.h:88
#define GET_DSM_ID(tid)
Definition Sample.h:82
#define SET_DSM_ID(tid, val)
Definition Sample.h:83
#define SET_FULL_ID(tid, val)
Definition Sample.h:80
Interface of an object that can be instantiated from a DOM element, via the fromDOMElement method,...
Definition DOMable.h:51
Class that should include all that is configurable about a DSM.
Definition DSMConfig.h:55
DSMSensor provides the basic support for reading, processing and distributing samples from a sensor a...
Definition DSMSensor.h:88
Definition Parameter.h:47
Class describing a group of variables that are sampled and handled together.
Definition SampleTag.h:88
std::list< Parameter * > _parameters
List of pointers to Parameters.
Definition SampleTag.h:397
void setDSMId(unsigned int val)
Set the DSM portion of the id.
Definition SampleTag.h:140
void setProcessed(bool val)
Set if this sample is going to be post processed.
Definition SampleTag.h:239
const DSMConfig * getDSMConfig() const
Definition SampleTag.h:164
const DSMSensor * _sensor
Definition SampleTag.h:380
void setSensorId(unsigned int val)
Set the sensor portion of the shortId.
Definition SampleTag.h:127
const std::string & getScanfFormat() const
Definition SampleTag.h:251
std::list< const Parameter * > _constParameters
List of const pointers to Parameters for providing via getParameters().
Definition SampleTag.h:403
void addParameter(Parameter *val)
Add a parameter to this SampleTag.
Definition SampleTag.cc:231
void setSpSId(unsigned int val)
Set the sensor + sample portions of the id.
Definition SampleTag.h:360
Variable & getVariable(int i)
Provide a reference to a variable - allowing one to modify it.
Definition SampleTag.h:288
std::string _suffix
Definition SampleTag.h:370
virtual double getPeriod() const
Get sampling period (1/rate) in sec.
Definition SampleTag.h:228
int _station
Definition SampleTag.h:372
xercesc::DOMElement * toDOMParent(xercesc::DOMElement *parent, bool complete) const
Definition SampleTag.cc:470
unsigned int _sampleId
Definition SampleTag.h:366
float _ttAdjustVal
If positive, enable TimetagAdjustor for these samples.
Definition SampleTag.h:410
bool _enabled
Definition SampleTag.h:405
void setScanfFormat(const std::string &val)
Definition SampleTag.h:246
SampleTag()
Constructor.
Definition SampleTag.cc:45
std::string _scanfFormat
Definition SampleTag.h:388
dsm_sample_id_t _id
Definition SampleTag.h:364
unsigned int getSampleId() const
Get the sample portion of the shortId.
Definition SampleTag.h:122
bool isProcessed() const
Test to see if this sample is to be post processed.
Definition SampleTag.h:244
virtual void setRate(double val)
Set sampling rate in samples/sec.
Definition SampleTag.h:202
std::string _promptString
Definition SampleTag.h:390
const std::vector< const Variable * > & getVariables() const
Definition SampleTag.cc:210
unsigned int getDataIndex(const Variable *var) const
What is the index of a Variable into the data of a sample from this SampleTag.
Definition SampleTag.cc:220
const DSMConfig * _dsm
Definition SampleTag.h:378
virtual double getRate() const
Get sampling rate in samples/sec.
Definition SampleTag.h:211
const DSMSensor * getDSMSensor() const
Definition SampleTag.h:168
double getPromptOffset() const
Definition SampleTag.h:265
virtual void setPeriod(double val)
Set sampling period (1/rate) in sec.
Definition SampleTag.h:219
SampleTag & operator=(const SampleTag &rhs)
Definition SampleTag.cc:103
void setDSMConfig(const DSMConfig *val)
Definition SampleTag.h:166
const std::string & getSuffix() const
Suffix, which is appended to variable names.
Definition SampleTag.h:160
const std::string & getPromptString() const
Definition SampleTag.h:258
void setPromptString(const std::string &val)
Definition SampleTag.h:253
const std::vector< Variable * > & getVariables()
Definition SampleTag.h:278
double _promptOffset
Definition SampleTag.h:392
const Site * getSite() const
Get the Site of this SampleTag, which will be non-NULL only if getDSMConfig() returns non-NULL.
Definition SampleTag.cc:172
const std::list< const Parameter * > & getParameters() const
Definition SampleTag.h:299
void fromDOMElement(const xercesc::DOMElement *)
Definition SampleTag.cc:261
int getStation() const
Station number, which is also known as the Site number.
Definition SampleTag.h:183
unsigned int _sensorId
Definition SampleTag.h:368
void setPromptOffset(double val)
Definition SampleTag.h:260
void setSampleId(unsigned int val)
Set the sample portion of the shortId.
Definition SampleTag.h:114
virtual ~SampleTag()
Definition SampleTag.cc:140
unsigned int getSpSId() const
Get the sensor+sample portion of the id.
Definition SampleTag.h:155
void setEnabled(bool val)
Definition SampleTag.h:306
std::vector< const Variable * > _constVariables
Definition SampleTag.h:382
void setId(dsm_sample_id_t val)
Set the full id.
Definition SampleTag.h:352
float getTimetagAdjust() const
Whether to enable TimetagAdjuster for this sample.
Definition SampleTag.h:322
bool isEnabled() const
Definition SampleTag.h:307
std::vector< Variable * > _variables
Definition SampleTag.h:384
unsigned int getDSMId() const
Get the DSM portion of the id.
Definition SampleTag.h:145
dsm_sample_id_t getId() const
Get the 26 bit id, containing the DSM id and the sensor+sample id.
Definition SampleTag.h:150
xercesc::DOMElement * toDOMElement(xercesc::DOMElement *node, bool complete) const
Definition SampleTag.cc:481
std::vector< std::string > _variableNames
Definition SampleTag.h:386
virtual void addVariable(Variable *var)
Add a variable to this SampleTag.
Definition SampleTag.cc:150
double _rate
Definition SampleTag.h:374
void setTimetagAdjust(float val)
Definition SampleTag.h:324
bool _processed
Definition SampleTag.h:376
void removeVariable(const Variable *var)
Definition SampleTag.cc:179
VariableIterator getVariableIterator() const
Definition SampleTag.cc:215
void setStation(int val)
Definition SampleTag.cc:162
void setDSMSensor(const DSMSensor *val)
Definition SampleTag.cc:157
const Parameter * getParameter(const std::string &name) const
Definition SampleTag.cc:251
unsigned int getSensorId() const
Get the sensor portion of the shortId.
Definition SampleTag.h:135
void setSuffix(const std::string &val)
Definition SampleTag.cc:199
A measurement site.
Definition Site.h:49
Class for iterating over the Variables of a Project, Site, DSMConfig, DSMSensor, or SampleTag.
Definition NidsIterators.h:287
Class describing a sampled variable.
Definition Variable.h:47
Sample * getSample(sampleType type, unsigned int len)
A convienence method for getting a sample of an enumerated type from a pool.
Definition Sample.cc:70
unsigned int dsm_sample_id_t
Definition Sample.h:64
Root namespace for the NCAR In-Situ Data Acquisition Software.
Definition A2DConverter.h:31