Main MRPT website
>
C++ reference for MRPT 1.4.0
mrpt
hwdrivers
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-2016, 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
12
#include <
mrpt/hwdrivers/CGenericSensor.h
>
13
#include <
mrpt/hwdrivers/CSerialPort.h
>
14
#include <
mrpt/obs/CObservationGasSensors.h
>
15
#include <
mrpt/utils/CConfigFileBase.h
>
16
17
namespace
mrpt
18
{
19
namespace
hwdrivers
20
{
21
/** This class implements a driver for the RAE Systems gas PhotoIonization Detector (PID) (Tested on a MiniRAE Lite)
22
* The sensor is accessed via a standard (or USB) serial port.
23
*
24
* Refer to the manufacturer website for details on this sensor: http://www.raesystems.com/products/minirae-lite
25
*
26
* \sa mrpt::obs::CObservationGasSensors
27
* \ingroup mrpt_hwdrivers_grp
28
*/
29
class
HWDRIVERS_IMPEXP
CRaePID
:
public
mrpt::hwdrivers::CGenericSensor
30
{
31
DEFINE_GENERIC_SENSOR
(
CRaePID
)
32
33
private
:
34
/** COM port name
35
*/
36
std::string
com_port
;
37
int
com_bauds
;
38
39
/** COM port
40
*/
41
CSerialPort
COM
;
42
43
/** Poses
44
*/
45
float
pose_x, pose_y,
pose_z
, pose_yaw, pose_pitch, pose_roll;
46
47
/** Returns true if the COM port is already open, or try to open it in other case.
48
* \return true if everything goes OK, or false if there are problems opening the port.
49
*/
50
bool
tryToOpenTheCOM();
51
52
public
:
53
/** Default constructor.
54
*/
55
CRaePID
();
56
/** Default destructor.
57
*/
58
virtual
~CRaePID
(){COM.
close
();};
59
60
void
doProcess();
61
62
void
loadConfig_sensorSpecific(
63
const
mrpt::utils::CConfigFileBase
&configSource,
64
const
std::string §ion);
65
66
/** Get firmware version string.
67
*/
68
std::string getFirmware();
69
70
/** Get model string.
71
*/
72
std::string getModel();
73
74
/** Get serial number as a string.
75
*/
76
std::string getSerialNumber();
77
78
/** Get name string.
79
*/
80
std::string getName();
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, each reding is saved as a separate e-nose
87
*/
88
mrpt::obs::CObservationGasSensors
getFullInfo();
89
90
/** Get error status (true if an error was found). errorString shows the error code (see PID documentation)
91
*/
92
bool
errorStatus(std::string &errorString);
93
94
/** Get alarm limits
95
*/
96
void
getLimits(
float
&min,
float
&max);
97
98
99
};
// End of class def.
100
101
}
// End of namespace
102
}
// End of namespace
103
#endif
mrpt::hwdrivers::CRaePID
This class implements a driver for the RAE Systems gas PhotoIonization Detector (PID) (Tested on a Mi...
Definition:
CRaePID.h:29
CSerialPort.h
mrpt::hwdrivers::CRaePID::pose_z
float pose_z
Definition:
CRaePID.h:45
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition:
CParticleFilter.h:16
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:251
mrpt::hwdrivers::CRaePID::com_bauds
int com_bauds
Definition:
CRaePID.h:37
mrpt::hwdrivers::CRaePID::com_port
std::string com_port
COM port name.
Definition:
CRaePID.h:36
mrpt::utils::CConfigFileBase
This class allows loading and storing values and vectors of different types from a configuration text...
Definition:
CConfigFileBase.h:30
CGenericSensor.h
mrpt::hwdrivers::CRaePID::~CRaePID
virtual ~CRaePID()
Default destructor.
Definition:
CRaePID.h:58
mrpt::hwdrivers::CSerialPort
A communications serial port built as an implementation of a utils::CStream.
Definition:
CSerialPort.h:43
mrpt::hwdrivers::CGenericSensor
A generic interface for a wide-variety of sensors designed to be used in the application RawLogGrabbe...
Definition:
CGenericSensor.h:63
CConfigFileBase.h
mrpt::obs::CObservationGasSensors
Declares a class derived from "CObservation" that represents a set of readings from gas sensors.
Definition:
obs/CObservationGasSensors.h:29
mrpt::hwdrivers::CSerialPort::close
void close()
Close the port.
CObservationGasSensors.h
mrpt::hwdrivers::CRaePID::COM
CSerialPort COM
COM port.
Definition:
CRaePID.h:41
HWDRIVERS_IMPEXP
#define HWDRIVERS_IMPEXP
Definition:
hwdrivers_impexp.h:82
Page generated by
Doxygen 1.8.17
for MRPT 1.4.0 SVN: at Tue Mar 3 09:15:16 UTC 2020