27 #ifndef _nidas_dynld_raf_a2d_serial_h_
28 #define _nidas_dynld_raf_a2d_serial_h_
36 #define NUM_A2D_CHANNELS 4
39 namespace nidas {
namespace dynld {
namespace raf {
41 using namespace nidas::core;
80 void extractStatus(
const char *msg,
int len);
82 void printStatus(std::ostream& ostr)
throw();
85 bool process(
const Sample* samp,std::list<const Sample*>& results)
95 int getGain(
int ichan)
const;
101 int getBipolar(
int ichan)
const;
107 virtual void setConversionCorrection(
int ichan,
const float d[],
124 void parseConfigLine(const
char *data);
126 void dumpConfig() const;
133 bool checkCkSum(const
Sample *samp, const
char *data);
138 bool samplingChannel(
int channel) const;
150 float applyCalibration(
float value, const std::vector<
float> &cals) const;
204 int _ifsr[NUM_A2D_CHANNELS];
205 int _ipol[NUM_A2D_CHANNELS];
208 int _gains[NUM_A2D_CHANNELS];
209 int _polarity[NUM_A2D_CHANNELS];
219 std::map<std::
string,
int> configStatus;
222 std::vector<
float> _polyCals[NUM_A2D_CHANNELS];
224 size_t _shortPacketCnt;
226 size_t _largeTimeStampOffset;
236 A2D_Serial& operator=(const A2D_Serial&);
A class for reading ASCII files containing a time series of calibration data.
Definition: CalFile.h:164
#define NUM_A2D_CHANNELS
Definition: A2D_Serial.h:36
Support for a sensor that is sending packets on a TCP socket, a UDP socket, a Bluetooth RF Comm socke...
Definition: SerialSensor.h:64
long long dsm_time_t
Posix time in microseconds, the number of non-leap microseconds since 1970 Jan 1 00:00 UTC...
Definition: Sample.h:61
Definition: A2D_Serial.h:53
OutputMode getOutputMode() const
Definition: A2D_Serial.h:112
virtual const void * getConstVoidDataPtr() const =0
Get a const void* pointer to the data portion of the sample.
OutputMode
Definition: A2D_Serial.h:53
int len
Definition: sing.cc:934
Interface to a data sample.
Definition: Sample.h:189
Definition: IOException.h:37
unsigned int getDataByteLength() const
Get the number of bytes in data portion of sample.
Definition: Sample.h:256
virtual Sample * nextSample()
Extract the next sample from the buffer.
Definition: DSMSensor.h:707
A2D Serial Sensor.
Definition: A2D_Serial.h:49
void setOutputMode(OutputMode mode)
Definition: A2D_Serial.h:110
Definition: InvalidParameterException.h:35