demo
sdhoptions.h
Go to the documentation of this file.
1
//======================================================================
29
//======================================================================
30
31
#ifndef SDHOPTIONS_h
32
#define SDHOPTIONS_h
33
34
//----------------------------------------------------------------------
35
// System Includes - include with <>
36
//----------------------------------------------------------------------
37
38
#include <
getopt.h
>
39
#include <assert.h>
40
41
#include <iostream>
42
#include <string>
43
44
//----------------------------------------------------------------------
45
// Project Includes - include with ""
46
//---------------------------------------------------------------------
47
48
#include <
sdh/sdh.h
>
49
50
//----------------------------------------------------------------------
51
// Defines, enums, unions, structs,
52
//----------------------------------------------------------------------
53
64
#define SDHUSAGE_DEFAULT "general sdhcom_serial sdhcom_common sdhcom_esdcan sdhcom_peakcan sdhcom_cancommon sdhcom_tcp"
65
66
#define SDH_DEFAULT_TCP_ADR "192.168.1.42"
67
#define SDH_DEFAULT_TCP_PORT 23
68
#define DSA_DEFAULT_TCP_PORT 13000
69
70
//----------------------------------------------------------------------
71
// Global variables
72
//----------------------------------------------------------------------
73
74
78
class
cSDHOptions
79
{
80
public
:
81
static
int
const
MAX_DEV_LENGTH
= 32;
82
83
std::string
usage
;
84
85
int
debug_level
;
86
std::ostream*
debuglog
;
87
88
int
sdhport
;
89
char
sdh_rs_device
[
MAX_DEV_LENGTH
];
90
double
timeout
;
91
unsigned
long
rs232_baudrate
;
92
93
bool
use_can_esd
;
94
int
net
;
95
96
bool
use_can_peak
;
97
char
sdh_canpeak_device
[
MAX_DEV_LENGTH
];
98
99
unsigned
long
can_baudrate
;
100
unsigned
int
id_read
;
101
unsigned
int
id_write
;
102
103
bool
use_radians
;
104
bool
use_fahrenheit
;
105
double
period
;
106
107
int
dsaport
;
108
char
dsa_rs_device
[
MAX_DEV_LENGTH
];
109
bool
do_RLE
;
110
111
int
framerate
;
112
bool
fullframe
;
113
bool
sensorinfo
;
114
bool
controllerinfo
;
115
int
matrixinfo
[6];
116
117
double
sensitivity
[6];
118
unsigned
int
threshold
[6];
119
bool
reset_to_default
;
120
bool
persistent
;
121
bool
showdsasettings
;
122
123
bool
use_tcp
;
124
std::string
tcp_adr
;
125
int
tcp_port
;
126
127
bool
dsa_use_tcp
;
128
int
dsa_tcp_port
;
129
148
cSDHOptions
(
char
const
* option_selection =
SDHUSAGE_DEFAULT
);
149
151
~cSDHOptions
();
152
159
int
Parse
(
int
argc,
char
** argv,
160
char
const
* helptext,
char
const
* progname,
char
const
* version,
char
const
* libname,
char
const
* librelease );
161
168
void
OpenCommunication
(
NS_SDH
cSDH
&hand );
169
};
170
171
#endif
172
173
//======================================================================
174
/*
175
Here are some settings for the emacs/xemacs editor (and can be safely ignored):
176
(e.g. to explicitely set C++ mode for *.h header files)
177
178
Local Variables:
179
mode:C++
180
mode:ELSE
181
End:
182
*/
183
//======================================================================
cSDHOptions::framerate
int framerate
Definition:
sdhoptions.h:111
cSDHOptions::id_write
unsigned int id_write
Definition:
sdhoptions.h:101
getopt.h
cSDHOptions::can_baudrate
unsigned long can_baudrate
Definition:
sdhoptions.h:99
cSDHOptions::tcp_adr
std::string tcp_adr
Definition:
sdhoptions.h:124
cSDHOptions::use_can_peak
bool use_can_peak
Definition:
sdhoptions.h:96
cSDHOptions::use_fahrenheit
bool use_fahrenheit
Definition:
sdhoptions.h:104
cSDHOptions::use_radians
bool use_radians
Definition:
sdhoptions.h:103
cSDHOptions::controllerinfo
bool controllerinfo
Definition:
sdhoptions.h:114
cSDHOptions::debuglog
std::ostream * debuglog
Definition:
sdhoptions.h:86
cSDHOptions::reset_to_default
bool reset_to_default
Definition:
sdhoptions.h:119
cSDHOptions::dsaport
int dsaport
Definition:
sdhoptions.h:107
cSDHOptions::OpenCommunication
void OpenCommunication(NS_SDH cSDH &hand)
Definition:
sdhoptions.cpp:865
cSDHOptions::debug_level
int debug_level
Definition:
sdhoptions.h:85
cSDHOptions::id_read
unsigned int id_read
Definition:
sdhoptions.h:100
cSDHOptions::cSDHOptions
cSDHOptions(char const *option_selection=SDHUSAGE_DEFAULT)
Definition:
sdhoptions.cpp:380
cSDHOptions::sensitivity
double sensitivity[6]
Definition:
sdhoptions.h:117
cSDHOptions::dsa_use_tcp
bool dsa_use_tcp
Definition:
sdhoptions.h:127
cSDHOptions::usage
std::string usage
Definition:
sdhoptions.h:83
cSDHOptions::sdhport
int sdhport
Definition:
sdhoptions.h:88
cSDHOptions::tcp_port
int tcp_port
Definition:
sdhoptions.h:125
cSDHOptions::persistent
bool persistent
Definition:
sdhoptions.h:120
NS_SDH
#define NS_SDH
Definition:
sdhlibrary_settings.h:82
cSDHOptions::dsa_tcp_port
int dsa_tcp_port
Definition:
sdhoptions.h:128
cSDHOptions::net
int net
Definition:
sdhoptions.h:94
cSDHOptions::fullframe
bool fullframe
Definition:
sdhoptions.h:112
cSDHOptions::period
double period
Definition:
sdhoptions.h:105
cSDHOptions::use_can_esd
bool use_can_esd
Definition:
sdhoptions.h:93
cSDHOptions
class for command line option parsing holding option parsing results
Definition:
sdhoptions.h:78
cSDH
#SDH::cSDH is the end user interface class to control a SDH (SCHUNK Dexterous Hand).
Definition:
sdh.h:172
cSDHOptions::~cSDHOptions
~cSDHOptions()
destructor, clean up
Definition:
sdhoptions.cpp:457
cSDHOptions::use_tcp
bool use_tcp
Definition:
sdhoptions.h:123
SDHUSAGE_DEFAULT
#define SDHUSAGE_DEFAULT
Definition:
sdhoptions.h:64
cSDHOptions::do_RLE
bool do_RLE
Definition:
sdhoptions.h:109
cSDHOptions::matrixinfo
int matrixinfo[6]
Definition:
sdhoptions.h:115
cSDHOptions::sensorinfo
bool sensorinfo
Definition:
sdhoptions.h:113
cSDHOptions::MAX_DEV_LENGTH
static const int MAX_DEV_LENGTH
Definition:
sdhoptions.h:81
cSDHOptions::timeout
double timeout
Definition:
sdhoptions.h:90
sdh.h
This file contains the interface to class #SDH::cSDH, the end user class to access the SDH from a PC.
cSDHOptions::showdsasettings
bool showdsasettings
Definition:
sdhoptions.h:121
cSDHOptions::Parse
int Parse(int argc, char **argv, char const *helptext, char const *progname, char const *version, char const *libname, char const *librelease)
Definition:
sdhoptions.cpp:464
cSDHOptions::rs232_baudrate
unsigned long rs232_baudrate
Definition:
sdhoptions.h:91
cSDHOptions::threshold
unsigned int threshold[6]
Definition:
sdhoptions.h:118
cSDHOptions::dsa_rs_device
char dsa_rs_device[MAX_DEV_LENGTH]
Definition:
sdhoptions.h:108
cSDHOptions::sdh_canpeak_device
char sdh_canpeak_device[MAX_DEV_LENGTH]
Definition:
sdhoptions.h:97
cSDHOptions::sdh_rs_device
char sdh_rs_device[MAX_DEV_LENGTH]
Definition:
sdhoptions.h:89
sdhlibrary_cpp
Author(s): Dirk Osswald
autogenerated on Wed Mar 2 2022 01:00:58