nidas  v1.2-1520
AlicatSDI.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  ** 2013, 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 
27 #ifndef _nidas_dynld_raf_alicatsdi_h
28 #define _nidas_dynld_raf_alicatsdi_h
29 
32 #include <nidas/core/Parameter.h>
33 
35 
36 namespace nidas { namespace dynld { namespace raf {
37 
38 using namespace nidas::core;
39 
44 {
45 
46 public:
47  AlicatSDI();
48  ~AlicatSDI();
49 
53  void open(int flags) throw(nidas::util::IOException);
54 
58  void validate() throw(nidas::util::InvalidParameterException);
59 
60  void close() throw(nidas::util::IOException);
61 
62  void derivedDataNotify(const nidas::core:: DerivedDataReader * s) throw();
63 
64 
65 protected:
71  float computeFlow();
72  void sendFlow(float flow) throw(nidas::util::IOException);
73 
77  int _nTASav;
78 
82  std::vector<float> _tas;
83  int _tasIdx;
84  float *_tasWeight;
85 
86  // Ambient Temp and Statuc Press from DerivedDataReader
87  float _at, _ps;
88 
89  int _Qmin, _Qmax;
90 
91  float _Qfac;
92 
93  static const float Tstd;
94 
95 private:
96 
98  AlicatSDI(const AlicatSDI&);
99 
101  AlicatSDI& operator=(const AlicatSDI&);
102 
103 };
104 
105 }}} // namespace nidas namespace dynld namespace raf
106 #endif
float _Qfac
Definition: AlicatSDI.h:91
Support for a sensor that is sending packets on a TCP socket, a UDP socket, a Bluetooth RF Comm socke...
Definition: SerialSensor.h:64
std::vector< float > _tas
Use a vector as a circular buffer.
Definition: AlicatSDI.h:82
int _Qmin
Definition: AlicatSDI.h:89
Alicat Flow Controller, used for the SDI.
Definition: AlicatSDI.h:43
int _nTASav
maintain a running average of tas.
Definition: AlicatSDI.h:77
Definition: IOException.h:37
This class will read, parse and make available the parameters in the onboard real-time broadcast of d...
Definition: DerivedDataReader.h:44
float * _tasWeight
Definition: AlicatSDI.h:84
float _ps
Definition: AlicatSDI.h:87
static const float Tstd
Definition: AlicatSDI.h:93
int _tasIdx
Definition: AlicatSDI.h:83
Interface of a DerivedDataClient of the DerivedDataReader.
Definition: DerivedDataClient.h:37
Definition: InvalidParameterException.h:35