class for command line option parsing holding option parsing results More...
#include <sdhoptions.h>
Public Member Functions | |
cSDHOptions (char const *option_selection="general sdhcom_serial sdhcom_common sdhcom_esdcan sdhcom_peakcan sdhcom_cancommon sdhcom_tcp") | |
~cSDHOptions () | |
destructor, clean up | |
int | Parse (int argc, char **argv, char const *helptext, char const *progname, char const *version, char const *libname, char const *librelease) |
void | OpenCommunication (NS_SDH cSDH &hand) |
Public Attributes | |
std::string | usage |
int | debug_level |
std::ostream * | debuglog |
int | sdhport |
char | sdh_rs_device [MAX_DEV_LENGTH] |
double | timeout |
unsigned long | rs232_baudrate |
bool | use_can_esd |
int | net |
bool | use_can_peak |
char | sdh_canpeak_device [MAX_DEV_LENGTH] |
unsigned long | can_baudrate |
unsigned int | id_read |
unsigned int | id_write |
bool | use_radians |
bool | use_fahrenheit |
double | period |
int | dsaport |
char | dsa_rs_device [MAX_DEV_LENGTH] |
bool | do_RLE |
int | framerate |
bool | fullframe |
bool | sensorinfo |
bool | controllerinfo |
int | matrixinfo [6] |
double | sensitivity [6] |
unsigned int | threshold [6] |
bool | reset_to_default |
bool | persistent |
bool | showdsasettings |
bool | use_tcp |
std::string | tcp_adr |
int | tcp_port |
bool | dsa_use_tcp |
int | dsa_tcp_port |
Static Public Attributes | |
static int const | MAX_DEV_LENGTH = 32 |
class for command line option parsing holding option parsing results
cSDHOptions::cSDHOptions | ( | char const * | option_selection = "general sdhcom_serial sdhcom_common sdhcom_esdcan sdhcom_peakcan sdhcom_cancommon sdhcom_tcp" | ) |
constructor: init members to their default values
option_selection | - string that names the options to include in helptext for online help. With a text including one of the following keywords the corresponding helptext is added to the usage helptext
|
cSDHOptions::~cSDHOptions | ( | ) |
destructor, clean up
void cSDHOptions::OpenCommunication | ( | NS_SDH cSDH & | hand | ) |
convenience function to open the communication of the given hand object according to the parsed parameters.
hand | - reference to a cSDH object to open |
int cSDHOptions::Parse | ( | int | argc, |
char ** | argv, | ||
char const * | helptext, | ||
char const * | progname, | ||
char const * | version, | ||
char const * | libname, | ||
char const * | librelease | ||
) |
parse the command line parameters argc, argv into members. helptext, progname, version, libname and librelease are used when printing online help. start parsing at option with index *p_option_index parse all options if parse_all is true, else only one option is parsed
unsigned long cSDHOptions::can_baudrate |
std::ostream* cSDHOptions::debuglog |
bool cSDHOptions::do_RLE |
unsigned int cSDHOptions::id_read |
unsigned int cSDHOptions::id_write |
int cSDHOptions::matrixinfo[6] |
int const cSDHOptions::MAX_DEV_LENGTH = 32 [static] |
int cSDHOptions::net |
double cSDHOptions::period |
unsigned long cSDHOptions::rs232_baudrate |
double cSDHOptions::sensitivity[6] |
std::string cSDHOptions::tcp_adr |
unsigned int cSDHOptions::threshold[6] |
double cSDHOptions::timeout |
std::string cSDHOptions::usage |
bool cSDHOptions::use_tcp |