MRPT  2.0.4
CGillAnemometer.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2020, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #pragma once
10 
11 #include <mrpt/comms/CSerialPort.h>
15 
16 namespace mrpt::hwdrivers
17 {
18 /** This class implements a driver for the Gill Windsonic Option 1 Anemometer
19  * The sensor is accessed via a standard serial port.
20  *
21  * Refer to the manufacturer website for details on this sensor:
22  *http://gillinstruments.com/data/manuals/WindSonic-Web-Manual.pdf
23  * Configure for single <CR> return, at 2Hz
24  * \sa mrpt::obs::CObservationWindSensor
25  * \ingroup mrpt_hwdrivers_grp
26  */
28 {
30 
31  private:
32  /** COM port name
33  */
34  std::string com_port;
35  int com_bauds;
36 
37  /** COM port
38  */
40 
41  /** Poses
42  */
44 
45  /** Returns true if the COM port is already open, or try to open it in other
46  * case.
47  * \return true if everything goes OK, or false if there are problems
48  * opening the port.
49  */
50  bool tryToOpenTheCOM();
51 
52  public:
53  /** Default constructor.
54  */
56  /** Default destructor.
57  */
58  ~CGillAnemometer() override { COM.close(); };
59  void doProcess() override;
60 
62  const mrpt::config::CConfigFileBase& configSource,
63  const std::string& section) override;
64 }; // End of class def.
65 
66 } // namespace mrpt::hwdrivers
A generic interface for a wide-variety of sensors designed to be used in the application RawLogGrabbe...
A communications serial port built as an implementation of a utils::CStream.
Definition: CSerialPort.h:41
bool tryToOpenTheCOM()
Returns true if the COM port is already open, or try to open it in other case.
~CGillAnemometer() override
Default destructor.
void doProcess() override
This method will be invoked at a minimum rate of "process_rate" (Hz)
Contains classes for various device interfaces.
This class allows loading and storing values and vectors of different types from a configuration text...
void loadConfig_sensorSpecific(const mrpt::config::CConfigFileBase &configSource, const std::string &section) override
Loads specific configuration for the device from a given source of configuration parameters, for example, an ".ini" file, loading from the section "[iniSection]" (see config::CConfigFileBase and derived classes)
void close()
Close the port.
#define DEFINE_GENERIC_SENSOR(class_name)
This declaration must be inserted in all CGenericSensor classes definition, within the class declarat...
mrpt::comms::CSerialPort COM
COM port.
This class implements a driver for the Gill Windsonic Option 1 Anemometer The sensor is accessed via ...
std::string com_port
COM port name.
CGillAnemometer()
Default constructor.



Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020