nidas  v1.2-1520
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 
33 namespace nidas {
34 
35 namespace core {
36  class VariableConverter;
37 }
38 
53 namespace dynld { namespace isff {
54 
56 {
57 public:
58 
59  Wind2D();
60 
61  ~Wind2D();
62 
64 
66 
67  const std::string& getSpeedName() const { return _speedName; }
68 
69  void setSpeedName(const std::string& val) { _speedName = val; }
70 
71  const std::string& getDirName() const { return _dirName; }
72 
73  void setDirName(const std::string& val) { _dirName = val; }
74 
75  const std::string& getUName() const { return _uName; }
76 
77  void setUName(const std::string& val) { _uName = val; }
78 
79  const std::string& getVName() const { return _vName; }
80 
81  void setVName(const std::string& val) { _vName = val; }
82 
83  bool process(const nidas::core::Sample* samp,
84  std::list<const nidas::core::Sample*>& results) throw();
85 
86  void fromDOMElement(const xercesc::DOMElement* node)
88 
89 private:
90 
91  std::string _speedName;
92 
93  std::string _dirName;
94 
95  std::string _uName;
96 
97  std::string _vName;
98 
103 
108 
112  int _uIndex;
113 
117  int _vIndex;
118 
122  unsigned int _outlen;
123 
130 
139 
146 
148 
150 
151  // no copying
152  Wind2D(const Wind2D& x);
153 
154  // no assignment
155  Wind2D& operator=(const Wind2D& x);
156 
157 };
158 
159 }}} // namespace nidas namespace dynld namespace isff
160 
161 #endif
void validate()
Implementation of DSMSensor::validate for a Character Sensor.
Definition: Wind2D.cc:62
unsigned int dsm_sample_id_t
Definition: Sample.h:63
int _uIndex
Index of wind u component in output sample.
Definition: Wind2D.h:112
void setUName(const std::string &val)
Definition: Wind2D.h:77
Support for a sensor that is sending packets on a TCP socket, a UDP socket, a Bluetooth RF Comm socke...
Definition: SerialSensor.h:64
void validateSscanfs()
Virtual method to check that the Sscanfs for this CharacterSensor are OK.
Definition: Wind2D.cc:120
Wind2D()
Definition: Wind2D.cc:49
std::string _vName
Definition: Wind2D.h:97
const std::string & getVName() const
Definition: Wind2D.h:79
const std::string & getUName() const
Definition: Wind2D.h:75
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:138
void setSpeedName(const std::string &val)
Definition: Wind2D.h:69
void setVName(const std::string &val)
Definition: Wind2D.h:81
std::string _dirName
Definition: Wind2D.h:93
std::string _uName
Definition: Wind2D.h:95
void setDirName(const std::string &val)
Definition: Wind2D.h:73
const std::string & getDirName() const
Definition: Wind2D.h:71
Definition: Wind2D.h:55
nidas::dynld::isff::WindOrienter WindOrienter
Definition: Wind2D.h:147
Interface to a data sample.
Definition: Sample.h:189
unsigned int _outlen
Length of output sample.
Definition: Wind2D.h:122
int _speedIndex
Index of wind speed in output sample.
Definition: Wind2D.h:102
Wind2D & operator=(const Wind2D &x)
WindOrienter _orienter
Definition: Wind2D.h:149
const std::string & getSpeedName() const
Definition: Wind2D.h:67
A class for rotating winds according to different orientations of the wind sensor.
Definition: WindOrienter.h:44
nidas::core::dsm_sample_id_t _wind_sample_id
Store the ID of the sample containing the wind variables.
Definition: Wind2D.h:129
bool process(const nidas::core::Sample *samp, std::list< const nidas::core::Sample * > &results)
Definition: Wind2D.cc:155
Definition: VariableConverter.h:69
void fromDOMElement(const xercesc::DOMElement *node)
Initialize myself from a xercesc::DOMElement.
Definition: Wind2D.cc:315
std::string _speedName
Definition: Wind2D.h:91
nidas::core::VariableConverter * _speedConverter
A correction can be applied to the wind speed.
Definition: Wind2D.h:145
~Wind2D()
Definition: Wind2D.cc:58
int _vIndex
Index of wind v component in output sample.
Definition: Wind2D.h:117
int _dirIndex
Index of wind direction in output sample.
Definition: Wind2D.h:107
Definition: InvalidParameterException.h:35