SDHLibrary-CPP 0.0.2.10 C++ access library for SCHUNK Dextrous Hand SDH

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes | Static Public Attributes

# cSDHOptions Class Reference

class for command line option parsing holding option parsing results More...

`#include <sdhoptions.h>`

List of all members.

## 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

## Detailed Description

class for command line option parsing holding option parsing results

## Constructor & Destructor Documentation

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

Parameters:

  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 "general" see sdhusage_general "sdhcom_serial" see sdhusage_sdhcom_serial "sdhcom_common" see sdhusage_sdhcom_common "sdhcom_esdcan" see sdhusage_sdhcom_esdcan "sdhcom_peakcan" see sdhusage_sdhcom_peakcan "sdhcom_cancommon" see sdhusage_sdhcom_cancommon "sdhcom_tcp" see sdhusage_sdhcom_tcp "sdhother" see sdhusage_sdhother "dsacom" see sdhusage_dsacom "dsaother" see sdhusage_dsaother

cSDHOptions::~cSDHOptions | ( |  | ) |

destructor, clean up

## Member Function Documentation

void cSDHOptions::OpenCommunication | ( | NS_SDH cSDH & | hand | ) |

convenience function to open the communication of the given hand object according to the parsed parameters.

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

Returns:
  the optind index of the first non option argument in argv

## Member Data Documentation

unsigned long cSDHOptions::can_baudrate

bool cSDHOptions::controllerinfo

int cSDHOptions::debug_level

std::ostream* cSDHOptions::debuglog

bool cSDHOptions::do_RLE

char cSDHOptions::dsa_rs_device[MAX_DEV_LENGTH]

int cSDHOptions::dsa_tcp_port

bool cSDHOptions::dsa_use_tcp

int cSDHOptions::dsaport

int cSDHOptions::framerate

bool cSDHOptions::fullframe

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

bool cSDHOptions::persistent

bool cSDHOptions::reset_to_default

unsigned long cSDHOptions::rs232_baudrate

char cSDHOptions::sdh_canpeak_device[MAX_DEV_LENGTH]

char cSDHOptions::sdh_rs_device[MAX_DEV_LENGTH]

int cSDHOptions::sdhport

double cSDHOptions::sensitivity[6]

bool cSDHOptions::sensorinfo

bool cSDHOptions::showdsasettings

std::string cSDHOptions::tcp_adr

int cSDHOptions::tcp_port

unsigned int cSDHOptions::threshold[6]

double cSDHOptions::timeout

std::string cSDHOptions::usage

bool cSDHOptions::use_can_esd

bool cSDHOptions::use_can_peak

bool cSDHOptions::use_fahrenheit

bool cSDHOptions::use_radians

bool cSDHOptions::use_tcp

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

- demo/sdhoptions.h
- demo/sdhoptions.cpp