#include <mrpt/hwdrivers/CBoardDLMS.h>
Public Member Functions | |
CBoardDLMS () | |
Constructor. | |
virtual | ~CBoardDLMS () |
Destructor. | |
void | loadConfig (const mrpt::utils::CConfigFileBase &configSource, const std::string &iniSection) |
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::CBoardDLMS for the possible parameters. | |
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 () |
This method can or cannot be implemented in the derived class, depending on the need for it. | |
bool | queryFirmwareVersion (std::string &out_firmwareVersion) |
Query the firmware version on the device (can be used to test communications). | |
bool | sendCommand (uint8_t command, std::vector< unsigned char > &response) |
Send a command to the DLMS Board. | |
bool | queryTimeStamp (mrpt::system::TTimeStamp &tstamp) |
Protected Member Functions | |
bool | checkConnectionAndConnect () |
Tries to connect to the USB device (if disconnected). | |
bool | checkCRC (const std::vector< unsigned char > &frame) |
uint16_t | CreateCRC (const std::vector< unsigned char > &CommData, uint16_t uLen) |
Protected Attributes | |
std::string | m_usbSerialNumber |
A copy of the device serial number (to open the USB FTDI chip). | |
uint32_t | m_timeStartUI |
mrpt::system::TTimeStamp | m_timeStartTT |
mrpt::poses::CPose3D | m_mSensorPose |
mrpt::poses::CPose3D | m_sSensorPose |
Implemented for the board v1.0 designed by 2008 @ ISA (University of Malaga).
PARAMETERS IN THE ".INI"-LIKE CONFIGURATION STRINGS: ------------------------------------------------------- [DualLMS] driver = CBoardDLMS process_rate = 30 ; Hz USB_serialname = DLMS-001 mPose_x = 0 ; Master laser range scaner 6D position on the robot (meters) mPose_y = 0 mPose_z = 0 mPose_yaw = 0 mPose_pitch = 0 mPose_roll = 0 sPose_x = 0 ; Slave laser range scaner 6D position on the robot (meters) sPose_y = 0 sPose_z = 0 sPose_yaw = 0 sPose_pitch = 0 sPose_roll = 0
Definition at line 47 of file CBoardDLMS.h.
mrpt::hwdrivers::CBoardDLMS::CBoardDLMS | ( | ) |
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::CBoardDLMS::~CBoardDLMS | ( | ) | [virtual] |
Destructor.
bool mrpt::hwdrivers::CBoardDLMS::checkConnectionAndConnect | ( | ) | [protected] |
Tries to connect to the USB device (if disconnected).
bool mrpt::hwdrivers::CBoardDLMS::checkCRC | ( | const std::vector< unsigned char > & | frame | ) | [protected] |
uint16_t mrpt::hwdrivers::CBoardDLMS::CreateCRC | ( | const std::vector< unsigned char > & | CommData, | |
uint16_t | uLen | |||
) | [protected] |
void mrpt::hwdrivers::CBoardDLMS::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. This method processes data from the GPS and update the object state accordingly.
Implements mrpt::hwdrivers::CGenericSensor.
virtual void mrpt::hwdrivers::CBoardDLMS::initialize | ( | ) | [virtual] |
This method can or cannot be implemented in the derived class, depending on the need for it.
This | method must throw an exception with a descriptive message if some critical error is found. |
Reimplemented from mrpt::hwdrivers::CGenericSensor.
void mrpt::hwdrivers::CBoardDLMS::loadConfig | ( | const mrpt::utils::CConfigFileBase & | configSource, | |
const std::string & | iniSection | |||
) | [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::CBoardDLMS for the possible parameters.
Implements mrpt::hwdrivers::CGenericSensor.
bool mrpt::hwdrivers::CBoardDLMS::queryFirmwareVersion | ( | std::string & | out_firmwareVersion | ) |
Query the firmware version on the device (can be used to test communications).
bool mrpt::hwdrivers::CBoardDLMS::queryTimeStamp | ( | mrpt::system::TTimeStamp & | tstamp | ) |
bool mrpt::hwdrivers::CBoardDLMS::sendCommand | ( | uint8_t | command, | |
std::vector< unsigned char > & | response | |||
) |
Send a command to the DLMS Board.
Definition at line 57 of file CBoardDLMS.h.
Definition at line 57 of file CBoardDLMS.h.
Definition at line 55 of file CBoardDLMS.h.
uint32_t mrpt::hwdrivers::CBoardDLMS::m_timeStartUI [protected] |
Definition at line 54 of file CBoardDLMS.h.
std::string mrpt::hwdrivers::CBoardDLMS::m_usbSerialNumber [protected] |
A copy of the device serial number (to open the USB FTDI chip).
Definition at line 53 of file CBoardDLMS.h.
Page generated by Doxygen 1.5.9 for MRPT 0.6.5 SVN: at Sun Aug 2 11:39:56 CDT 2009 |