nidas v1.2.3
Wind2D.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 ** 2006, 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_WIND2D_H
28#define NIDAS_DYNLD_ISFF_WIND2D_H
29
31#include "WindOrienter.h"
32
33namespace nidas {
34
35namespace core {
36 class VariableConverter;
37}
38
53namespace dynld { namespace isff {
54
56{
57public:
58
60
61 Wind2D();
62
63 ~Wind2D();
64
65 void validate();
66
67 void validateSscanfs();
68
69 const std::string& getSpeedName() const { return _speedName; }
70
71 void setSpeedName(const std::string& val) { _speedName = val; }
72
73 const std::string& getDirName() const { return _dirName; }
74
75 void setDirName(const std::string& val) { _dirName = val; }
76
77 const std::string& getUName() const { return _uName; }
78
79 void setUName(const std::string& val) { _uName = val; }
80
81 const std::string& getVName() const { return _vName; }
82
83 void setVName(const std::string& val) { _vName = val; }
84
91 getOrienter() { return _orienter; }
92
93 bool process(const nidas::core::Sample* samp,
94 std::list<const nidas::core::Sample*>& results) throw();
95
96 void fromDOMElement(const xercesc::DOMElement* node);
97
98private:
99
100 std::string _speedName;
101
102 std::string _dirName;
103
104 std::string _uName;
105
106 std::string _vName;
107
112
117
122
127
131 unsigned int _outlen;
132
139
148
155
157
158 // no copying
159 Wind2D(const Wind2D& x);
160
161 // no assignment
163
164};
165
166}}} // namespace nidas namespace dynld namespace isff
167
168#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
Definition VariableConverter.h:70
Definition Wind2D.h:56
void validateSscanfs()
Virtual method to check that the Sscanfs for this CharacterSensor are OK.
Definition Wind2D.cc:141
void setSpeedName(const std::string &val)
Definition Wind2D.h:71
nidas::core::dsm_sample_id_t _wind_sample_id
Store the ID of the sample containing the wind variables.
Definition Wind2D.h:138
unsigned int _outlen
Length of output sample.
Definition Wind2D.h:131
int _vIndex
Index of wind v component in output sample.
Definition Wind2D.h:126
std::string _dirName
Definition Wind2D.h:102
WindOrienter & getOrienter()
Provide access to the orienter, mostly for testing.
Definition Wind2D.h:91
void validate()
Implementation of DSMSensor::validate for a Character Sensor.
Definition Wind2D.cc:79
std::string _vName
Definition Wind2D.h:106
int _speedIndex
Index of wind speed in output sample.
Definition Wind2D.h:111
nidas::core::VariableConverter * _dirConverter
A correction can be applied to the wind direction, which is the common situation when the aneometer i...
Definition Wind2D.h:147
Wind2D()
Definition Wind2D.cc:56
const std::string & getUName() const
Definition Wind2D.h:77
void setVName(const std::string &val)
Definition Wind2D.h:83
void setDirName(const std::string &val)
Definition Wind2D.h:75
int _uIndex
Index of wind u component in output sample.
Definition Wind2D.h:121
bool process(const nidas::core::Sample *samp, std::list< const nidas::core::Sample * > &results)
Definition Wind2D.cc:176
Wind2D & operator=(const Wind2D &x)
Wind2D(const Wind2D &x)
void fromDOMElement(const xercesc::DOMElement *node)
Definition Wind2D.cc:315
std::string _uName
Definition Wind2D.h:104
const std::string & getVName() const
Definition Wind2D.h:81
std::string _speedName
Definition Wind2D.h:100
const std::string & getDirName() const
Definition Wind2D.h:73
nidas::core::VariableConverter * _speedConverter
A correction can be applied to the wind speed.
Definition Wind2D.h:154
void setUName(const std::string &val)
Definition Wind2D.h:79
int _dirIndex
Index of wind direction in output sample.
Definition Wind2D.h:116
const std::string & getSpeedName() const
Definition Wind2D.h:69
WindOrienter _orienter
Definition Wind2D.h:156
~Wind2D()
Definition Wind2D.cc:65
A class for rotating winds according to different orientations of the wind sensor.
Definition WindOrienter.h:45
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
unsigned int dsm_sample_id_t
Definition Sample.h:64
Root namespace for the NCAR In-Situ Data Acquisition Software.
Definition A2DConverter.h:31