nidas v1.2.3
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | Static Private Attributes | List of all members
nidas::dynld::isff::CS_Krypton Class Reference

A data converter from voltage to water vapor density in gm/m^3 for a Campbell Scientfic krypton hygrometer. More...

#include <CS_Krypton.h>

Inheritance diagram for nidas::dynld::isff::CS_Krypton:
Inheritance graph
[legend]

Public Member Functions

 CS_Krypton ()
 
CS_Kryptonclone () const
 
void setKw (float val)
 
float getKw () const
 
void setV0 (float val)
 
float getV0 () const
 
void setPathLength (float val)
 
float getPathLength () const
 
void setBias (float val)
 
float getBias () const
 
void reset ()
 Reset the converter to invalid or default settings, such as after an error occurs parsing a CalFile.
 
double convert (dsm_time_t t, double volts)
 Convert a voltage to water vapor density in g/m^3.
 
std::string toString () const
 Generate a string description of this VariableConverter.
 
void fromString (const std::string &)
 
void fromDOMElement (const xercesc::DOMElement *)
 Initialize myself from a xercesc::DOMElement.
 
virtual void readCalFile (dsm_time_t) throw ()
 Before a VariableConverter can be used for a conversion, the converter's CalFile, if it exists, needs to be advanced to the right record for the current sample time.
 
void setCalFileHandler (CalFileHandler *)
 Set the instance of CalFileHandler which will be called and given first option to handle new CalFile records.
 
void setUnits (const std::string &val)
 
virtual const std::string & getUnits () const
 
void setVariable (const Variable *val)
 
const VariablegetVariable () const
 
const DSMSensorgetDSMSensor () const
 
const DSMConfiggetDSMConfig () const
 
void addParameter (Parameter *val)
 Add a parameter to this VariableConverter.
 
const std::list< const Parameter * > & getParameters () const
 Get list of parameters.
 
const ParametergetParameter (const std::string &name) const
 Fetch a parameter by name.
 
void setCalFile (CalFile *)
 
CalFilegetCalFile ()
 
const CalFilegetCalFile () const
 
virtual xercesc::DOMElement * toDOMParent (xercesc::DOMElement *parent, bool complete) const
 Create a DOMElement and append it to the parent.
 
virtual xercesc::DOMElement * toDOMElement (xercesc::DOMElement *node, bool complete) const
 Add my content into a DOMElement.
 

Static Public Member Functions

static VariableConvertercreateVariableConverter (XDOMElement &child)
 
static VariableConvertercreateFromString (const std::string &)
 
static const XMLChgetNamespaceURI ()
 

Protected Member Functions

void parseFields (CalFile *cf)
 Parse the fields in the current CalFile record for the particular settings and coefficients needed by this converter.
 
void abortCalFile (const std::string &what)
 

Protected Attributes

CalFile_calFile
 
CalFileHandler_handler
 

Private Attributes

float _Kw
 
float _V0
 
float _logV0
 
float _pathLength
 
float _bias
 
float _pathLengthKw
 
std::string _units
 
std::map< std::string, Parameter * > _parameters
 Map of parameters by name.
 
std::list< const Parameter * > _constParameters
 List of const pointers to Parameters for providing via getParameters().
 
const Variable_variable
 

Static Private Attributes

static XMLChnamespaceURI = 0
 

Detailed Description

A data converter from voltage to water vapor density in gm/m^3 for a Campbell Scientfic krypton hygrometer.

Constructor & Destructor Documentation

◆ CS_Krypton()

CS_Krypton::CS_Krypton ( )

Referenced by clone().

Member Function Documentation

◆ abortCalFile()

void VariableConverter::abortCalFile ( const std::string & what)
protectedinherited

◆ addParameter()

void VariableConverter::addParameter ( Parameter * val)
inherited

Add a parameter to this VariableConverter.

VariableConverter will then own the pointer and will delete it in its destructor. If a Parameter exists with the same name, it will be replaced with the new Parameter.

References nidas::core::VariableConverter::_constParameters, nidas::core::VariableConverter::_parameters, and nidas::core::getSample().

Referenced by nidas::core::VariableConverter::fromDOMElement(), nidas::core::VariableConverter::operator=(), and nidas::core::VariableConverter::VariableConverter().

◆ clone()

CS_Krypton * CS_Krypton::clone ( ) const
virtual

◆ convert()

double CS_Krypton::convert ( dsm_time_t t,
double volts )
virtual

Convert a voltage to water vapor density in g/m^3.

Implements nidas::core::VariableConverter.

References _bias, _logV0, _pathLengthKw, nidas::core::getSample(), and nidas::core::VariableConverter::readCalFile().

◆ createFromString()

VariableConverter * VariableConverter::createFromString ( const std::string & str)
staticinherited

◆ createVariableConverter()

VariableConverter * VariableConverter::createVariableConverter ( XDOMElement & child)
staticinherited

◆ fromDOMElement()

void CS_Krypton::fromDOMElement ( const xercesc::DOMElement * )
virtual

◆ fromString()

void CS_Krypton::fromString ( const std::string & )
virtual

◆ getBias()

float nidas::dynld::isff::CS_Krypton::getBias ( ) const
inline

References _bias.

◆ getCalFile() [1/2]

CalFile * nidas::core::VariableConverter::getCalFile ( )
inlineinherited

◆ getCalFile() [2/2]

const CalFile * nidas::core::VariableConverter::getCalFile ( ) const
inlineinherited

◆ getDSMConfig()

const DSMConfig * VariableConverter::getDSMConfig ( ) const
inherited

◆ getDSMSensor()

const DSMSensor * VariableConverter::getDSMSensor ( ) const
inherited

◆ getKw()

float nidas::dynld::isff::CS_Krypton::getKw ( ) const
inline

References _Kw.

◆ getNamespaceURI()

static const XMLCh * nidas::core::DOMable::getNamespaceURI ( )
inlinestaticinherited

◆ getParameter()

const Parameter * VariableConverter::getParameter ( const std::string & name) const
inherited

Fetch a parameter by name.

Returns a NULL pointer if no such parameter exists.

References nidas::core::VariableConverter::_parameters.

Referenced by fromDOMElement().

◆ getParameters()

const std::list< const Parameter * > & nidas::core::VariableConverter::getParameters ( ) const
inlineinherited

Get list of parameters.

References nidas::core::VariableConverter::_constParameters.

◆ getPathLength()

float nidas::dynld::isff::CS_Krypton::getPathLength ( ) const
inline

References _pathLength.

◆ getUnits()

virtual const std::string & nidas::core::VariableConverter::getUnits ( ) const
inlinevirtualinherited

◆ getV0()

float nidas::dynld::isff::CS_Krypton::getV0 ( ) const
inline

References _V0.

◆ getVariable()

const Variable * nidas::core::VariableConverter::getVariable ( ) const
inlineinherited

◆ parseFields()

void CS_Krypton::parseFields ( CalFile * cf)
protectedvirtual

Parse the fields in the current CalFile record for the particular settings and coefficients needed by this converter.

Implements nidas::core::VariableConverter.

References setBias(), setKw(), setPathLength(), and setV0().

◆ readCalFile()

void VariableConverter::readCalFile ( dsm_time_t t)
throw ( )
virtualinherited

Before a VariableConverter can be used for a conversion, the converter's CalFile, if it exists, needs to be advanced to the right record for the current sample time.

As records are read, this method calls parseFields() so the VariableConverter subclass can extract the particular information it needs from the CalFile fields, typically coefficients.

For sensors which need to extend the kind of conversions which can be specified by a CalFile, there is a callback function available. See setCalFileHandler().

References DLOG, nidas::util::UTime::format(), and nidas::core::getSample().

Referenced by nidas::core::Linear::convert(), nidas::core::Polynomial::convert(), convert(), nidas::dynld::isff::RebsLinear::convert(), nidas::dynld::isff::NCAR_TRH::convertVariable(), and nidas::dynld::raf::SyncRecordSource::preLoadCalibrations().

◆ reset()

void CS_Krypton::reset ( )
virtual

Reset the converter to invalid or default settings, such as after an error occurs parsing a CalFile.

Implements nidas::core::VariableConverter.

References setBias(), setKw(), setPathLength(), and setV0().

◆ setBias()

void nidas::dynld::isff::CS_Krypton::setBias ( float val)
inline
Parameters
valBias (g/m^3) to be removed from data values.

References _bias, and nidas::core::getSample().

Referenced by fromDOMElement(), parseFields(), and reset().

◆ setCalFile()

void VariableConverter::setCalFile ( CalFile * val)
inherited

◆ setCalFileHandler()

void VariableConverter::setCalFileHandler ( CalFileHandler * cfh)
inherited

Set the instance of CalFileHandler which will be called and given first option to handle new CalFile records.

Pass null to disable the callbacks.

References nidas::core::VariableConverter::_handler, and nidas::core::getSample().

◆ setKw()

void nidas::dynld::isff::CS_Krypton::setKw ( float val)
inline
Parameters
valKw parameter from sensor calibration.

References _Kw, _pathLength, _pathLengthKw, and nidas::core::getSample().

Referenced by fromDOMElement(), parseFields(), and reset().

◆ setPathLength()

void nidas::dynld::isff::CS_Krypton::setPathLength ( float val)
inline
Parameters
valPathlength of sensor, in cm.

References _Kw, _pathLength, _pathLengthKw, and nidas::core::getSample().

Referenced by fromDOMElement(), parseFields(), and reset().

◆ setUnits()

void nidas::core::VariableConverter::setUnits ( const std::string & val)
inlineinherited

◆ setV0()

void nidas::dynld::isff::CS_Krypton::setV0 ( float val)
inline
Parameters
valV0 value in millivolts.

References _logV0, _V0, and nidas::core::getSample().

Referenced by fromDOMElement(), parseFields(), and reset().

◆ setVariable()

void nidas::core::VariableConverter::setVariable ( const Variable * val)
inlineinherited

◆ toDOMElement()

xercesc::DOMElement * DOMable::toDOMElement ( xercesc::DOMElement * node,
bool complete ) const
virtualinherited

◆ toDOMParent()

xercesc::DOMElement * DOMable::toDOMParent ( xercesc::DOMElement * parent,
bool complete ) const
virtualinherited

Create a DOMElement and append it to the parent.

Exceptions
xercesc::DOMException

Reimplemented in nidas::core::DSMConfig, nidas::core::DSMSensor, nidas::core::Project, nidas::core::SampleTag, nidas::core::Site, nidas::core::ServerSocket, and nidas::core::Variable.

◆ toString()

std::string CS_Krypton::toString ( ) const
virtual

Generate a string description of this VariableConverter.

May be used in meta-data, for example Netcdf comment.

Implements nidas::core::VariableConverter.

Member Data Documentation

◆ _bias

float nidas::dynld::isff::CS_Krypton::_bias
private

Referenced by convert(), getBias(), and setBias().

◆ _calFile

CalFile* nidas::core::VariableConverter::_calFile
protectedinherited

◆ _constParameters

std::list<const Parameter*> nidas::core::VariableConverter::_constParameters
privateinherited

◆ _handler

CalFileHandler* nidas::core::VariableConverter::_handler
protectedinherited

◆ _Kw

float nidas::dynld::isff::CS_Krypton::_Kw
private

Referenced by getKw(), setKw(), and setPathLength().

◆ _logV0

float nidas::dynld::isff::CS_Krypton::_logV0
private

Referenced by convert(), and setV0().

◆ _parameters

std::map<std::string,Parameter*> nidas::core::VariableConverter::_parameters
privateinherited

◆ _pathLength

float nidas::dynld::isff::CS_Krypton::_pathLength
private

Referenced by getPathLength(), setKw(), and setPathLength().

◆ _pathLengthKw

float nidas::dynld::isff::CS_Krypton::_pathLengthKw
private

Referenced by convert(), setKw(), and setPathLength().

◆ _units

std::string nidas::core::VariableConverter::_units
privateinherited

◆ _V0

float nidas::dynld::isff::CS_Krypton::_V0
private

Referenced by getV0(), and setV0().

◆ _variable

const Variable* nidas::core::VariableConverter::_variable
privateinherited

◆ namespaceURI

XMLCh * DOMable::namespaceURI = 0
staticprivateinherited

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