nidas  v1.2-1520
CSI_IRGA_Sonic.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  ** 2012, 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_ISFF_CSI_IRGA_SONIC_H
28 #define NIDAS_DYNLD_ISFF_CSI_IRGA_SONIC_H
29 
30 #include "CSAT3_Sonic.h"
31 
32 #include <nidas/Config.h>
35 
36 class TimetagAdjuster;
37 
38 namespace nidas { namespace dynld { namespace isff {
39 
45 {
46 public:
47 
49 
51 
52  void open(int flags)
54 
56 
58 
59  bool process(const Sample* samp,std::list<const Sample*>& results)
60  throw();
61 
65  static unsigned short signature(const unsigned char* buf, const unsigned char* eob);
66 
67 private:
68 
70 
71  bool reportBadCRC();
72 
76  unsigned int _numOut;
77 
91 
95  unsigned int _badCRCs;
96 
102 
108  bool _binary;
109 
114 
119 
121 
124 
127 
128 };
129 
130 }}} // namespace nidas namespace dynld namespace isff
131 
132 #endif
const nidas::util::EndianConverter * _converter
Converter for binary values.
Definition: CSI_IRGA_Sonic.h:118
VariableIndex _irgaDiag
Definition: CSI_IRGA_Sonic.h:97
endianness
Definition: EndianConverter.h:309
VariableIndex _Tirga
Definition: CSI_IRGA_Sonic.h:101
int _timeDelay
Filter time delay, depends on the selected bandwidth.
Definition: CSI_IRGA_Sonic.h:90
A class for making sense of data from a Campbell Scientific IRGASON integrated Gas Analyzer and 3D so...
Definition: CSI_IRGA_Sonic.h:44
nidas::core::TimetagAdjuster * _ttadjust
Definition: CSI_IRGA_Sonic.h:120
Adjust time tags of fixed delta-T time series to correct for irregular latency in the assignments of ...
Definition: TimetagAdjuster.h:45
A class for making sense of data from a Campbell Scientific Inc CSAT3 3D sonic anemometer.
Definition: CSAT3_Sonic.h:45
VariableIndex _Pirga
Definition: CSI_IRGA_Sonic.h:100
void open(int flags)
Open the serial port connected to this sonic.
Definition: CSI_IRGA_Sonic.cc:68
Virtual base class declaring methods for converting numeric values between little-endian and big-endi...
Definition: EndianConverter.h:304
void checkSampleTags()
Check the SampleTags that are defined for this sensor.
Definition: CSI_IRGA_Sonic.cc:101
bool reportBadCRC()
Definition: CSI_IRGA_Sonic.cc:183
void parseParameters()
Parse the list of nidas::core::Parameter that are associated with this sensor.
Definition: CSI_IRGA_Sonic.cc:74
bool process(const Sample *samp, std::list< const Sample * > &results)
Process a raw sample, which in this case means do a sscanf on the character string contents...
Definition: CSI_IRGA_Sonic.cc:191
Interface to a data sample.
Definition: Sample.h:189
Definition: IOException.h:37
bool _binary
Campbell has provided custom firmware on the EC100 logger box so that it can generate binary values (...
Definition: CSI_IRGA_Sonic.h:108
A VariableIndex associates a Variable pointer with it&#39;s index into it&#39;s SampleTag.
Definition: VariableIndex.h:51
nidas::util::EndianConverter::endianness _endian
Endian-ness of binary values.
Definition: CSI_IRGA_Sonic.h:113
unsigned int _numOut
Requested number of output variables.
Definition: CSI_IRGA_Sonic.h:76
static unsigned short signature(const unsigned char *buf, const unsigned char *eob)
Calculate the CRC signature of a data record.
Definition: CSI_IRGA_Sonic.cc:163
VariableIndex _co2
Definition: CSI_IRGA_Sonic.h:99
unsigned int _badCRCs
Counter of the number of records with incorrect CRC signatures.
Definition: CSI_IRGA_Sonic.h:95
VariableIndex _h2o
Definition: CSI_IRGA_Sonic.h:98
~CSI_IRGA_Sonic()
Definition: CSI_IRGA_Sonic.cc:60
CSI_IRGA_Sonic & operator=(const CSI_IRGA_Sonic &)
No assignment.
nidas::core::VariableIndex VariableIndex
Definition: CSI_IRGA_Sonic.h:69
Definition: InvalidParameterException.h:35
CSI_IRGA_Sonic()
Definition: CSI_IRGA_Sonic.cc:43