nidas v1.2.3
UDPiPMSensor.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_ipm_udp_h_
28#define _nidas_dynld_raf_ipm_udp_h_
29
32
33
34namespace nidas { namespace dynld { namespace raf {
35
36using namespace nidas::core;
37
42{
43
44public:
46 virtual ~UDPiPMSensor();
47
48 virtual void validate();
49
50 virtual void open(int flags);
51
52 virtual void close();
53
54protected:
55 // devicename of the NAI iPM device.
56 std::string _deviceAddr;
57
58 // Status port number for the ipm_ctrl program.
59 unsigned int _statusPort;
60
61 // STATUS & MEASURE collection rate (hz)
62 unsigned int _measureRate;
63
64 // Period of RECORD queries (minutes)
65 unsigned int _recordPeriod;
66
67 // Baud rate
68 unsigned int _baudRate;
69
70 // Number of addresses being used on the device.
72
73 // Info for each address
74 std::vector<std::string> _addrInfo;
75
76 static const int MAX_CHANNELS;
77
78private:
79 // PID for process that intializes and controls ENET unit.
80 pid_t _ctrl_pid;
81
82};
83
84}}} // namespace nidas namespace dynld namespace raf
85#endif
Sensor class using a UDPSocketIODevice for reading from a UDP socket.
Definition UDPSocketSensor.h:61
iPM over UDP, data received from the NAI iPM device.
Definition UDPiPMSensor.h:42
virtual ~UDPiPMSensor()
Definition UDPiPMSensor.cc:54
pid_t _ctrl_pid
Definition UDPiPMSensor.h:80
static const int MAX_CHANNELS
Definition UDPiPMSensor.h:76
virtual void open(int flags)
Open the sensor device port for real-time sampling.
Definition UDPiPMSensor.cc:109
unsigned int _recordPeriod
Definition UDPiPMSensor.h:65
virtual void validate()
Implementation of DSMSensor::validate for a Character Sensor.
Definition UDPiPMSensor.cc:59
virtual void close()
close my associated device.
Definition UDPiPMSensor.cc:199
int _numAddr
Definition UDPiPMSensor.h:71
unsigned int _baudRate
Definition UDPiPMSensor.h:68
unsigned int _statusPort
Definition UDPiPMSensor.h:59
UDPiPMSensor()
Definition UDPiPMSensor.cc:47
unsigned int _measureRate
Definition UDPiPMSensor.h:62
std::string _deviceAddr
Definition UDPiPMSensor.h:56
std::vector< std::string > _addrInfo
Definition UDPiPMSensor.h:74
The essential core classes of nidas.
Definition A2DConverter.h:31
Root namespace for the NCAR In-Situ Data Acquisition Software.
Definition A2DConverter.h:31