27 #ifndef NIDAS_CORE_DSMCONFIG_H
28 #define NIDAS_CORE_DSMCONFIG_H
40 namespace nidas {
namespace core {
226 throw(nidas::util::InvalidParameterException);
229 throw(nidas::util::InvalidParameterException);
232 toDOMParent(xercesc::DOMElement* parent,
bool complete) const
233 throw(xercesc::DOMException);
236 toDOMElement(xercesc::DOMElement* node,
bool complete) const
237 throw(xercesc::DOMException);
310 throw(nidas::util::InvalidParameterException);
327 *(Dictionary*)
this = rhs;
332 bool getTokenValue(
const std::string& token, std::string& value)
const;
const Site * _site
Definition: DSMConfig.h:312
Interface for a Dictionary class, which can return a string value for a string token name...
Definition: Dictionary.h:38
Definition: DSMConfig.h:320
const std::list< DSMSensor * > & getSensors() const
Definition: DSMConfig.h:77
void fromDOMElement(const xercesc::DOMElement *)
Initialize myself from a xercesc::DOMElement.
Definition: DSMConfig.cc:171
void setRawHeapMax(size_t val)
Set the size of in bytes of the raw SampleSorter.
Definition: DSMConfig.h:152
const Project * getProject() const
Definition: DSMConfig.cc:77
VariableIterator getVariableIterator() const
Definition: DSMConfig.cc:99
virtual ~DSMConfig()
Definition: DSMConfig.cc:61
dsm_sample_id_t getId() const
Definition: DSMConfig.h:71
unsigned int dsm_sample_id_t
Definition: Sample.h:63
SensorHandler implements a DSMSensor event loop.
Definition: SensorHandler.h:87
void setProcHeapMax(size_t val)
Set the size of in bytes of the processed SampleSorter.
Definition: DSMConfig.h:172
std::list< DSMSensor * > _allSensors
A list of all sensors configured on this DSM.
Definition: DSMConfig.h:349
SensorIterator getSensorIterator() const
Definition: DSMConfig.cc:89
A measurement site.
Definition: Site.h:49
xercesc::DOMElement * toDOMElement(xercesc::DOMElement *node, bool complete) const
Add my content into a DOMElement.
Definition: DSMConfig.cc:675
An interface for a socket address.
Definition: SocketAddress.h:36
unsigned int _rawLateSampleCacheSize
Definition: DSMConfig.h:370
unsigned int _procLateSampleCacheSize
Definition: DSMConfig.h:372
unsigned short getRemoteSerialSocketPort() const
Definition: DSMConfig.h:95
Interface of an output stream of samples.
Definition: SampleOutput.h:47
nidas::util::SocketAddress * _statusSocketAddr
Definition: DSMConfig.h:378
virtual void addProcessor(SampleIOProcessor *proc)
Add a processor to this DSM.
Definition: DSMConfig.h:291
void removeSensor(DSMSensor *sensor)
Definition: DSMConfig.cc:111
Class that should include all that is configurable about a DSM.
Definition: DSMConfig.h:55
float getProcSorterLength() const
Get the length of the SampleSorter of processed Samples, in seconds.
Definition: DSMConfig.h:124
Class for iterating over the Variables of a Project, Site, DSMConfig, DSMSensor, or SampleTag...
Definition: NidsIterators.h:286
MyDictionary & operator=(const MyDictionary &rhs)
Definition: DSMConfig.h:324
void initSensors()
Definition: DSMConfig.cc:136
void setProcLateSampleCacheSize(unsigned int val)
Cache this number of samples with potentially anomalous, late time tags in the processed sample sorte...
Definition: DSMConfig.h:210
Interface of an object that can be instantiated from a DOM element, via the fromDOMElement method...
Definition: DOMable.h:51
std::string expandString(const std::string &input) const
Utility function that scans a string for tokens like ${XXXX}, or $XXX followed by any characters from...
Definition: Dictionary.cc:33
void setId(dsm_sample_id_t val)
Definition: DSMConfig.h:72
void setRawSorterLength(float val)
Set the length of the SampleSorter of raw Samples, in seconds.
Definition: DSMConfig.h:116
unsigned short _remoteSerialSocketPort
TCP socket port that DSMEngine listens on for remote serial connections.
Definition: DSMConfig.h:360
const std::string & getName() const
Definition: DSMConfig.h:65
std::list< nidas::core::FileSet * > findSampleOutputStreamFileSets() const
Definition: DSMConfig.cc:156
const Dictionary & getDictionary() const
Definition: DSMConfig.h:260
float _procSorterLength
Definition: DSMConfig.h:364
xercesc::DOMElement * toDOMParent(xercesc::DOMElement *parent, bool complete) const
Create a DOMElement and append it to the parent.
Definition: DSMConfig.cc:664
unsigned int _id
Definition: DSMConfig.h:337
size_t getProcHeapMax() const
Get the size of in bytes of the processed SampleSorter.
Definition: DSMConfig.h:162
std::string _suffix
Definition: DSMConfig.h:316
void validateSensorAndSampleIds()
Validate the ids of the DSMSensors belonging to this DSMConfig, and their SampleTags, for uniqueness.
Definition: DSMConfig.cc:530
const nidas::util::SocketAddress & getDerivedDataSocketAddr() const
Definition: DSMConfig.h:271
Class for iterating over the Processors of a DSMServer or DSMConfig.
Definition: NidsIterators.h:149
nidas::core::DSMConfig::MyDictionary _dictionary
void openSensors(SensorHandler *)
Pass my sensors to the SensorHandler for opening.
Definition: DSMConfig.cc:146
float getRawSorterLength() const
Get the length of the SampleSorter of raw Samples, in seconds.
Definition: DSMConfig.h:108
void setLocation(const std::string &val)
Definition: DSMConfig.h:69
SampleTagIterator getSampleTagIterator() const
Definition: DSMConfig.cc:94
std::list< SampleIOProcessor * > _processors
Definition: DSMConfig.h:376
size_t getRawHeapMax() const
Get the size of in bytes of the raw SampleSorter.
Definition: DSMConfig.h:142
std::list< DSMSensor * > _ownedSensors
A list of the sensors on this DSM that have not been passed to a SensorHandler, i.e.
Definition: DSMConfig.h:344
void setStatusSocketAddr(const nidas::util::SocketAddress &val)
Definition: DSMConfig.h:276
unsigned int getRawLateSampleCacheSize() const
Get the size of the late sample cache in the raw sample sorter.
Definition: DSMConfig.h:181
float _rawSorterLength
Definition: DSMConfig.h:362
std::string _name
Definition: DSMConfig.h:314
nidas::util::SocketAddress * _derivedDataSocketAddr
Definition: DSMConfig.h:374
std::string _location
Definition: DSMConfig.h:318
void addOutput(SampleOutput *output)
Definition: DSMConfig.h:89
size_t _rawHeapMax
Definition: DSMConfig.h:366
void setProcSorterLength(float val)
Set the length of the SampleSorter of processed Samples, in seconds.
Definition: DSMConfig.h:132
DSMSensor provides the basic support for reading, processing and distributing samples from a sensor a...
Definition: DSMSensor.h:87
void setRemoteSerialSocketPort(unsigned short val)
Definition: DSMConfig.h:97
const std::list< SampleOutput * > & getOutputs() const
Definition: DSMConfig.h:91
void setName(const std::string &val)
Definition: DSMConfig.h:66
bool getTokenValue(const std::string &token, std::string &value) const
Definition: DSMConfig.cc:695
Class for iterating over the SampleTags of a Project, Site, DSMConfig, or a SampleSource.
Definition: NidsIterators.h:217
const nidas::util::SocketAddress & getStatusSocketAddr() const
Definition: DSMConfig.h:282
std::list< SampleOutput * > _outputs
SampleOutputs.
Definition: DSMConfig.h:354
Interface of a processor of samples.
Definition: SampleIOProcessor.h:49
DSMConfig & operator=(const DSMConfig &x)
Class for iterating over the DSMSensors of a Project, Site, or DSMConfig.
Definition: NidsIterators.h:185
DSMSensor * sensorFromDOMElement(const xercesc::DOMElement *node)
Parse a DOMElement for a DSMSensor, returning a pointer to the DSMSensor.
Definition: DSMConfig.cc:463
virtual const std::list< SampleIOProcessor * > & getProcessors() const
Definition: DSMConfig.h:296
DSMConfig * _dsm
Definition: DSMConfig.h:334
size_t _procHeapMax
Definition: DSMConfig.h:368
MyDictionary(const MyDictionary &x)
Definition: DSMConfig.h:323
void setDerivedDataSocketAddr(const nidas::util::SocketAddress &val)
Definition: DSMConfig.h:265
ProcessorIterator getProcessorIterator() const
Definition: DSMConfig.cc:83
bool getTokenValue(const std::string &token, std::string &value) const
Implement a lookup for tokens that I know about, like $DSM, $LOCATION.
Definition: DSMConfig.h:255
virtual SocketAddress * clone() const =0
Virtual constructor.
std::string expandString(const std::string &input) const
Utility function to expand ${TOKEN} or $TOKEN fields in a string with their value from getTokenValue(...
Definition: DSMConfig.h:246
unsigned int getProcLateSampleCacheSize() const
Get the size of the late sample cache in the processed sample sorter.
Definition: DSMConfig.h:200
void setSite(const Site *val)
Definition: DSMConfig.h:60
MyDictionary(DSMConfig *dsm)
Definition: DSMConfig.h:322
const std::string & getLocation() const
Definition: DSMConfig.h:68
void addSensor(DSMSensor *sensor)
Definition: DSMConfig.cc:104
void setRawLateSampleCacheSize(unsigned int val)
Cache this number of samples with potentially anomalous, late time tags in the raw sample sorter...
Definition: DSMConfig.h:191
void validate()
Definition: DSMConfig.cc:453
DSMConfig()
Definition: DSMConfig.cc:48
Definition: InvalidParameterException.h:35
const Site * getSite() const
Definition: DSMConfig.h:61