20 #include <boost/lexical_cast.hpp> 26 std::cout <<
" Usage : " << std::endl;
27 std::cout <<
" set_config ip resolution rate " << std::endl;
28 std::cout <<
" Exqample : " << std::endl;
29 std::cout <<
" set_config 192.168.1.2 0.25 50 " << std::endl;
32 int main(
int argc,
char** argv) {
45 std::cout <<
"Unable to connect to device at address : " << argv[1] << std::endl;
49 sCfg.angleResolution = (int)(boost::lexical_cast<double>(std::string(argv[2])) * 10000);
50 sCfg.scaningFrequency = boost::lexical_cast<
int>(std::string(argv[3])) * 100;
58 std::cout <<
"Configuration set to : " << std::endl;
59 std::cout <<
"resolution : " << (double)sCfg.angleResolution/10000.0 << std::endl;
60 std::cout <<
"frequency : " << (
double)sCfg.scaningFrequency/100.0 << std::endl;
scanCfg getScanCfg() const
Get current scan configuration. Get scan configuration :
void login()
Log into LMS1xx unit. Increase privilege level, giving ability to change device configuration.
Structure containing scan configuration.
void setScanCfg(const scanCfg &cfg)
Set scan configuration. Get scan configuration :
bool isConnected()
Get status of connection.
void disconnect()
Disconnect from LMS1xx device.
void connect(std::string host, int port=2111)
Connect to LMS1xx.
void saveConfig()
Save data permanently. Parameters are saved in the EEPROM of the LMS and will also be available after...
int main(int argc, char **argv)
Class responsible for communicating with LMS1xx device.