nidas v1.2.3
|
A measurement site. More...
#include <Site.h>
Classes | |
class | MyDictionary |
Public Member Functions | |
Site () | |
virtual | ~Site () |
void | setName (const std::string &val) |
Set the name of the Site. | |
const std::string & | getName () const |
void | setNumber (int val) |
Identify the Site by number. | |
int | getNumber () const |
bool | operator== (const Site &x) const |
Equivalence operator for Site, checks name. | |
bool | operator!= (const Site &x) const |
Non-equivalence operator for Site. | |
bool | operator< (const Site &x) const |
Less than operator for Site, compares the names. | |
void | setSuffix (const std::string &val) |
Set the suffix for the Site. | |
const std::string & | getSuffix () const |
const Project * | getProject () const |
Provide pointer to Project. | |
Project * | getProject () |
void | setProject (Project *val) |
Set the current project for this Site. | |
void | addDSMConfig (DSMConfig *dsm) |
A Site contains one or more DSMs. | |
void | removeDSMConfig (DSMConfig *dsm) |
const std::list< const DSMConfig * > & | getDSMConfigs () const |
const std::list< DSMConfig * > & | getDSMConfigs () |
void | addServer (DSMServer *srvr) |
A Site has one or more DSMServers. | |
const std::list< DSMServer * > & | getServers () const |
DSMServer * | findServer (const std::string &hostname) const |
Look for a server on this aircraft that either has no name or whose name matches hostname. | |
const DSMConfig * | findDSM (unsigned int id) const |
Find a DSM by id. | |
const DSMConfig * | findDSM (const std::string &name) const |
Find a DSM by name. | |
DSMSensor * | findSensor (unsigned int id) const |
Find a DSMSensor by the full id, both the DSM id and the sensor id. | |
void | initSensors () |
Initialize all sensors for a Site. | |
void | initSensors (DSMConfig *dsm) |
Initialize all sensors for a given dsm. | |
virtual void | addParameter (Parameter *val) |
Add a parameter to this Site. | |
virtual const Parameter * | getParameter (const std::string &name) const |
virtual const std::list< const Parameter * > & | getParameters () const |
virtual bool | getApplyVariableConversions () const |
Do we want DSMSensor::process methods at this site to apply variable conversions? Currently on raf.Aircraft we don't want process methods to apply the conversions. | |
std::string | expandString (const std::string &input) const |
Utility function to expand ${TOKEN} or $TOKEN fields in a string. | |
bool | getTokenValue (const std::string &token, std::string &value) const |
Implement a lookup for tokens that I know about, like $SITE, and $AIRCRAFT. | |
const Dictionary & | getDictionary () const |
DSMServerIterator | getDSMServerIterator () const |
DSMServiceIterator | getDSMServiceIterator () const |
ProcessorIterator | getProcessorIterator () const |
DSMConfigIterator | getDSMConfigIterator () const |
SensorIterator | getSensorIterator () const |
SampleTagIterator | getSampleTagIterator () const |
VariableIterator | getVariableIterator () const |
void | validate () |
void | fromDOMElement (const xercesc::DOMElement *) |
xercesc::DOMElement * | toDOMParent (xercesc::DOMElement *parent, bool complete) const |
xercesc::DOMElement * | toDOMElement (xercesc::DOMElement *node, bool complete) const |
Static Public Member Functions | |
static const XMLCh * | getNamespaceURI () |
Protected Attributes | |
bool | _applyCals |
Should NIDAS apply calibrations, or defer them to other processing. | |
Private Member Functions | |
Site (const Site &) | |
Copy not supported. | |
Site & | operator= (const Site &) |
Assignment not supported. | |
Private Attributes | |
Project * | _project |
Pointer back to my project. | |
std::string | _name |
int | _number |
std::string | _suffix |
nidas::core::Site::MyDictionary | _dictionary |
std::list< const DSMConfig * > | _dsms |
std::list< DSMConfig * > | _ncDsms |
std::list< DSMServer * > | _servers |
std::map< std::string, Parameter * > | _parameterMap |
Mapping of Parameters, by name. | |
std::list< const Parameter * > | _constParameters |
List of const pointers to Parameters for providing via getParameters(). | |
Static Private Attributes | |
static XMLCh * | namespaceURI = 0 |
A measurement site.
It could be an Aircraft, or a grouping of measurement systems (e.g. "meadow" site).
Site::Site | ( | ) |
|
virtual |
References _ncDsms, _parameterMap, _servers, and nidas::core::getSample().
Copy not supported.
See Project copy constructor: Project(const Project&);
Add a parameter to this Site.
Site will then own the pointer and will delete it in its destructor.
Reimplemented in nidas::dynld::raf::Aircraft.
References _constParameters, _parameterMap, and nidas::core::getSample().
Referenced by nidas::dynld::raf::Aircraft::addParameter(), and fromDOMElement().
|
inline |
Utility function to expand ${TOKEN} or $TOKEN fields in a string.
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().
Find a DSM by name.
References _dsms, findDSM(), nidas::core::getSample(), and VLOG.
Find a DSMSensor by the full id, both the DSM id and the sensor id.
References GET_DSM_ID, GET_SPS_ID, nidas::core::DSMSensor::getDSMId(), nidas::core::DSMSensor::getId(), nidas::core::SampleTag::getId(), getName(), nidas::core::DSMSensor::getSampleTagIterator(), nidas::core::DSMSensor::getSensorId(), getSensorIterator(), and VLOG.
Look for a server on this aircraft that either has no name or whose name matches hostname.
If none found, remove any domain names and try again.
References _servers, and nidas::core::getSample().
nidas::util::InvalidParameterException |
Implements nidas::core::DOMable.
References _applyCals, _dictionary, addDSMConfig(), addParameter(), addServer(), nidas::core::Parameter::createParameter(), expandString(), nidas::core::Sample::getId(), getName(), getProject(), nidas::core::getSample(), setName(), setNumber(), and setSuffix().
Do we want DSMSensor::process methods at this site to apply variable conversions? Currently on raf.Aircraft we don't want process methods to apply the conversions.
References _applyCals.
|
inline |
References _dictionary.
DSMConfigIterator Site::getDSMConfigIterator | ( | ) | const |
Referenced by toDOMElement().
References _dsms.
Referenced by initSensors(), initSensors(), PConfig::showCalFiles(), and validate().
DSMServerIterator Site::getDSMServerIterator | ( | ) | const |
DSMServiceIterator Site::getDSMServiceIterator | ( | ) | const |
|
inline |
References _name.
Referenced by nidas::dynld::raf::Aircraft::addParameter(), findSensor(), fromDOMElement(), nidas::core::Site::MyDictionary::getTokenValue(), main(), and toDOMElement().
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(), nidas::core::DSMConfig::toDOMParent(), nidas::core::DSMSensor::toDOMParent(), nidas::core::Project::toDOMParent(), nidas::core::SampleTag::toDOMParent(), toDOMParent(), nidas::core::ServerSocket::toDOMParent(), nidas::core::Variable::toDOMParent(), nidas::core::Datasets::writeXML(), and nidas::core::ProjectConfigs::writeXML().
|
inline |
References _number.
Referenced by toDOMElement().
References _parameterMap.
Referenced by nidas::dynld::raf::Aircraft::getTailNumber().
References _constParameters.
ProcessorIterator Site::getProcessorIterator | ( | ) | const |
Provide pointer to Project.
References _project.
Referenced by fromDOMElement(), and nidas::core::Site::MyDictionary::getTokenValue().
SampleTagIterator Site::getSampleTagIterator | ( | ) | const |
SensorIterator Site::getSensorIterator | ( | ) | const |
Referenced by findSensor().
References _servers.
|
inline |
Implement a lookup for tokens that I know about, like $SITE, and $AIRCRAFT.
For other tokens, call getProject()->getTokenValue(token,value);
References _dictionary, and nidas::core::Site::MyDictionary::getTokenValue().
VariableIterator Site::getVariableIterator | ( | ) | const |
void Site::initSensors | ( | ) |
Initialize all sensors for a Site.
nidas::util::IOException |
References getDSMConfigs(), and nidas::core::getSample().
Initialize all sensors for a given dsm.
nidas::util::IOException |
References getDSMConfigs(), and nidas::core::getSample().
Non-equivalence operator for Site.
References operator==().
Equivalence operator for Site, checks name.
References _name, _number, and _suffix.
Referenced by operator!=().
References _dsms, _ncDsms, and nidas::core::getSample().
Set the name of the Site.
References _name, and nidas::core::getSample().
Referenced by fromDOMElement().
Identify the Site by number.
The site number can be used for things like a NetCDF station dimension.
Site | number, 0 means no number is associated with the site. |
References _number, and nidas::core::getSample().
Referenced by fromDOMElement().
Set the current project for this Site.
References _project, and nidas::core::getSample().
Set the suffix for the Site.
All variable names from this site will have the suffix.
References _suffix, and nidas::core::getSample().
Referenced by fromDOMElement().
|
virtual |
xercesc::DOMException |
Reimplemented from nidas::core::DOMable.
References getDSMConfigIterator(), getName(), getNumber(), nidas::core::getSample(), nidas::core::DSMConfigIterator::hasNext(), and nidas::core::DSMConfig::toDOMParent().
Referenced by toDOMParent().
|
virtual |
xercesc::DOMException |
Reimplemented from nidas::core::DOMable.
References nidas::core::DOMable::getNamespaceURI(), and toDOMElement().
Referenced by nidas::core::Project::toDOMElement().
void Site::validate | ( | ) |
nidas::util::InvalidParameterException |
References getDSMConfigs(), nidas::core::DSMSensor::getDSMId(), nidas::core::DSMSensor::getDuplicateIdOK(), nidas::core::Sample::getId(), nidas::core::DSMSensor::getName(), nidas::core::getSample(), nidas::core::DSMSensor::getSensorId(), nidas::core::DSMSensor::getVariableIterator(), and nidas::core::VariableIterator::hasNext().
|
protected |
Should NIDAS apply calibrations, or defer them to other processing.
Referenced by fromDOMElement(), and getApplyVariableConversions().
List of const pointers to Parameters for providing via getParameters().
Referenced by addParameter(), and getParameters().
|
private |
Referenced by expandString(), fromDOMElement(), getDictionary(), and getTokenValue().
Referenced by addDSMConfig(), findDSM(), findDSM(), getDSMConfigs(), and removeDSMConfig().
|
private |
Referenced by nidas::core::Variable::closeMatch(), getName(), operator<(), operator==(), and setName().
|
private |
Referenced by addDSMConfig(), getDSMConfigs(), removeDSMConfig(), and ~Site().
|
private |
Referenced by getNumber(), operator==(), and setNumber().
|
private |
Mapping of Parameters, by name.
Referenced by addParameter(), getParameter(), and ~Site().
|
private |
Pointer back to my project.
Referenced by getProject(), getProject(), and setProject().
|
private |
Referenced by addServer(), findServer(), getServers(), and ~Site().
|
private |
Referenced by getSuffix(), operator==(), and setSuffix().
|
staticprivateinherited |
Referenced by nidas::core::DOMable::getNamespaceURI().