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-2018, 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::hwdrivers
18 {
19 /** This class implements a driver for the RAE Systems gas PhotoIonization
20  * Detector (PID) (Tested on a MiniRAE Lite)
21  * The sensor is accessed via a standard (or USB) serial port.
22  *
23  * Refer to the manufacturer website for details on this sensor:
24  * http://www.raesystems.com/products/minirae-lite
25  *
26  * \sa mrpt::obs::CObservationGasSensors
27  * \ingroup mrpt_hwdrivers_grp
28  */
30 {
32 
33  private:
34  /** COM port name
35  */
37  int com_bauds;
38 
39  /** COM port
40  */
42 
43  /** Poses
44  */
46 
47  /** Returns true if the COM port is already open, or try to open it in other
48  * case.
49  * \return true if everything goes OK, or false if there are problems
50  * opening the port.
51  */
52  bool tryToOpenTheCOM();
53 
54  public:
55  /** Default constructor.
56  */
57  CRaePID();
58  /** Default destructor.
59  */
60  virtual ~CRaePID() { COM.close(); };
61  void doProcess();
62 
64  const mrpt::config::CConfigFileBase& configSource,
65  const std::string& section);
66 
67  /** Get firmware version string.
68  */
70 
71  /** Get model string.
72  */
74 
75  /** Get serial number as a string.
76  */
78 
79  /** Get name string.
80  */
82 
83  /** Switch power on or off (returns true if turned on).
84  */
85  bool switchPower();
86 
87  /** Get full reading (see PID documentation). In the returned observation,
88  * each reding is saved as a separate e-nose
89  */
91 
92  /** Get error status (true if an error was found). errorString shows the
93  * error code (see PID documentation)
94  */
95  bool errorStatus(std::string& errorString);
96 
97  /** Get alarm limits
98  */
99  void getLimits(float& min, float& max);
100 
101 }; // End of class def.
102 
103 }
104 #endif
105 
106 
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:98
void getLimits(float &min, float &max)
Get alarm limits.
Definition: CRaePID.cpp:290
CRaePID()
Default constructor.
Definition: CRaePID.cpp:27
mrpt::obs::CObservationGasSensors getFullInfo()
Get full reading (see PID documentation).
Definition: CRaePID.cpp:212
#define min(a, b)
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:36
This class implements a driver for the RAE Systems gas PhotoIonization Detector (PID) (Tested on a Mi...
Definition: CRaePID.h:29
Contains classes for various device interfaces.
std::string getSerialNumber()
Get serial number as a string.
Definition: CRaePID.cpp:176
void loadConfig_sensorSpecific(const mrpt::config::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 config::CConfigFileBase and derived classes)
Definition: CRaePID.cpp:31
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:4101
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:41
bool tryToOpenTheCOM()
Returns true if the COM port is already open, or try to open it in other case.
Definition: CRaePID.cpp:56
bool switchPower()
Switch power on or off (returns true if turned on).
Definition: CRaePID.cpp:196
virtual ~CRaePID()
Default destructor.
Definition: CRaePID.h:60
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:45



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020