26 #ifndef NIDAS_CORE_SAMPLETAG_H
27 #define NIDAS_CORE_SAMPLETAG_H
37 namespace nidas {
namespace core {
219 _rate = (val > 0.0) ? 1.0 / val : 0.0;
272 const std::vector<const Variable*>&
getVariables()
const;
325 throw(nidas::util::InvalidParameterException);
328 toDOMParent(xercesc::DOMElement* parent,
bool complete) const
329 throw(xercesc::DOMException);
332 toDOMElement(xercesc::DOMElement* node,
bool complete) const
333 throw(xercesc::DOMException);
void setDSMId(unsigned int val)
Set the DSM portion of the id.
Definition: SampleTag.h:140
unsigned int getSpSId() const
Get the sensor+sample portion of the id.
Definition: SampleTag.h:155
virtual ~SampleTag()
Definition: SampleTag.cc:140
const std::string & getScanfFormat() const
Definition: SampleTag.h:248
unsigned int getSensorId() const
Get the sensor portion of the shortId.
Definition: SampleTag.h:135
int _station
Definition: SampleTag.h:362
#define GET_DSM_ID(tid)
Definition: Sample.h:81
std::list< Parameter * > _parameters
List of pointers to Parameters.
Definition: SampleTag.h:387
bool _enabled
Definition: SampleTag.h:395
std::string _suffix
Definition: SampleTag.h:360
#define SET_DSM_ID(tid, val)
Definition: Sample.h:82
unsigned int dsm_sample_id_t
Definition: Sample.h:63
const DSMSensor * getDSMSensor() const
Definition: SampleTag.h:168
A measurement site.
Definition: Site.h:49
#define GET_FULL_ID(tid)
Definition: Sample.h:78
SampleTag()
Constructor.
Definition: SampleTag.cc:45
double _rate
Definition: SampleTag.h:364
bool isProcessed() const
Test to see if this sample is to be post processed.
Definition: SampleTag.h:241
std::vector< const Variable * > _constVariables
Definition: SampleTag.h:372
SampleTag & operator=(const SampleTag &rhs)
Definition: SampleTag.cc:103
void setPromptOffset(double val)
Definition: SampleTag.h:257
void fromDOMElement(const xercesc::DOMElement *)
Initialize myself from a xercesc::DOMElement.
Definition: SampleTag.cc:262
bool isEnabled() const
Definition: SampleTag.h:303
double _promptOffset
Definition: SampleTag.h:382
Class describing a sampled variable.
Definition: Variable.h:46
#define SET_FULL_ID(tid, val)
Definition: Sample.h:79
Class that should include all that is configurable about a DSM.
Definition: DSMConfig.h:55
Class for iterating over the Variables of a Project, Site, DSMConfig, DSMSensor, or SampleTag...
Definition: NidsIterators.h:286
void setDSMSensor(const DSMSensor *val)
Definition: SampleTag.cc:158
void setId(dsm_sample_id_t val)
Set the full id.
Definition: SampleTag.h:342
const DSMConfig * getDSMConfig() const
Definition: SampleTag.h:164
double getPromptOffset() const
Definition: SampleTag.h:262
Interface of an object that can be instantiated from a DOM element, via the fromDOMElement method...
Definition: DOMable.h:51
const std::vector< const Variable * > & getVariables() const
Definition: SampleTag.cc:211
float getTimetagAdjust() const
Whether to enable TimetagAdjuster for this sample.
Definition: SampleTag.h:318
float _ttAdjustVal
If positive, enable TimetagAdjustor for these samples.
Definition: SampleTag.h:400
virtual double getPeriod() const
Get sampling period (1/rate) in sec.
Definition: SampleTag.h:226
void removeVariable(const Variable *var)
Definition: SampleTag.cc:180
void addParameter(Parameter *val)
Add a parameter to this SampleTag.
Definition: SampleTag.cc:232
std::vector< Variable * > _variables
Definition: SampleTag.h:374
void setProcessed(bool val)
Set if this sample is going to be post processed.
Definition: SampleTag.h:235
const DSMSensor * _sensor
Definition: SampleTag.h:370
Variable & getVariable(int i)
Provide a reference to a variable - allowing one to modify it.
Definition: SampleTag.h:284
void setSuffix(const std::string &val)
Definition: SampleTag.cc:200
virtual void setRate(double val)
Set sampling rate in samples/sec.
Definition: SampleTag.h:200
const std::string & getPromptString() const
Definition: SampleTag.h:255
std::vector< std::string > _variableNames
Definition: SampleTag.h:376
int getStation() const
Station number, which is also known as the Site number.
Definition: SampleTag.h:183
dsm_sample_id_t _id
Definition: SampleTag.h:354
void setStation(int val)
Definition: SampleTag.cc:163
std::string _scanfFormat
Definition: SampleTag.h:378
std::list< const Parameter * > _constParameters
List of const pointers to Parameters for providing via getParameters().
Definition: SampleTag.h:393
void setEnabled(bool val)
Definition: SampleTag.h:302
void setSampleId(unsigned int val)
Set the sample portion of the shortId.
Definition: SampleTag.h:114
unsigned int getDSMId() const
Get the DSM portion of the id.
Definition: SampleTag.h:145
const Site * getSite() const
Get the Site of this SampleTag, which will be non-NULL only if getDSMConfig() returns non-NULL...
Definition: SampleTag.cc:173
void setDSMConfig(const DSMConfig *val)
Definition: SampleTag.h:166
VariableIterator getVariableIterator() const
Definition: SampleTag.cc:216
unsigned int _sensorId
Definition: SampleTag.h:358
const DSMConfig * _dsm
Definition: SampleTag.h:368
DSMSensor provides the basic support for reading, processing and distributing samples from a sensor a...
Definition: DSMSensor.h:87
Definition: Parameter.h:46
std::string _promptString
Definition: SampleTag.h:380
virtual void setPeriod(double val)
Set sampling period (1/rate) in sec.
Definition: SampleTag.h:216
Class describing a group of variables that are sampled and handled together.
Definition: SampleTag.h:87
const std::vector< Variable * > & getVariables()
Definition: SampleTag.h:274
const std::list< const Parameter * > & getParameters() const
Definition: SampleTag.h:295
unsigned int getSampleId() const
Get the sample portion of the shortId.
Definition: SampleTag.h:122
void setSpSId(unsigned int val)
Set the sensor + sample portions of the id.
Definition: SampleTag.h:350
xercesc::DOMElement * toDOMElement(xercesc::DOMElement *node, bool complete) const
Add my content into a DOMElement.
Definition: SampleTag.cc:482
virtual double getRate() const
Get sampling rate in samples/sec.
Definition: SampleTag.h:210
virtual void addVariable(Variable *var)
Add a variable to this SampleTag.
Definition: SampleTag.cc:150
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:221
const Parameter * getParameter(const std::string &name) const
Definition: SampleTag.cc:252
void setTimetagAdjust(float val)
Definition: SampleTag.h:320
void setSensorId(unsigned int val)
Set the sensor portion of the shortId.
Definition: SampleTag.h:127
unsigned int _sampleId
Definition: SampleTag.h:356
xercesc::DOMElement * toDOMParent(xercesc::DOMElement *parent, bool complete) const
Create a DOMElement and append it to the parent.
Definition: SampleTag.cc:471
#define GET_SPS_ID(tid)
Definition: Sample.h:84
void setScanfFormat(const std::string &val)
Definition: SampleTag.h:243
#define SET_SPS_ID(tid, val)
Definition: Sample.h:87
void setPromptString(const std::string &val)
Definition: SampleTag.h:250
bool _processed
Definition: SampleTag.h:366
const std::string & getSuffix() const
Suffix, which is appended to variable names.
Definition: SampleTag.h:160
Definition: InvalidParameterException.h:35
dsm_sample_id_t getId() const
Get the 26 bit id, containing the DSM id and the sensor+sample id.
Definition: SampleTag.h:150