nidas v1.2.3
|
Class that should include all that is configurable about a DSM. More...
#include <DSMConfig.h>
Classes | |
class | MyDictionary |
Static Public Member Functions | |
static const XMLCh * | getNamespaceURI () |
Private Member Functions | |
void | validateSensorAndSampleIds () |
Validate the ids of the DSMSensors belonging to this DSMConfig, and their SampleTags, for uniqueness. | |
DSMConfig (const DSMConfig &x) | |
DSMConfig & | operator= (const DSMConfig &x) |
Private Attributes | |
const Site * | _site |
std::string | _name |
std::string | _suffix |
std::string | _location |
nidas::core::DSMConfig::MyDictionary | _dictionary |
unsigned int | _id |
std::list< DSMSensor * > | _ownedSensors |
A list of the sensors on this DSM that have not been passed to a SensorHandler, i.e. | |
std::list< DSMSensor * > | _allSensors |
A list of all sensors configured on this DSM. | |
std::list< SampleOutput * > | _outputs |
SampleOutputs. | |
unsigned short | _remoteSerialSocketPort |
TCP socket port that DSMEngine listens on for remote serial connections. | |
float | _rawSorterLength |
float | _procSorterLength |
size_t | _rawHeapMax |
size_t | _procHeapMax |
unsigned int | _rawLateSampleCacheSize |
unsigned int | _procLateSampleCacheSize |
nidas::util::SocketAddress * | _derivedDataSocketAddr |
std::list< SampleIOProcessor * > | _processors |
nidas::util::SocketAddress * | _statusSocketAddr |
Static Private Attributes | |
static XMLCh * | namespaceURI = 0 |
Class that should include all that is configurable about a DSM.
It should be able to initialize itself from a <dsm>
XML element, and provide get methods to access its essential pieces, like sensors.
DSMConfig::DSMConfig | ( | ) |
|
virtual |
References _derivedDataSocketAddr, _ownedSensors, _processors, _statusSocketAddr, getOutputs(), and nidas::core::getSample().
|
inline |
References _outputs.
Referenced by fromDOMElement().
|
inlinevirtual |
Add a processor to this DSM.
This is done at configuration (XML) time.
References _processors.
Referenced by fromDOMElement().
References _allSensors, _ownedSensors, and nidas::core::DSMSensor::allowOpen().
Referenced by fromDOMElement().
|
inline |
Utility function to expand ${TOKEN} or $TOKEN fields in a string with their value from getTokenValue().
If curly brackets are not used, then the TOKEN should be delimited by a '/', a '.' or the end of string, e.g.: xxx/yyy/$ZZZ.dat
References _dictionary, and nidas::core::Dictionary::expandString().
Referenced by fromDOMElement().
list< nidas::core::FileSet * > DSMConfig::findSampleOutputStreamFileSets | ( | ) | const |
References nidas::core::SampleOutput::getIOChannel(), getOutputs(), and nidas::core::getSample().
Referenced by nidas::core::Project::findSampleOutputStreamFileSets().
nidas::util::InvalidParameterException |
Implements nidas::core::DOMable.
References addOutput(), addProcessor(), addSensor(), nidas::core::DOMObjectFactory::createObject(), expandString(), fromDOMElement(), nidas::core::DOMable::fromDOMElement(), getId(), getName(), getOutputs(), getProject(), nidas::core::getSample(), getSensors(), LOG_WARNING, NIDAS_MULTICAST_ADDR, port, sensorFromDOMElement(), setDerivedDataSocketAddr(), nidas::core::SampleOutput::setDSMConfig(), setId(), setLocation(), setName(), setProcHeapMax(), setProcLateSampleCacheSize(), setProcSorterLength(), setRawHeapMax(), setRawLateSampleCacheSize(), setRawSorterLength(), setRemoteSerialSocketPort(), setStatusSocketAddr(), and WLOG.
Referenced by fromDOMElement().
|
inline |
References _derivedDataSocketAddr.
Referenced by nidas::core::DSMEngine::run().
|
inline |
References _dictionary.
|
inline |
References _id.
Referenced by fromDOMElement(), nidas::core::DSMConfig::MyDictionary::getTokenValue(), ARLIngest::prepareHeaderIds(), and toDOMElement().
|
inline |
References _location.
Referenced by nidas::core::GetDsmList::execute(), nidas::core::DSMConfig::MyDictionary::getTokenValue(), and toDOMElement().
|
inline |
References nidas::core::DOMable::namespaceURI.
Referenced by nidas::dynld::UDPSampleOutput::getProjectDOM(), nidas::core::Dataset::toDOMElement(), nidas::core::ProjectConfig::toDOMElement(), nidas::core::Dataset::toDOMParent(), nidas::core::Datasets::toDOMParent(), nidas::core::ProjectConfig::toDOMParent(), nidas::core::ProjectConfigs::toDOMParent(), toDOMParent(), nidas::core::DSMSensor::toDOMParent(), nidas::core::Project::toDOMParent(), nidas::core::SampleTag::toDOMParent(), nidas::core::Site::toDOMParent(), nidas::core::ServerSocket::toDOMParent(), nidas::core::Variable::toDOMParent(), nidas::core::Datasets::writeXML(), and nidas::core::ProjectConfigs::writeXML().
|
inline |
References _outputs.
Referenced by nidas::core::DSMEngine::closeOutputs(), nidas::core::DSMEngine::connectOutputs(), findSampleOutputStreamFileSets(), fromDOMElement(), and ~DSMConfig().
ProcessorIterator DSMConfig::getProcessorIterator | ( | ) | const |
|
inlinevirtual |
References _processors.
|
inline |
Get the size of in bytes of the processed SampleSorter.
If the size of the sorter exceeds this value then samples will be discarded.
References _procHeapMax.
Referenced by nidas::core::DSMEngine::openSensors().
Get the size of the late sample cache in the processed sample sorter.
See SampleSorter::getLateSampleCacheSize(). Default: 0.
References _procLateSampleCacheSize.
Referenced by nidas::core::DSMEngine::openSensors().
|
inline |
Get the length of the SampleSorter of processed Samples, in seconds.
References _procSorterLength.
Referenced by nidas::core::DSMEngine::openSensors().
References getSite().
Referenced by fromDOMElement(), nidas::core::DSMConfig::MyDictionary::getTokenValue(), and sensorFromDOMElement().
|
inline |
Get the size of in bytes of the raw SampleSorter.
If the size of the sorter exceeds this value then samples will be discarded.
References _rawHeapMax.
Referenced by nidas::core::DSMEngine::openSensors().
Get the size of the late sample cache in the raw sample sorter.
See SampleSorter::getLateSampleCacheSize(). Default: 0.
References _rawLateSampleCacheSize.
Referenced by nidas::core::DSMEngine::openSensors().
|
inline |
Get the length of the SampleSorter of raw Samples, in seconds.
References _rawSorterLength.
Referenced by nidas::core::DSMEngine::openSensors().
References _remoteSerialSocketPort.
Referenced by nidas::core::DSMEngine::openSensors().
SampleTagIterator DSMConfig::getSampleTagIterator | ( | ) | const |
SensorIterator DSMConfig::getSensorIterator | ( | ) | const |
Referenced by nidas::core::DSMEngine::connectProcessors(), ARLIngest::prepareHeaderIds(), toDOMElement(), and validate().
References _site.
Referenced by getProject(), and nidas::core::DSMConfig::MyDictionary::getTokenValue().
|
inline |
References _statusSocketAddr.
Referenced by nidas::core::DSMEngine::run().
|
inline |
Implement a lookup for tokens that I know about, like $DSM, $LOCATION.
For other tokens, call getSite()->getTokenValue(token,value);
References _dictionary, and nidas::core::DSMConfig::MyDictionary::getTokenValue().
VariableIterator DSMConfig::getVariableIterator | ( | ) | const |
void DSMConfig::initSensors | ( | ) |
nidas::util::IOException |
References _allSensors, nidas::core::getSample(), and nidas::core::DSMSensor::init().
void DSMConfig::openSensors | ( | SensorHandler * | selector | ) |
Pass my sensors to the SensorHandler for opening.
References _ownedSensors, and nidas::core::getSample().
Referenced by nidas::core::DSMEngine::openSensors().
References _allSensors, _ownedSensors, and nidas::core::getSample().
Parse a DOMElement for a DSMSensor, returning a pointer to the DSMSensor.
The pointer may be for a new instance of a DSMSensor, or, if the devicename matches a previous DSMSensor that has been added to this DSMConfig, will point to the matching DSMSensor.
nidas::util::InvalidParameterException |
References nidas::core::DOMObjectFactory::createObject(), nidas::core::DSMSensor::fromDOMElement(), nidas::core::DSMSensor::getClassName(), getName(), nidas::core::DSMSensor::getName(), getProject(), nidas::core::getSample(), getSensors(), and nidas::core::DSMSensor::setDSMConfig().
Referenced by fromDOMElement().
|
inline |
References _derivedDataSocketAddr, and nidas::util::SocketAddress::clone().
Referenced by fromDOMElement().
|
inline |
References _id, and nidas::core::getSample().
Referenced by fromDOMElement().
References _location, and nidas::core::getSample().
Referenced by fromDOMElement().
References _name, and nidas::core::getSample().
Referenced by fromDOMElement().
Set the size of in bytes of the processed SampleSorter.
If the size of the sorter exceeds this value then samples will be discarded.
References _procHeapMax, and nidas::core::getSample().
Referenced by fromDOMElement().
Cache this number of samples with potentially anomalous, late time tags in the processed sample sorter.
See SampleSorter::setLateSampleCacheSize(val).
References _procLateSampleCacheSize, and nidas::core::getSample().
Referenced by fromDOMElement().
Set the length of the SampleSorter of processed Samples, in seconds.
References _procSorterLength, and nidas::core::getSample().
Referenced by fromDOMElement().
Set the size of in bytes of the raw SampleSorter.
If the size of the sorter exceeds this value then samples will be discarded.
References _rawHeapMax, and nidas::core::getSample().
Referenced by fromDOMElement().
Cache this number of samples with potentially anomalous, late time tags in the raw sample sorter.
See SampleSorter::setLateSampleCacheSize(val).
References _rawLateSampleCacheSize, and nidas::core::getSample().
Referenced by fromDOMElement().
Set the length of the SampleSorter of raw Samples, in seconds.
References _rawSorterLength, and nidas::core::getSample().
Referenced by fromDOMElement().
References _remoteSerialSocketPort, and nidas::core::getSample().
Referenced by fromDOMElement().
References _site, and nidas::core::getSample().
|
inline |
References _statusSocketAddr, and nidas::util::SocketAddress::clone().
Referenced by fromDOMElement().
|
virtual |
xercesc::DOMException |
Reimplemented from nidas::core::DOMable.
References getId(), getLocation(), getName(), nidas::core::getSample(), getSensorIterator(), nidas::core::SensorIterator::hasNext(), and nidas::core::DSMSensor::toDOMParent().
Referenced by toDOMParent().
|
virtual |
xercesc::DOMException |
Reimplemented from nidas::core::DOMable.
References nidas::core::DOMable::getNamespaceURI(), and toDOMElement().
Referenced by nidas::core::Site::toDOMElement().
void DSMConfig::validate | ( | ) |
|
private |
Validate the ids of the DSMSensors belonging to this DSMConfig, and their SampleTags, for uniqueness.
nidas::util::InvalidParameterException |
References nidas::core::DSMSensor::getDSMId(), nidas::core::DSMSensor::getDuplicateIdOK(), nidas::core::DSMSensor::getId(), nidas::core::SampleTag::getId(), nidas::core::DSMSensor::getName(), nidas::core::getSample(), nidas::core::DSMSensor::getSampleTags(), nidas::core::DSMSensor::getSensorId(), and getSensors().
Referenced by validate().
|
private |
A list of all sensors configured on this DSM.
Referenced by addSensor(), getSensors(), initSensors(), and removeSensor().
|
private |
Referenced by getDerivedDataSocketAddr(), setDerivedDataSocketAddr(), and ~DSMConfig().
|
private |
Referenced by expandString(), getDictionary(), and getTokenValue().
|
private |
Referenced by getLocation(), and setLocation().
|
private |
SampleOutputs.
Referenced by addOutput(), and getOutputs().
|
private |
A list of the sensors on this DSM that have not been passed to a SensorHandler, i.e.
the sensors that DSMConfig still ownes. On a running DSM this list will be empty.
Referenced by addSensor(), openSensors(), removeSensor(), and ~DSMConfig().
|
private |
Referenced by addProcessor(), getProcessors(), and ~DSMConfig().
|
private |
Referenced by getProcHeapMax(), and setProcHeapMax().
Referenced by getProcLateSampleCacheSize(), and setProcLateSampleCacheSize().
|
private |
Referenced by getProcSorterLength(), and setProcSorterLength().
|
private |
Referenced by getRawHeapMax(), and setRawHeapMax().
Referenced by getRawLateSampleCacheSize(), and setRawLateSampleCacheSize().
|
private |
Referenced by getRawSorterLength(), and setRawSorterLength().
TCP socket port that DSMEngine listens on for remote serial connections.
0=don't listen.
Referenced by getRemoteSerialSocketPort(), and setRemoteSerialSocketPort().
|
private |
Referenced by getStatusSocketAddr(), setStatusSocketAddr(), and ~DSMConfig().
|
private |
|
staticprivateinherited |
Referenced by nidas::core::DOMable::getNamespaceURI().