MRPT  1.9.9
CRaePID.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-2019, 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 RAE Systems gas PhotoIonization
19  * Detector (PID) (Tested on a MiniRAE Lite)
20  * The sensor is accessed via a standard (or USB) serial port.
21  *
22  * Refer to the manufacturer website for details on this sensor:
23  * http://www.raesystems.com/products/minirae-lite
24  *
25  * \sa mrpt::obs::CObservationGasSensors
26  * \ingroup mrpt_hwdrivers_grp
27  */
29 {
31 
32  private:
33  /** COM port name
34  */
36  int com_bauds;
37 
38  /** COM port
39  */
41 
42  /** Poses
43  */
45 
46  /** Returns true if the COM port is already open, or try to open it in other
47  * case.
48  * \return true if everything goes OK, or false if there are problems
49  * opening the port.
50  */
51  bool tryToOpenTheCOM();
52 
53  public:
54  /** Default constructor.
55  */
56  CRaePID();
57  /** Default destructor.
58  */
59  ~CRaePID() override { COM.close(); };
60  void doProcess() override;
61 
63  const mrpt::config::CConfigFileBase& configSource,
64  const std::string& section) override;
65 
66  /** Get firmware version string.
67  */
69 
70  /** Get model string.
71  */
73 
74  /** Get serial number as a string.
75  */
77 
78  /** Get name string.
79  */
81 
82  /** Switch power on or off (returns true if turned on).
83  */
84  bool switchPower();
85 
86  /** Get full reading (see PID documentation). In the returned observation,
87  * each reding is saved as a separate e-nose
88  */
90 
91  /** Get error status (true if an error was found). errorString shows the
92  * error code (see PID documentation)
93  */
94  bool errorStatus(std::string& errorString);
95 
96  /** Get alarm limits
97  */
98  void getLimits(float& min, float& max);
99 
100 }; // End of class def.
101 
102 } // namespace mrpt::hwdrivers
A generic interface for a wide-variety of sensors designed to be used in the application RawLogGrabbe...
void getLimits(float &min, float &max)
Get alarm limits.
Definition: CRaePID.cpp:290
CRaePID()
Default constructor.
Definition: CRaePID.cpp:29
mrpt::obs::CObservationGasSensors getFullInfo()
Get full reading (see PID documentation).
Definition: CRaePID.cpp:212
A communications serial port built as an implementation of a utils::CStream.
Definition: CSerialPort.h:41
bool errorStatus(std::string &errorString)
Get error status (true if an error was found).
Definition: CRaePID.cpp:253
std::string com_port
COM port name.
Definition: CRaePID.h:35
This class implements a driver for the RAE Systems gas PhotoIonization Detector (PID) (Tested on a Mi...
Definition: CRaePID.h:28
Contains classes for various device interfaces.
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)
Definition: CRaePID.cpp:33
std::string getSerialNumber()
Get serial number as a string.
Definition: CRaePID.cpp:176
void doProcess() override
This method will be invoked at a minimum rate of "process_rate" (Hz)
Definition: CRaePID.cpp:100
This class allows loading and storing values and vectors of different types from a configuration text...
std::string getName()
Get name string.
Definition: CRaePID.cpp:186
Declares a class derived from "CObservation" that represents a set of readings from gas sensors...
GLsizei const GLchar ** string
Definition: glext.h:4116
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.
Definition: CRaePID.h:40
bool tryToOpenTheCOM()
Returns true if the COM port is already open, or try to open it in other case.
Definition: CRaePID.cpp:58
bool switchPower()
Switch power on or off (returns true if turned on).
Definition: CRaePID.cpp:196
~CRaePID() override
Default destructor.
Definition: CRaePID.h:59
std::string getModel()
Get model string.
Definition: CRaePID.cpp:166
std::string getFirmware()
Get firmware version string.
Definition: CRaePID.cpp:151
float pose_x
Poses.
Definition: CRaePID.h:44



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: cb8dd5fc8 Sat Dec 7 21:55:39 2019 +0100 at sáb dic 7 22:00:13 CET 2019