nidas  v1.2-1520
LamsSensor.h
Go to the documentation of this file.
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; tab-width: 4; -*-
2 // vim: set shiftwidth=4 softtabstop=4 expandtab:
3 /*
4  ********************************************************************
5  ** NIDAS: NCAR In-situ Data Acquistion Software
6  **
7  ** 2007, Copyright University Corporation for Atmospheric Research
8  **
9  ** This program is free software; you can redistribute it and/or modify
10  ** it under the terms of the GNU General Public License as published by
11  ** the Free Software Foundation; either version 2 of the License, or
12  ** (at your option) any later version.
13  **
14  ** This program is distributed in the hope that it will be useful,
15  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
16  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  ** GNU General Public License for more details.
18  **
19  ** The LICENSE.txt file accompanying this software contains
20  ** a copy of the GNU General Public License. If it is not found,
21  ** write to the Free Software Foundation, Inc.,
22  ** 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23  **
24  ********************************************************************
25 */
26 /* LamsSensor.h
27 
28 */
29 
30 
31 #ifndef NIDAS_DYNLD_RAF_LAMSSENSOR_H
32 #define NIDAS_DYNLD_RAF_LAMSSENSOR_H
33 
34 #include <nidas/linux/lams/lamsx.h>
35 
36 #include <nidas/core/DSMSensor.h>
38 
40 
41 namespace nidas { namespace dynld { namespace raf {
42 
43 using namespace nidas::core;
44 namespace n_u = nidas::util;
45 
50 class LamsSensor : public DSMSensor, public DerivedDataClient
51 {
52 public:
53  LamsSensor();
54 
55  void fromDOMElement(const xercesc::DOMElement* node)
57 
58  void printStatus(std::ostream& ostr) throw();
59 
60  virtual void
61  derivedDataNotify(const nidas::core:: DerivedDataReader * s)
62  throw();
63 
64  bool process(const Sample* samp,std::list<const Sample*>& results)
65  throw();
66 
67  IODevice* buildIODevice() throw(n_u::IOException);
68 
69  SampleScanner* buildSampleScanner() throw(n_u::InvalidParameterException);
70 
74  void open(int flags) throw(nidas::util::IOException,
76 
77  void close() throw(nidas::util::IOException);
78 
79 private:
80 
81  int nAVG;
82 
83  int nPEAK;
84 
85  float TAS_level;
86  enum {BELOW, ABOVE} TASlvl;
87 
88  float tas; // True Airspeed. Meters per second
89  int tas_step; // generate a True Airspeed (set to 0 to disable)
90 
94  int nSKIP;
95 };
96 
97 }}}
98 
99 #endif
Definition: LamsSensor.h:86
int nSKIP
Number of initial spectral values to skip when reading from the card.
Definition: LamsSensor.h:94
int nPEAK
Definition: LamsSensor.h:83
Sensor class supporting the NCAR/EOL Laser Air Motion Sensor (LAMS) via a DSM.
Definition: LamsSensor.h:50
float TAS_level
Definition: LamsSensor.h:85
An interface to an IO device.
Definition: IODevice.h:41
Interface to a data sample.
Definition: Sample.h:189
DSMSensor provides the basic support for reading, processing and distributing samples from a sensor a...
Definition: DSMSensor.h:87
Definition: IOException.h:37
A scanner of sample data.
Definition: SampleScanner.h:73
int tas_step
Definition: LamsSensor.h:89
This class will read, parse and make available the parameters in the onboard real-time broadcast of d...
Definition: DerivedDataReader.h:44
int nAVG
Definition: LamsSensor.h:81
float tas
Definition: LamsSensor.h:88
Interface of a DerivedDataClient of the DerivedDataReader.
Definition: DerivedDataClient.h:37
Definition: InvalidParameterException.h:35