nidas v1.2.3
DSC_PulseCounter.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#ifndef NIDAS_DYNLD_DSC_PULSECOUNTER_H
27#define NIDAS_DYNLD_DSC_PULSECOUNTER_H
28
31
32namespace nidas { namespace dynld {
33
34using namespace nidas::core;
35
47
48public:
49
52
57
62
69 void open(int flags);
70
74 void validate();
75
79 void init();
80
86 void close();
87
91 void printStatus(std::ostream& ostr);
92
99 bool process(const Sample*,std::list<const Sample*>& result);
100
101private:
102
104
106
108
111
114
115};
116
117}} // namespace nidas namespace dynld
118
119#endif
DSMSensor provides the basic support for reading, processing and distributing samples from a sensor a...
Definition DSMSensor.h:88
An interface to an IO device.
Definition IODevice.h:42
A scanner of sample data.
Definition SampleScanner.h:74
Interface to a data sample.
Definition Sample.h:190
Sensor support for a simple pulse counter device.
Definition DSC_PulseCounter.h:46
DSC_PulseCounter()
Definition DSC_PulseCounter.cc:45
dsm_sample_id_t _sampleId
Definition DSC_PulseCounter.h:103
const nidas::util::EndianConverter * _cvtr
Definition DSC_PulseCounter.h:107
DSC_PulseCounter & operator=(const DSC_PulseCounter &)
No assignment.
DSC_PulseCounter(const DSC_PulseCounter &)
No copying.
bool process(const Sample *, std::list< const Sample * > &result)
Process a raw sample, which in this case means convert the input counts to a float.
Definition DSC_PulseCounter.cc:134
int _msecPeriod
Definition DSC_PulseCounter.h:105
~DSC_PulseCounter()
Definition DSC_PulseCounter.cc:52
void init()
Definition DSC_PulseCounter.cc:102
void printStatus(std::ostream &ostr)
Definition DSC_PulseCounter.cc:110
void open(int flags)
Open the device connected to the sensor.
Definition DSC_PulseCounter.cc:66
void validate()
Definition DSC_PulseCounter.cc:84
IODevice * buildIODevice()
Definition DSC_PulseCounter.cc:56
void close()
Close the device connected to the sensor.
Definition DSC_PulseCounter.cc:78
SampleScanner * buildSampleScanner()
Definition DSC_PulseCounter.cc:61
Virtual base class declaring methods for converting numeric values between little-endian and big-endi...
Definition EndianConverter.h:304
The essential core classes of nidas.
Definition A2DConverter.h:31
unsigned int dsm_sample_id_t
Definition Sample.h:64
Root namespace for the NCAR In-Situ Data Acquisition Software.
Definition A2DConverter.h:31