nidas v1.2.3
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
34namespace nidas { namespace dynld { namespace isff {
35
38
39class TimetagAdjuster;
40
47{
48public:
49
51
53
54 void validate();
55
56 bool process(const Sample* samp,std::list<const nidas::core::Sample*>& results)
57 throw();
58
62 static unsigned short signature(const unsigned char* buf, const unsigned char* eob);
63
64private:
65
66 bool reportBadCRC();
67
72
77
81 unsigned int _badCRCs;
82
84
87
90
91
92};
93
94}}} // namespace nidas namespace dynld namespace isff
95
96#endif
Interface to a data sample.
Definition Sample.h:190
Support for a sensor that is sending packets on a TCP socket, a UDP socket, a Bluetooth RF Comm socke...
Definition SerialSensor.h:65
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 parsing the binary output of Campbell Scientific CR10X and CR23X data loggers.
Definition CSI_CRX_Binary.h:47
void validate()
Implementation of DSMSensor::validate for a Character Sensor.
Definition CSI_CRX_Binary.cc:60
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:75
bool process(const Sample *samp, std::list< const nidas::core::Sample * > &results)
Definition CSI_CRX_Binary.cc:107
nidas::core::TimetagAdjuster * _ttadjust
Definition CSI_CRX_Binary.h:83
unsigned int _badCRCs
Counter of the number of records with incorrect CRC signatures.
Definition CSI_CRX_Binary.h:81
bool reportBadCRC()
Definition CSI_CRX_Binary.cc:98
~CSI_CRX_Binary()
Definition CSI_CRX_Binary.cc:52
dsm_sample_id_t _sampleId
Output sample id.
Definition CSI_CRX_Binary.h:76
CSI_CRX_Binary()
Definition CSI_CRX_Binary.cc:44
int _numOut
Requested number of output variables.
Definition CSI_CRX_Binary.h:71
CSI_CRX_Binary & operator=(const CSI_CRX_Binary &)
No assignment.
CSI_CRX_Binary(const CSI_CRX_Binary &)
No copying.
unsigned int dsm_sample_id_t
Definition Sample.h:64
Root namespace for the NCAR In-Situ Data Acquisition Software.
Definition A2DConverter.h:31