nidas v1.2.3
|
A data converter from voltage to water vapor density in gm/m^3 for a Campbell Scientfic krypton hygrometer. More...
#include <CS_Krypton.h>
Public Member Functions | |
CS_Krypton () | |
CS_Krypton * | clone () 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 Variable * | getVariable () const |
const DSMSensor * | getDSMSensor () const |
const DSMConfig * | getDSMConfig () const |
void | addParameter (Parameter *val) |
Add a parameter to this VariableConverter. | |
const std::list< const Parameter * > & | getParameters () const |
Get list of parameters. | |
const Parameter * | getParameter (const std::string &name) const |
Fetch a parameter by name. | |
void | setCalFile (CalFile *) |
CalFile * | getCalFile () |
const CalFile * | getCalFile () 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 VariableConverter * | createVariableConverter (XDOMElement &child) |
static VariableConverter * | createFromString (const std::string &) |
static const XMLCh * | getNamespaceURI () |
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 XMLCh * | namespaceURI = 0 |
A data converter from voltage to water vapor density in gm/m^3 for a Campbell Scientfic krypton hygrometer.
CS_Krypton::CS_Krypton | ( | ) |
Referenced by clone().
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().
|
virtual |
Implements nidas::core::VariableConverter.
References CS_Krypton().
|
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().
|
staticinherited |
nidas::util::InvalidParameterException |
References nidas::core::getSample().
|
staticinherited |
References nidas::core::DOMObjectFactory::createObject(), and nidas::core::getSample().
Referenced by nidas::core::Variable::fromDOMElement().
Initialize myself from a xercesc::DOMElement.
nidas::util::InvalidParameterException |
Implements nidas::core::DOMable.
References nidas::core::VariableConverter::fromDOMElement(), nidas::core::VariableConverter::getParameter(), nidas::core::getSample(), setBias(), setKw(), setPathLength(), and setV0().
nidas::util::InvalidParameterException |
Reimplemented from nidas::core::VariableConverter.
|
inlineinherited |
References nidas::core::VariableConverter::_calFile.
Referenced by nidas::core::SampleTag::fromDOMElement(), and nidas::dynld::isff::RebsLinear::toString().
References nidas::core::VariableConverter::_calFile.
References nidas::core::VariableConverter::getDSMSensor(), and nidas::core::getSample().
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(), nidas::core::Site::toDOMParent(), nidas::core::ServerSocket::toDOMParent(), nidas::core::Variable::toDOMParent(), nidas::core::Datasets::writeXML(), and nidas::core::ProjectConfigs::writeXML().
Fetch a parameter by name.
Returns a NULL pointer if no such parameter exists.
References nidas::core::VariableConverter::_parameters.
Referenced by fromDOMElement().
|
inlineinherited |
Get list of parameters.
References nidas::core::VariableConverter::_constParameters.
|
inline |
References _pathLength.
References nidas::core::VariableConverter::_variable.
Referenced by nidas::core::VariableConverter::getDSMSensor().
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().
|
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().
|
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().
val | Bias (g/m^3) to be removed from data values. |
References _bias, and nidas::core::getSample().
Referenced by fromDOMElement(), parseFields(), and reset().
References nidas::core::VariableConverter::_calFile, and nidas::core::getSample().
Referenced by nidas::core::VariableConverter::fromDOMElement().
|
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().
val | Kw parameter from sensor calibration. |
References _Kw, _pathLength, _pathLengthKw, and nidas::core::getSample().
Referenced by fromDOMElement(), parseFields(), and reset().
val | Pathlength of sensor, in cm. |
References _Kw, _pathLength, _pathLengthKw, and nidas::core::getSample().
Referenced by fromDOMElement(), parseFields(), and reset().
val | V0 value in millivolts. |
References _logV0, _V0, and nidas::core::getSample().
Referenced by fromDOMElement(), parseFields(), and reset().
References nidas::core::VariableConverter::_variable, and nidas::core::getSample().
|
virtualinherited |
Add my content into a DOMElement.
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.
Referenced by nidas::core::ServerSocket::toDOMParent().
|
virtualinherited |
Create a DOMElement and append it to the parent.
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.
|
virtual |
Generate a string description of this VariableConverter.
May be used in meta-data, for example Netcdf comment.
Implements nidas::core::VariableConverter.
|
private |
|
protectedinherited |
Referenced by nidas::core::VariableConverter::abortCalFile(), nidas::core::VariableConverter::getCalFile(), nidas::core::VariableConverter::getCalFile(), nidas::core::VariableConverter::operator=(), nidas::core::Polynomial::parseFields(), nidas::core::VariableConverter::setCalFile(), nidas::core::VariableConverter::VariableConverter(), and nidas::core::VariableConverter::~VariableConverter().
List of const pointers to Parameters for providing via getParameters().
Referenced by nidas::core::VariableConverter::addParameter(), nidas::core::VariableConverter::getParameters(), and nidas::core::VariableConverter::~VariableConverter().
|
protectedinherited |
|
private |
Referenced by getKw(), setKw(), and setPathLength().
|
privateinherited |
Map of parameters by name.
Referenced by nidas::core::VariableConverter::addParameter(), and nidas::core::VariableConverter::getParameter().
|
private |
Referenced by getPathLength(), setKw(), and setPathLength().
|
private |
Referenced by convert(), setKw(), and setPathLength().
|
privateinherited |
|
staticprivateinherited |
Referenced by nidas::core::DOMable::getNamespaceURI().