A class for interfacing an e-Noses via a FTDI USB link. More...
#include <mrpt/hwdrivers/CBoardENoses.h>


Public Member Functions | |
| CBoardENoses () | |
| Constructor. | |
| virtual | ~CBoardENoses () |
| Destructor. | |
| bool | queryFirmwareVersion (std::string &out_firmwareVersion) |
| Query the firmware version on the device (can be used to test communications). | |
| bool | getObservation (mrpt::slam::CObservationGasSensors &outObservation) |
| Request the master eNose the latest readings from all the eNoses. | |
| void | doProcess () |
| This method should be called periodically (at least at 1Hz to capture ALL the real-time data) It is thread safe, i.e. | |
| virtual void | initialize () |
| Tries to open the camera, after setting all the parameters with a call to loadConfig. | |
Protected Member Functions | |
| bool | checkConnectionAndConnect () |
| Tries to connect to the USB device (if disconnected). | |
| void | loadConfig_sensorSpecific (const mrpt::utils::CConfigFileBase &configSource, const std::string §ion) |
| 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) See hwdrivers::CBoardENoses for the possible parameters. | |
Protected Attributes | |
| std::string | m_usbSerialNumber |
| A copy of the device serial number (to open the USB FTDI chip). | |
| std::string | m_sensorLabel |
| mrpt::system::TTimeStamp | initial_timestamp |
| bool | first_reading |
| vector_float | enose_poses_x |
| The 3D pose of the master + N slave eNoses on the robot (meters & radians). | |
| vector_float | enose_poses_y |
| vector_float | enose_poses_z |
| vector_float | enose_poses_yaw |
| vector_float | enose_poses_pitch |
| vector_float | enose_poses_roll |
A class for interfacing an e-Noses via a FTDI USB link.
Implemented for the board v1.0 designed by 2007 @ ISA (University of Malaga).
PARAMETERS IN THE ".INI"-LIKE CONFIGURATION STRINGS: ------------------------------------------------------- [supplied_section_name] USB_serialname=ENOSE001 ; 3D position (in meters) of the master +slave eNoses enose_poses_x=<MASTER X> <SLAVE#1 X> <SLAVE#2 X> <SLAVE#3 X>... enose_poses_y=<MASTER Y> <SLAVE#1 Y> <SLAVE#2 Y> <SLAVE#3 Y>... enose_poses_z=<MASTER Z> <SLAVE#1 Z> <SLAVE#2 Z> <SLAVE#3 Z>... ; 3D pose angles (in degrees) of the master +slave eNoses enose_poses_yaw=<MASTER YAW> <SLAVE#1 YAW> <SLAVE#2 YAW> <SLAVE#3 YAW>... enose_poses_pitch=<MASTER PITCH> <SLAVE#1 PITCH> <SLAVE#2 PITCH> <SLAVE#3 PITCH>... enose_poses_roll=<MASTER ROLL> <SLAVE#1 ROLL> <SLAVE#2 ROLL> <SLAVE#3 ROLL>...
Definition at line 65 of file CBoardENoses.h.
| mrpt::hwdrivers::CBoardENoses::CBoardENoses | ( | ) |
Constructor.
| serialNumberUSBdevice | The serial number (text) of the device to open. The constructor will try to open the device. You can check if it failed calling "isOpen()". |
| virtual mrpt::hwdrivers::CBoardENoses::~CBoardENoses | ( | ) | [virtual] |
Destructor.
| bool mrpt::hwdrivers::CBoardENoses::checkConnectionAndConnect | ( | ) | [protected] |
Tries to connect to the USB device (if disconnected).
| void mrpt::hwdrivers::CBoardENoses::doProcess | ( | ) | [virtual] |
This method should be called periodically (at least at 1Hz to capture ALL the real-time data) It is thread safe, i.e.
you can call this from one thread, then to other methods from other threads.
Implements mrpt::hwdrivers::CGenericSensor.
| bool mrpt::hwdrivers::CBoardENoses::getObservation | ( | mrpt::slam::CObservationGasSensors & | outObservation | ) |
Request the master eNose the latest readings from all the eNoses.
The output observation contains a valid timestamp and 3D positions if "loadConfig" has been called previously.
| virtual void mrpt::hwdrivers::CBoardENoses::initialize | ( | ) | [virtual] |
Tries to open the camera, after setting all the parameters with a call to loadConfig.
| This | method must throw an exception with a descriptive message if some critical error is found. |
Reimplemented from mrpt::hwdrivers::CGenericSensor.
| void mrpt::hwdrivers::CBoardENoses::loadConfig_sensorSpecific | ( | const mrpt::utils::CConfigFileBase & | configSource, | |
| const std::string & | section | |||
| ) | [protected, virtual] |
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) See hwdrivers::CBoardENoses for the possible parameters.
Implements mrpt::hwdrivers::CGenericSensor.
| bool mrpt::hwdrivers::CBoardENoses::queryFirmwareVersion | ( | std::string & | out_firmwareVersion | ) |
Query the firmware version on the device (can be used to test communications).
Definition at line 79 of file CBoardENoses.h.
Definition at line 79 of file CBoardENoses.h.
The 3D pose of the master + N slave eNoses on the robot (meters & radians).
Definition at line 79 of file CBoardENoses.h.
Definition at line 79 of file CBoardENoses.h.
Definition at line 79 of file CBoardENoses.h.
Definition at line 79 of file CBoardENoses.h.
bool mrpt::hwdrivers::CBoardENoses::first_reading [protected] |
Definition at line 75 of file CBoardENoses.h.
Definition at line 74 of file CBoardENoses.h.
std::string mrpt::hwdrivers::CBoardENoses::m_sensorLabel [protected] |
Definition at line 73 of file CBoardENoses.h.
std::string mrpt::hwdrivers::CBoardENoses::m_usbSerialNumber [protected] |
A copy of the device serial number (to open the USB FTDI chip).
Definition at line 72 of file CBoardENoses.h.
| Page generated by Doxygen 1.6.1 for MRPT 0.9.0 SVN: at Mon Jun 7 06:47:58 UTC 2010 |