Public Member Functions | Private Attributes | List of all members
LMS1xx Class Reference

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. More...
 
void disconnect ()
 Disconnect from LMS1xx device. More...
 
void getData (scanData &data)
 Receive single scan message. More...
 
scanCfg getScanCfg () const
 Get current scan configuration. Get scan configuration : More...
 
bool isConnected ()
 Get status of connection. More...
 
 LMS1xx ()
 
void login ()
 Log into LMS1xx unit. Increase privilege level, giving ability to change device configuration. More...
 
status_t queryStatus ()
 Get current status of LMS1xx device. More...
 
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. More...
 
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. More...
 
void setScanCfg (const scanCfg &cfg)
 Set scan configuration. Get scan configuration : More...
 
void setScanDataCfg (const scanDataCfg &cfg)
 Set scan data configuration. Set format of scan message returned by device. More...
 
void startDevice ()
 The device is returned to the measurement mode after configuration. More...
 
void startMeas ()
 Start measurements. After receiving this command LMS1xx unit starts spinning laser and measuring. More...
 
void stopMeas ()
 Stop measurements. After receiving this command LMS1xx unit stop spinning laser and measuring. More...
 
virtual ~LMS1xx ()
 

Private Attributes

bool connected
 
bool debug
 
int sockDesc
 

Detailed Description

Class responsible for communicating with LMS1xx device.

Author
Konrad Banachowicz

Definition at line 195 of file lms1xx.h.

Constructor & Destructor Documentation

LMS1xx::LMS1xx ( )

Definition at line 35 of file lms1xx.cpp.

LMS1xx::~LMS1xx ( )
virtual

Definition at line 40 of file lms1xx.cpp.

Member Function Documentation

void LMS1xx::connect ( std::string  host,
int  port = 2111 
)

Connect to LMS1xx.

Parameters
hostLMS1xx host name or ip address.
portLMS1xx port number.

Definition at line 44 of file lms1xx.cpp.

void LMS1xx::disconnect ( )

Disconnect from LMS1xx device.

Definition at line 63 of file lms1xx.cpp.

void LMS1xx::getData ( scanData data)

Receive single scan message.

Parameters
datapointer to scanData buffer structure.

Definition at line 207 of file lms1xx.cpp.

scanCfg LMS1xx::getScanCfg ( ) const

Get current scan configuration. Get scan configuration :

  • scanning frequency.
  • scanning resolution.
  • start angle.
  • stop angle.
    Returns
    scanCfg structure.

Definition at line 138 of file lms1xx.cpp.

bool LMS1xx::isConnected ( )

Get status of connection.

Returns
connected or not.

Definition at line 70 of file lms1xx.cpp.

void LMS1xx::login ( )

Log into LMS1xx unit. Increase privilege level, giving ability to change device configuration.

Definition at line 123 of file lms1xx.cpp.

status_t LMS1xx::queryStatus ( )

Get current status of LMS1xx device.

Returns
status of LMS1xx device.

Definition at line 104 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 371 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.

Parameters
start1 : start 0 : stop

Definition at line 185 of file lms1xx.cpp.

void LMS1xx::setScanCfg ( const scanCfg cfg)

Set scan configuration. Get scan configuration :

  • scanning frequency.
  • scanning resolution.
  • start angle.
  • stop angle.
    Parameters
    cfgstructure containing scan configuration.

Definition at line 158 of file lms1xx.cpp.

void LMS1xx::setScanDataCfg ( const scanDataCfg cfg)

Set scan data configuration. Set format of scan message returned by device.

Parameters
cfgstructure containing scan data configuration.

Definition at line 171 of file lms1xx.cpp.

void LMS1xx::startDevice ( )

The device is returned to the measurement mode after configuration.

Definition at line 386 of file lms1xx.cpp.

void LMS1xx::startMeas ( )

Start measurements. After receiving this command LMS1xx unit starts spinning laser and measuring.

Definition at line 74 of file lms1xx.cpp.

void LMS1xx::stopMeas ( )

Stop measurements. After receiving this command LMS1xx unit stop spinning laser and measuring.

Definition at line 89 of file lms1xx.cpp.

Member Data Documentation

bool LMS1xx::connected
private

Definition at line 299 of file lms1xx.h.

bool LMS1xx::debug
private

Definition at line 300 of file lms1xx.h.

int LMS1xx::sockDesc
private

Definition at line 302 of file lms1xx.h.


The documentation for this class was generated from the following files:


lms1xx
Author(s): Konrad Banachowicz
autogenerated on Mon Mar 2 2015 01:32:13