nidas v1.2.3
VCSEL_Serial.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 ** 2008, 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_vcsel_serial_h_
28#define _nidas_dynld_raf_vcsel_serial_h_
29
32
34
35namespace nidas { namespace dynld { namespace raf {
36
37using namespace nidas::core;
38
44{
45
46public:
49
53 void open(int flags);
54
55 void close();
56
57 int getATXRate() const { return _atxRate; }
58
59 void setATXRate(int val) { _atxRate = val; }
60
61 virtual void
62 derivedDataNotify(const nidas::core:: DerivedDataReader * s);
63
64 bool process(const Sample* samp,std::list<const Sample*>& results);
65
66protected:
71 virtual void sendAmbientTemperature(float atx);
72
77
83};
84
85}}} // namespace nidas namespace dynld namespace raf
86#endif
Interface of a DerivedDataClient of the DerivedDataReader.
Definition DerivedDataClient.h:37
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
VCSEL Serial Sensor.
Definition VCSEL_Serial.h:44
int _atxRate
How often to send ATX to the VCSEL.
Definition VCSEL_Serial.h:76
VCSEL_Serial()
Definition VCSEL_Serial.cc:39
virtual void derivedDataNotify(const nidas::core::DerivedDataReader *s)
Method called on a DerivedDataClient by the DerivedDataReader thread when a new packet of derived dat...
Definition VCSEL_Serial.cc:69
int _hz_counter
25Hz sample index counter.
Definition VCSEL_Serial.h:82
virtual void sendAmbientTemperature(float atx)
Send the ambient temperature up to the VCSEL.
Definition VCSEL_Serial.cc:84
~VCSEL_Serial()
Definition VCSEL_Serial.cc:43
void open(int flags)
open the sensor and perform any intialization to the driver.
Definition VCSEL_Serial.cc:48
int getATXRate() const
Definition VCSEL_Serial.h:57
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 VCSEL_Serial.cc:91
void setATXRate(int val)
Definition VCSEL_Serial.h:59
void close()
close my associated device.
Definition VCSEL_Serial.cc:61
The essential core classes of nidas.
Definition A2DConverter.h:31
Sample * getSample(sampleType type, unsigned int len)
A convienence method for getting a sample of an enumerated type from a pool.
Definition Sample.cc:70
Root namespace for the NCAR In-Situ Data Acquisition Software.
Definition A2DConverter.h:31