nidas  v1.2-1520
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
nidas::dynld::raf::Aircraft Class Reference

Aircraft is a sub-class of a measurement Site. More...

#include <Aircraft.h>

Inheritance diagram for nidas::dynld::raf::Aircraft:
Inheritance graph
[legend]

Public Member Functions

 Aircraft ()
 
virtual ~Aircraft ()
 
std::string getTailNumber () const
 Get/Set tail number of this aircraft. More...
 
void setTailNumber (const std::string &val)
 
void setName (const std::string &val)
 Set the name of the Site. More...
 
const std::string & getName () const
 
void setNumber (int val)
 Identify the Site by number. More...
 
int getNumber () const
 
bool operator== (const Site &x) const
 Equivalence operator for Site, checks name. More...
 
bool operator!= (const Site &x) const
 Non-equivalence operator for Site. More...
 
bool operator< (const Site &x) const
 Less than operator for Site, compares the names. More...
 
void setSuffix (const std::string &val)
 Set the suffix for the Site. More...
 
const std::string & getSuffix () const
 
const ProjectgetProject () const
 Provide pointer to Project. More...
 
ProjectgetProject ()
 
void setProject (Project *val)
 Set the current project for this Site. More...
 
void addDSMConfig (DSMConfig *dsm)
 A Site contains one or more DSMs. More...
 
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. More...
 
const std::list< DSMServer * > & getServers () const
 
DSMServerfindServer (const std::string &hostname) const
 Look for a server on this aircraft that either has no name or whose name matches hostname. More...
 
const DSMConfigfindDSM (const nidas::util::Inet4Address &addr) const
 Find a DSM whose name corresponds to a given IP address. More...
 
const DSMConfigfindDSM (unsigned int id) const
 Find a DSM by id. More...
 
const DSMConfigfindDSM (const std::string &name) const
 Find a DSM by name. More...
 
DSMSensorfindSensor (unsigned int id) const
 Find a DSMSensor by the full id, both the DSM id and the sensor id. More...
 
void initSensors () throw (nidas::util::IOException)
 Initialize all sensors for a Site. More...
 
void initSensors (DSMConfig *dsm) throw (nidas::util::IOException)
 Initialize all sensors for a given dsm. More...
 
virtual void addParameter (Parameter *val)
 Add a parameter to this Site. More...
 
virtual const ParametergetParameter (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. More...
 
std::string expandString (const std::string &input) const
 Utility function to expand ${TOKEN} or $TOKEN fields in a string. More...
 
bool getTokenValue (const std::string &token, std::string &value) const
 Implement a lookup for tokens that I know about, like $SITE, and $AIRCRAFT. More...
 
const DictionarygetDictionary () const
 
DSMServerIterator getDSMServerIterator () const
 
DSMServiceIterator getDSMServiceIterator () const
 
ProcessorIterator getProcessorIterator () const
 
DSMConfigIterator getDSMConfigIterator () const
 
SensorIterator getSensorIterator () const
 
SampleTagIterator getSampleTagIterator () const
 
VariableIterator getVariableIterator () const
 
void validate () throw (nidas::util::InvalidParameterException)
 
void fromDOMElement (const xercesc::DOMElement *) throw (nidas::util::InvalidParameterException)
 Initialize myself from a xercesc::DOMElement. More...
 
xercesc::DOMElement * toDOMParent (xercesc::DOMElement *parent, bool complete) const throw (xercesc::DOMException)
 Create a DOMElement and append it to the parent. More...
 
xercesc::DOMElement * toDOMElement (xercesc::DOMElement *node, bool complete) const throw (xercesc::DOMException)
 Add my content into a DOMElement. More...
 

Static Public Member Functions

static AircraftgetAircraft (Project *project)
 Search the Project for the Aircraft site and return a pointer to it, or return null if there are no Aircraft sites. More...
 
static const XMLCh * getNamespaceURI ()
 

Protected Attributes

bool _applyCals
 Should NIDAS apply calibrations, or defer them to other processing. More...
 

Detailed Description

Aircraft is a sub-class of a measurement Site.

A Site contains a collection of Parameters, so most any Parameter specific to an Aircraft can be supported.

Constructor & Destructor Documentation

Aircraft::Aircraft ( )
Aircraft::~Aircraft ( )
virtual

Member Function Documentation

void nidas::core::Site::addDSMConfig ( DSMConfig dsm)
inlineinherited

A Site contains one or more DSMs.

Site will own the pointer and will delete the DSMConfig in its destructor.

References nidas::core::Site::_dsms, and nidas::core::Site::_ncDsms.

void Site::addParameter ( Parameter val)
virtualinherited

Add a parameter to this Site.

Site will then own the pointer and will delete it in its destructor.

References nidas::core::Site::_constParameters, nidas::core::Site::_parameterMap, and nidas::core::Parameter::getName().

void nidas::core::Site::addServer ( DSMServer srvr)
inlineinherited

A Site has one or more DSMServers.

References nidas::core::Site::_servers.

std::string nidas::core::Site::expandString ( const std::string &  input) const
inlineinherited

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 nidas::core::Site::_dictionary, and nidas::core::Dictionary::expandString().

Referenced by PConfig::getHostNames().

const DSMConfig * Site::findDSM ( const nidas::util::Inet4Address addr) const
inherited

Find a DSM whose name corresponds to a given IP address.

References nidas::core::Site::_dsms, nidas::util::Inet4Address::getAllByName(), nidas::core::DSMConfig::getName(), and VLOG.

Referenced by nidas::core::Project::findDSM().

const DSMConfig * Site::findDSM ( unsigned int  id) const
inherited
const DSMConfig * Site::findDSM ( const std::string &  name) const
inherited

Find a DSM by name.

References nidas::core::Site::_dsms, nidas::core::DSMConfig::getName(), and VLOG.

DSMSensor * Site::findSensor ( unsigned int  id) const
inherited
DSMServer * Site::findServer ( const std::string &  hostname) const
inherited

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 nidas::core::Site::_servers, and nidas::core::DSMServer::getName().

void Site::fromDOMElement ( const xercesc::DOMElement *  )
throw (nidas::util::InvalidParameterException
)
virtualinherited
Aircraft * Aircraft::getAircraft ( Project project)
static

Search the Project for the Aircraft site and return a pointer to it, or return null if there are no Aircraft sites.

References nidas::core::Project::getSites().

Referenced by nidas::dynld::raf::SyncRecordSource::connect().

virtual bool nidas::core::Site::getApplyVariableConversions ( ) const
inlinevirtualinherited

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 nidas::core::Site::_applyCals.

Referenced by nidas::core::Variable::convert().

const Dictionary& nidas::core::Site::getDictionary ( ) const
inlineinherited
DSMConfigIterator Site::getDSMConfigIterator ( ) const
inherited
const std::list<const DSMConfig*>& nidas::core::Site::getDSMConfigs ( ) const
inlineinherited
const std::list<DSMConfig*>& nidas::core::Site::getDSMConfigs ( )
inlineinherited
DSMServerIterator Site::getDSMServerIterator ( ) const
inherited
DSMServiceIterator Site::getDSMServiceIterator ( ) const
inherited
const std::string& nidas::core::Site::getName ( ) const
inlineinherited
static const XMLCh* nidas::core::DOMable::getNamespaceURI ( )
inlinestaticinherited
int nidas::core::Site::getNumber ( ) const
inlineinherited
const Parameter * Site::getParameter ( const std::string &  name) const
virtualinherited
const list< const Parameter * > & Site::getParameters ( ) const
virtualinherited
ProcessorIterator Site::getProcessorIterator ( ) const
inherited
const Project* nidas::core::Site::getProject ( ) const
inlineinherited
Project* nidas::core::Site::getProject ( )
inlineinherited
SampleTagIterator Site::getSampleTagIterator ( ) const
inherited
SensorIterator Site::getSensorIterator ( ) const
inherited
const std::list<DSMServer*>& nidas::core::Site::getServers ( ) const
inlineinherited
const std::string& nidas::core::Site::getSuffix ( ) const
inlineinherited
string Aircraft::getTailNumber ( ) const

Get/Set tail number of this aircraft.

References nidas::core::Parameter::getLength(), and nidas::core::Parameter::getStringValue().

bool nidas::core::Site::getTokenValue ( const std::string &  token,
std::string &  value 
) const
inlineinherited

Implement a lookup for tokens that I know about, like $SITE, and $AIRCRAFT.

For other tokens, call getProject()->getTokenValue(token,value);

References nidas::core::Site::_dictionary, and nidas::core::Site::MyDictionary::getTokenValue().

Referenced by nidas::core::DSMConfig::MyDictionary::getTokenValue().

VariableIterator Site::getVariableIterator ( ) const
inherited
void Site::initSensors ( )
throw (nidas::util::IOException
)
inherited
void Site::initSensors ( DSMConfig dsm)
throw (nidas::util::IOException
)
inherited

Initialize all sensors for a given dsm.

References nidas::core::DSMConfig::initSensors().

bool nidas::core::Site::operator!= ( const Site x) const
inlineinherited

Non-equivalence operator for Site.

References nidas::core::Site::operator==().

bool nidas::core::Site::operator< ( const Site x) const
inlineinherited

Less than operator for Site, compares the names.

References nidas::core::Site::_name.

bool nidas::core::Site::operator== ( const Site x) const
inlineinherited

Equivalence operator for Site, checks name.

References nidas::core::Site::_name, nidas::core::Site::_number, and nidas::core::Site::_suffix.

Referenced by nidas::core::Site::operator!=().

void nidas::core::Site::removeDSMConfig ( DSMConfig dsm)
inlineinherited
void nidas::core::Site::setName ( const std::string &  val)
inlineinherited

Set the name of the Site.

References nidas::core::Site::_name.

void nidas::core::Site::setNumber ( int  val)
inlineinherited

Identify the Site by number.

The site number can be used for things like a NetCDF station dimension.

Parameters
Sitenumber, 0 means no number is associated with the site.

References nidas::core::Site::_number.

void nidas::core::Site::setProject ( Project val)
inlineinherited

Set the current project for this Site.

References nidas::core::Site::_project.

Referenced by nidas::core::Project::fromDOMElement().

void nidas::core::Site::setSuffix ( const std::string &  val)
inlineinherited

Set the suffix for the Site.

All variable names from this site will have the suffix.

References nidas::core::Site::_suffix.

void Aircraft::setTailNumber ( const std::string &  val)
xercesc::DOMElement * Site::toDOMElement ( xercesc::DOMElement *  node,
bool  complete 
) const
throw (xercesc::DOMException
)
virtualinherited
xercesc::DOMElement * Site::toDOMParent ( xercesc::DOMElement *  parent,
bool  complete 
) const
throw (xercesc::DOMException
)
virtualinherited

Create a DOMElement and append it to the parent.

Reimplemented from nidas::core::DOMable.

References nidas::core::DOMable::getNamespaceURI().

Referenced by nidas::core::Project::toDOMElement().

void Site::validate ( )
throw (nidas::util::InvalidParameterException
)
inherited

Member Data Documentation

bool nidas::core::Site::_applyCals
protectedinherited

Should NIDAS apply calibrations, or defer them to other processing.

Referenced by nidas::core::Site::getApplyVariableConversions().


The documentation for this class was generated from the following files: