Class responsible for communicating with LMS1xx device. More...
#include <LMS1xx.h>
Public Member Functions | |
void | connect (std::string host, int port=2111) |
Connect to LMS1xx. | |
void | disconnect () |
Disconnect from LMS1xx device. | |
scanCfg | getScanCfg () const |
Get current scan configuration. Get scan configuration : | |
bool | getScanData (scanData *scan_data) |
Receive single scan message. | |
scanOutputRange | getScanOutputRange () const |
Get current output range configuration. Get output range configuration : | |
bool | isConnected () |
Get status of connection. | |
LMS1xx () | |
void | login () |
Log into LMS1xx unit. Increase privilege level, giving ability to change device configuration. | |
status_t | queryStatus () |
Get current status of LMS1xx device. | |
void | saveConfig () |
Save data permanently. Parameters are saved in the EEPROM of the LMS and will also be available after the device is switched off and on again. | |
void | scanContinous (int start) |
Start or stop continuous data acquisition. After reception of this command device start or stop continuous data stream containing scan messages. | |
void | setScanCfg (const scanCfg &cfg) |
Set scan configuration. Get scan configuration : | |
void | setScanDataCfg (const scanDataCfg &cfg) |
Set scan data configuration. Set format of scan message returned by device. | |
void | startDevice () |
The device is returned to the measurement mode after configuration. | |
void | startMeas () |
Start measurements. After receiving this command LMS1xx unit starts spinning laser and measuring. | |
void | stopMeas () |
Stop measurements. After receiving this command LMS1xx unit stop spinning laser and measuring. | |
virtual | ~LMS1xx () |
Static Protected Member Functions | |
static void | parseScanData (char *buf, scanData *data) |
Receive single scan message. | |
Protected Attributes | |
LMSBuffer | buffer_ |
bool | connected_ |
int | socket_fd_ |
LMS1xx::LMS1xx | ( | ) |
Definition at line 39 of file LMS1xx.cpp.
LMS1xx::~LMS1xx | ( | ) | [virtual] |
Definition at line 43 of file LMS1xx.cpp.
void LMS1xx::connect | ( | std::string | host, |
int | port = 2111 |
||
) |
Connect to LMS1xx.
Definition at line 47 of file LMS1xx.cpp.
void LMS1xx::disconnect | ( | ) |
Disconnect from LMS1xx device.
Definition at line 72 of file LMS1xx.cpp.
scanCfg LMS1xx::getScanCfg | ( | ) | const |
Get current scan configuration. Get scan configuration :
Definition at line 164 of file LMS1xx.cpp.
bool LMS1xx::getScanData | ( | scanData * | scan_data | ) |
Receive single scan message.
Definition at line 242 of file LMS1xx.cpp.
scanOutputRange LMS1xx::getScanOutputRange | ( | ) | const |
Get current output range configuration. Get output range configuration :
Definition at line 211 of file LMS1xx.cpp.
bool LMS1xx::isConnected | ( | ) |
void LMS1xx::login | ( | ) |
Log into LMS1xx unit. Increase privilege level, giving ability to change device configuration.
Definition at line 133 of file LMS1xx.cpp.
void LMS1xx::parseScanData | ( | char * | buf, |
scanData * | data | ||
) | [static, protected] |
Receive single scan message.
data | pointer to scanData buffer structure. |
Definition at line 284 of file LMS1xx.cpp.
Get current status of LMS1xx device.
Definition at line 114 of file LMS1xx.cpp.
void LMS1xx::saveConfig | ( | ) |
Save data permanently. Parameters are saved in the EEPROM of the LMS and will also be available after the device is switched off and on again.
Definition at line 470 of file LMS1xx.cpp.
void LMS1xx::scanContinous | ( | int | start | ) |
Start or stop continuous data acquisition. After reception of this command device start or stop continuous data stream containing scan messages.
start | 1 : start 0 : stop |
Definition at line 226 of file LMS1xx.cpp.
void LMS1xx::setScanCfg | ( | const scanCfg & | cfg | ) |
Set scan configuration. Get scan configuration :
cfg | structure containing scan configuration. |
Definition at line 183 of file LMS1xx.cpp.
void LMS1xx::setScanDataCfg | ( | const scanDataCfg & | cfg | ) |
Set scan data configuration. Set format of scan message returned by device.
cfg | structure containing scan data configuration. |
Definition at line 197 of file LMS1xx.cpp.
void LMS1xx::startDevice | ( | ) |
The device is returned to the measurement mode after configuration.
Definition at line 485 of file LMS1xx.cpp.
void LMS1xx::startMeas | ( | ) |
Start measurements. After receiving this command LMS1xx unit starts spinning laser and measuring.
Definition at line 86 of file LMS1xx.cpp.
void LMS1xx::stopMeas | ( | ) |
Stop measurements. After receiving this command LMS1xx unit stop spinning laser and measuring.
Definition at line 100 of file LMS1xx.cpp.
LMSBuffer LMS1xx::buffer_ [protected] |
bool LMS1xx::connected_ [protected] |
int LMS1xx::socket_fd_ [protected] |