Main MRPT website > C++ reference for MRPT 1.9.9
CRaePID.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2017, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #ifndef CRaePID_H
10 #define CRaePID_H
11 
13 #include <mrpt/comms/CSerialPort.h>
16 
17 namespace mrpt
18 {
19 namespace hwdrivers
20 {
21 /** This class implements a driver for the RAE Systems gas PhotoIonization
22  * Detector (PID) (Tested on a MiniRAE Lite)
23  * The sensor is accessed via a standard (or USB) serial port.
24  *
25  * Refer to the manufacturer website for details on this sensor:
26  * http://www.raesystems.com/products/minirae-lite
27  *
28  * \sa mrpt::obs::CObservationGasSensors
29  * \ingroup mrpt_hwdrivers_grp
30  */
32 {
34 
35  private:
36  /** COM port name
37  */
39  int com_bauds;
40 
41  /** COM port
42  */
44 
45  /** Poses
46  */
48 
49  /** Returns true if the COM port is already open, or try to open it in other
50  * case.
51  * \return true if everything goes OK, or false if there are problems
52  * opening the port.
53  */
54  bool tryToOpenTheCOM();
55 
56  public:
57  /** Default constructor.
58  */
59  CRaePID();
60  /** Default destructor.
61  */
62  virtual ~CRaePID() { COM.close(); };
63  void doProcess();
64 
66  const mrpt::utils::CConfigFileBase& configSource,
67  const std::string& section);
68 
69  /** Get firmware version string.
70  */
72 
73  /** Get model string.
74  */
76 
77  /** Get serial number as a string.
78  */
80 
81  /** Get name string.
82  */
84 
85  /** Switch power on or off (returns true if turned on).
86  */
87  bool switchPower();
88 
89  /** Get full reading (see PID documentation). In the returned observation,
90  * each reding is saved as a separate e-nose
91  */
93 
94  /** Get error status (true if an error was found). errorString shows the
95  * error code (see PID documentation)
96  */
97  bool errorStatus(std::string& errorString);
98 
99  /** Get alarm limits
100  */
101  void getLimits(float& min, float& max);
102 
103 }; // End of class def.
104 
105 } // End of namespace
106 } // End of namespace
107 #endif
A generic interface for a wide-variety of sensors designed to be used in the application RawLogGrabbe...
void doProcess()
This method will be invoked at a minimum rate of "process_rate" (Hz)
Definition: CRaePID.cpp:99
void getLimits(float &min, float &max)
Get alarm limits.
Definition: CRaePID.cpp:291
CRaePID()
Default constructor.
Definition: CRaePID.cpp:28
mrpt::obs::CObservationGasSensors getFullInfo()
Get full reading (see PID documentation).
Definition: CRaePID.cpp:213
#define min(a, b)
A communications serial port built as an implementation of a utils::CStream.
Definition: CSerialPort.h:47
bool errorStatus(std::string &errorString)
Get error status (true if an error was found).
Definition: CRaePID.cpp:254
std::string com_port
COM port name.
Definition: CRaePID.h:38
This class implements a driver for the RAE Systems gas PhotoIonization Detector (PID) (Tested on a Mi...
Definition: CRaePID.h:31
std::string getSerialNumber()
Get serial number as a string.
Definition: CRaePID.cpp:177
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:187
Declares a class derived from "CObservation" that represents a set of readings from gas sensors...
GLsizei const GLchar ** string
Definition: glext.h:4101
void close()
Close the port.
void loadConfig_sensorSpecific(const mrpt::utils::CConfigFileBase &configSource, const std::string &section)
Loads specific configuration for the device from a given source of configuration parameters, for example, an ".ini" file, loading from the section "[iniSection]" (see utils::CConfigFileBase and derived classes)
Definition: CRaePID.cpp:32
#define DEFINE_GENERIC_SENSOR(class_name)
This declaration must be inserted in all CGenericSensor classes definition, within the class declarat...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
mrpt::comms::CSerialPort COM
COM port.
Definition: CRaePID.h:43
bool tryToOpenTheCOM()
Returns true if the COM port is already open, or try to open it in other case.
Definition: CRaePID.cpp:57
bool switchPower()
Switch power on or off (returns true if turned on).
Definition: CRaePID.cpp:197
virtual ~CRaePID()
Default destructor.
Definition: CRaePID.h:62
std::string getModel()
Get model string.
Definition: CRaePID.cpp:167
std::string getFirmware()
Get firmware version string.
Definition: CRaePID.cpp:152
float pose_x
Poses.
Definition: CRaePID.h:47



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019