26#ifndef NIDAS_DYNLD_RAF_DSMANALOGSENSOR_H
27#define NIDAS_DYNLD_RAF_DSMANALOGSENSOR_H
34namespace nidas {
namespace dynld {
namespace raf {
121 void executeXmlRpc(XmlRpc::XmlRpcValue& params, XmlRpc::XmlRpcValue& result)
124 void getA2DSetup(XmlRpc::XmlRpcValue& params, XmlRpc::XmlRpcValue& result)
127 void testVoltage(XmlRpc::XmlRpcValue& params, XmlRpc::XmlRpcValue& result)
202 {
return(c[0] + x * (c[1] + x * c[2])); }
Virtual class with methods for performing conversions from integer A2D counts to floating point volta...
Definition A2DConverter.h:61
An interface to an IO device.
Definition IODevice.h:42
A scanner of sample data.
Definition SampleScanner.h:74
Class describing a group of variables that are sampled and handled together.
Definition SampleTag.h:88
Interface to a data sample.
Definition Sample.h:190
Virtual base class for supporting sensors attached to an A2D.
Definition A2DSensor.h:46
Support for the PC104 A2D, developed at NCAR EOL.
Definition DSMAnalogSensor.h:41
void getA2DSetup(XmlRpc::XmlRpcValue ¶ms, XmlRpc::XmlRpcValue &result)
Definition DSMAnalogSensor.cc:594
static const int N_COEFF
How many different Voltages were measured at each temperature in the chamber.
Definition DSMAnalogSensor.h:214
int getInt32TimeTagUsecs() const
Definition DSMAnalogSensor.h:116
float voltageActual(float voltageMeasured)
Given a measured voltage and using the A/D temperature, perform a lookup using two dimentional interp...
Definition DSMAnalogSensor.cc:510
void init()
Called prior to any call to process().
Definition DSMAnalogSensor.cc:202
A2DConverter * _finalConverter
Definition DSMAnalogSensor.h:154
bool processTemperature(const Sample *, std::list< const Sample * > &result)
Definition DSMAnalogSensor.cc:376
void close()
Close the device connected to the sensor.
Definition DSMAnalogSensor.cc:197
float _currentTemperature
Capture the current A/D board temperature, so we can do a temperature drift compensation to all the r...
Definition DSMAnalogSensor.h:208
void setConversionCorrection(int ichan, float corIntercept, float corSlope)
void validate()
Definition DSMAnalogSensor.cc:539
DSMAnalogSensor()
Definition DSMAnalogSensor.cc:64
void getDefaultConversion(int ichan, float &intercept, float &slope) const
Get the default linear conversion for a channel.
Definition DSMAnalogSensor.cc:272
IODevice * buildIODevice()
Definition DSMAnalogSensor.cc:85
A2DConverter * getInitialConverter() const
Initial A2DConverter, containing the default conversion from counts to volts based on the gain and bi...
Definition DSMAnalogSensor.h:134
void testVoltage(XmlRpc::XmlRpcValue ¶ms, XmlRpc::XmlRpcValue &result)
Definition DSMAnalogSensor.cc:620
enum irigClockRates _temperatureRate
Rate of requested A2D board temperature, as an IRIG enumerated rate.
Definition DSMAnalogSensor.h:185
SampleScanner * buildSampleScanner()
Definition DSMAnalogSensor.cc:90
float SecondPoly(float x, const float c[]) const
Definition DSMAnalogSensor.h:201
int getMaxNumChannels() const
Definition DSMAnalogSensor.h:82
int _deltatUsec
The output delta t, 1/rate, in microseconds.
Definition DSMAnalogSensor.h:173
~DSMAnalogSensor()
Definition DSMAnalogSensor.cc:77
void setGainBipolar(int ichan, int gain, int bipolar)
Definition DSMAnalogSensor.cc:248
static const float TemperatureChamberVoltagesGain4[N_G4_VDC]
Temperature Chamber for 0-5 volts was done every half volt.
Definition DSMAnalogSensor.h:226
const SampleTag * _temperatureTag
Pointer to temperature SampleTag if user has asked for it, otherwise NULL.
Definition DSMAnalogSensor.h:179
void executeXmlRpc(XmlRpc::XmlRpcValue ¶ms, XmlRpc::XmlRpcValue &result)
Method invoked when the DSMEngineIntf XmlRpcServer receives a "SensorAction" request,...
Definition DSMAnalogSensor.cc:573
float getTemp()
Get the current temperature.
Definition DSMAnalogSensor.cc:335
A2DConverter * _initialConverter
Definition DSMAnalogSensor.h:152
void printStatus(std::ostream &ostr)
Definition DSMAnalogSensor.cc:342
int readFilterFile(const std::string &name, unsigned short *coefs, int nexpect)
Read a filter file containing coefficients for an Analog Devices A2D chip.
Definition DSMAnalogSensor.cc:207
DSMAnalogSensor(const DSMAnalogSensor &)
No copying.
static const float TemperatureTableGain4[N_G4_VDC][N_COEFF]
Table of coefficients for 0 to 5 Volts.
Definition DSMAnalogSensor.h:231
void open(int flags)
Open the device connected to the sensor.
Definition DSMAnalogSensor.cc:96
static const int N_G4_VDC
How many different temperature stages were measured in the chamber.
Definition DSMAnalogSensor.h:220
static const float DEGC_PER_CNT
Conversion factor from 16 bit raw temperature to degC.
Definition DSMAnalogSensor.h:190
A2DConverter * getFinalConverter() const
Final A2DConverter, updated from the CalFile, applied after the initial conversion,...
Definition DSMAnalogSensor.h:145
bool process(const Sample *, std::list< const Sample * > &result)
Process a raw sample, which in this case means unpack the A2D data buffer into individual samples and...
Definition DSMAnalogSensor.cc:399
DSMAnalogSensor & operator=(const DSMAnalogSensor &)
No assignment.
irigClockRates
Enumeration of the callback rates supported by this module.
Definition irigclock.h:52
The essential core classes of nidas.
Definition A2DConverter.h:31
Root namespace for the NCAR In-Situ Data Acquisition Software.
Definition A2DConverter.h:31
#define NUM_NCAR_A2D_CHANNELS
Definition ncar_a2d.h:55
#define USECS_PER_MSEC
Definition types.h:115