Defines | Functions | Variables
main.cc File Reference
#include <string>
#include <iostream>
#include <signal.h>
#include <stdlib.h>
#include <sicktoolbox/SickLD.hh>
#include "ConfigFile.h"
Include dependency graph for ld/ld_config/src/main.cc:

Go to the source code of this file.

Defines

#define CONFIG_OPT_MOTOR_SPD_STR   "SICK_LD_MOTOR_SPEED"
#define CONFIG_OPT_SCAN_AREA_STR   "SICK_LD_SCAN_AREAS"
#define CONFIG_OPT_SCAN_RES_STR   "SICK_LD_SCAN_RESOLUTION"
#define INVALID_OPTION_STRING   " Invalid option!!! :o("
#define PROMPT_STRING   "ld?> "

Functions

string getFilename ()
 Prompts the user for config filename.
int getUserOption (bool &is_null_input)
int main (int argc, char *argv[])
bool parseNumStr (const string &entry, double &num)
bool parseScanAreasStr (string &scan_areas_str, double *start_angs, double *stop_angs, int &num_sectors)
void printConfig ()
 Prints the current Sick status/config.
void setConfig ()
 Attempts to set the desired config via the driver. Parses configuration file as well.
void sigintHandler (int signal)

Variables

SickLDsick_ld = NULL

Define Documentation

#define CONFIG_OPT_MOTOR_SPD_STR   "SICK_LD_MOTOR_SPEED"

Definition at line 35 of file ld/ld_config/src/main.cc.

#define CONFIG_OPT_SCAN_AREA_STR   "SICK_LD_SCAN_AREAS"

Definition at line 36 of file ld/ld_config/src/main.cc.

#define CONFIG_OPT_SCAN_RES_STR   "SICK_LD_SCAN_RESOLUTION"

Definition at line 37 of file ld/ld_config/src/main.cc.

#define INVALID_OPTION_STRING   " Invalid option!!! :o("

Definition at line 31 of file ld/ld_config/src/main.cc.

#define PROMPT_STRING   "ld?> "

Definition at line 32 of file ld/ld_config/src/main.cc.


Function Documentation

string getFilename ( )

Prompts the user for config filename.

Prompts the user for the filename

Returns:
Configuration file path

Definition at line 234 of file ld/ld_config/src/main.cc.

int getUserOption ( bool &  is_null_input)

Reads user input string and returns numeric representation.

Reads in user input string and returns numeric representation

Definition at line 212 of file ld/ld_config/src/main.cc.

int main ( int  argc,
char *  argv[] 
)

Definition at line 110 of file ld/ld_config/src/main.cc.

bool parseNumStr ( const string &  entry,
double &  num 
)

Parses entry string into a double, and saves it in num.

Definition at line 417 of file ld/ld_config/src/main.cc.

bool parseScanAreasStr ( string &  areas,
double *  start_angs,
double *  stop_angs,
int &  num_pairs 
)

Parses scan areas string in order extract desired sector configuration

Definition at line 336 of file ld/ld_config/src/main.cc.

void printConfig ( )

Prints the current Sick status/config.

Print the current Sick LD configuration

Definition at line 322 of file ld/ld_config/src/main.cc.

void setConfig ( )

Attempts to set the desired config via the driver. Parses configuration file as well.

Parses config file and loads new configuration

Definition at line 248 of file ld/ld_config/src/main.cc.

void sigintHandler ( int  signal)

Handles the SIGINT signal

Handle the SIGINT signal

Definition at line 183 of file ld/ld_config/src/main.cc.


Variable Documentation

SickLD* sick_ld = NULL

Definition at line 108 of file ld/ld_config/src/main.cc.



sicktoolbox
Author(s): Jason Derenick , Thomas Miller
autogenerated on Thu Aug 27 2015 15:17:16