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-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
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::config::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
mrpt::hwdrivers::CRaePID::CRaePID
CRaePID()
Default constructor.
Definition: CRaePID.cpp:27
mrpt::comms::CSerialPort::close
void close()
Close the port.
Definition: CSerialPort.cpp:638
CObservationGasSensors.h
mrpt::hwdrivers::CRaePID::doProcess
void doProcess()
This method will be invoked at a minimum rate of "process_rate" (Hz)
Definition: CRaePID.cpp:98
mrpt::hwdrivers::CRaePID
This class implements a driver for the RAE Systems gas PhotoIonization Detector (PID) (Tested on a Mi...
Definition: CRaePID.h:31
CSerialPort.h
mrpt::hwdrivers::CRaePID::pose_roll
float pose_roll
Definition: CRaePID.h:47
mrpt::hwdrivers::CRaePID::pose_z
float pose_z
Definition: CRaePID.h:47
mrpt::comms::CSerialPort
A communications serial port built as an implementation of a utils::CStream.
Definition: CSerialPort.h:43
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CKalmanFilterCapable.h:30
DEFINE_GENERIC_SENSOR
#define DEFINE_GENERIC_SENSOR(class_name)
This declaration must be inserted in all CGenericSensor classes definition, within the class declarat...
Definition: CGenericSensor.h:314
mrpt::hwdrivers::CRaePID::getSerialNumber
std::string getSerialNumber()
Get serial number as a string.
Definition: CRaePID.cpp:176
mrpt::hwdrivers::CRaePID::pose_yaw
float pose_yaw
Definition: CRaePID.h:47
mrpt::hwdrivers::CRaePID::getFullInfo
mrpt::obs::CObservationGasSensors getFullInfo()
Get full reading (see PID documentation).
Definition: CRaePID.cpp:212
mrpt::hwdrivers::CRaePID::COM
mrpt::comms::CSerialPort COM
COM port.
Definition: CRaePID.h:43
mrpt::hwdrivers::CRaePID::com_bauds
int com_bauds
Definition: CRaePID.h:39
CConfigFileBase.h
mrpt::hwdrivers::CRaePID::com_port
std::string com_port
COM port name.
Definition: CRaePID.h:38
mrpt::config::CConfigFileBase
This class allows loading and storing values and vectors of different types from a configuration text...
Definition: config/CConfigFileBase.h:44
mrpt::hwdrivers::CRaePID::getName
std::string getName()
Get name string.
Definition: CRaePID.cpp:186
CGenericSensor.h
mrpt::hwdrivers::CRaePID::pose_pitch
float pose_pitch
Definition: CRaePID.h:47
mrpt::hwdrivers::CRaePID::switchPower
bool switchPower()
Switch power on or off (returns true if turned on).
Definition: CRaePID.cpp:196
mrpt::hwdrivers::CRaePID::getLimits
void getLimits(float &min, float &max)
Get alarm limits.
Definition: CRaePID.cpp:290
mrpt::hwdrivers::CRaePID::~CRaePID
virtual ~CRaePID()
Default destructor.
Definition: CRaePID.h:62
mrpt::hwdrivers::CGenericSensor
A generic interface for a wide-variety of sensors designed to be used in the application RawLogGrabbe...
Definition: CGenericSensor.h:70
mrpt::hwdrivers::CRaePID::loadConfig_sensorSpecific
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,...
Definition: CRaePID.cpp:31
mrpt::obs::CObservationGasSensors
Declares a class derived from "CObservation" that represents a set of readings from gas sensors.
Definition: CObservationGasSensors.h:27
mrpt::hwdrivers::CRaePID::errorStatus
bool errorStatus(std::string &errorString)
Get error status (true if an error was found).
Definition: CRaePID.cpp:253
mrpt::hwdrivers::CRaePID::tryToOpenTheCOM
bool tryToOpenTheCOM()
Returns true if the COM port is already open, or try to open it in other case.
Definition: CRaePID.cpp:56
min
#define min(a, b)
Definition: rplidar_driver.cpp:42
mrpt::hwdrivers::CRaePID::pose_x
float pose_x
Poses.
Definition: CRaePID.h:47
mrpt::hwdrivers::CRaePID::getModel
std::string getModel()
Get model string.
Definition: CRaePID.cpp:166
string
GLsizei const GLchar ** string
Definition: glext.h:4101
mrpt::hwdrivers::CRaePID::pose_y
float pose_y
Definition: CRaePID.h:47
mrpt::hwdrivers::CRaePID::getFirmware
std::string getFirmware()
Get firmware version string.
Definition: CRaePID.cpp:151



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST