nidas  v1.2-1520
CSI_CRX_Binary.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_ISFF_CSI_CRX_BINARY_H
28 #define NIDAS_DYNLD_ISFF_CSI_CRX_BINARY_H
29 
31 #include <nidas/core/Sample.h>
33 
34 namespace nidas { namespace dynld { namespace isff {
35 
38 
39 class TimetagAdjuster;
40 
47 {
48 public:
49 
51 
53 
54  void validate()
56 
57  bool process(const Sample* samp,std::list<const nidas::core::Sample*>& results)
58  throw();
59 
63  static unsigned short signature(const unsigned char* buf, const unsigned char* eob);
64 
65 private:
66 
67  bool reportBadCRC();
68 
72  int _numOut;
73 
78 
82  unsigned int _badCRCs;
83 
85 
88 
91 
92 
93 };
94 
95 }}} // namespace nidas namespace dynld namespace isff
96 
97 #endif
A class for parsing the binary output of Campbell Scientific CR10X and CR23X data loggers...
Definition: CSI_CRX_Binary.h:46
unsigned int dsm_sample_id_t
Definition: Sample.h:63
static unsigned short signature(const unsigned char *buf, const unsigned char *eob)
Calculate the CRC signature of a data record.
Definition: CSI_CRX_Binary.cc:76
Support for a sensor that is sending packets on a TCP socket, a UDP socket, a Bluetooth RF Comm socke...
Definition: SerialSensor.h:64
Adjust time tags of fixed delta-T time series to correct for irregular latency in the assignments of ...
Definition: TimetagAdjuster.h:45
void validate()
Implementation of DSMSensor::validate for a Character Sensor.
Definition: CSI_CRX_Binary.cc:60
unsigned int _badCRCs
Counter of the number of records with incorrect CRC signatures.
Definition: CSI_CRX_Binary.h:82
CSI_CRX_Binary & operator=(const CSI_CRX_Binary &)
No assignment.
Interface to a data sample.
Definition: Sample.h:189
bool process(const Sample *samp, std::list< const nidas::core::Sample * > &results)
Definition: CSI_CRX_Binary.cc:108
bool reportBadCRC()
Definition: CSI_CRX_Binary.cc:99
nidas::core::TimetagAdjuster * _ttadjust
Definition: CSI_CRX_Binary.h:84
dsm_sample_id_t _sampleId
Output sample id.
Definition: CSI_CRX_Binary.h:77
CSI_CRX_Binary()
Definition: CSI_CRX_Binary.cc:44
~CSI_CRX_Binary()
Definition: CSI_CRX_Binary.cc:52
int _numOut
Requested number of output variables.
Definition: CSI_CRX_Binary.h:72
Definition: InvalidParameterException.h:35