Go to the documentation of this file.
81 "Print measured temperatures of SDH.\n"
82 "(C++ demo application using the SDHLibrary-CPP library.)\n"
84 "A vector of temperatures is reported. The first 7 temperatures\n"
85 "are from sensors close to the corresponding axes motors.\n"
86 "The 8th value is the temperature of the FPGA, the controller chip (CPU).\n"
87 "The 9th value is the temperature of the PCB (Printed circuit board)\n"
88 "in the body of the SDH.\n"
91 " - Print temperatures of an SDH connected via Ethernet.\n"
92 " The SDH has IP-Address 192.168.1.42 and is attached to TCP port 23.\n"
93 " (Requires at least SDH-firmware v0.0.3.1)\n"
94 " > demo-GetAxisActualAngle --tcp=192.168.1.42:23\n"
96 " - Print temperatures of an SDH connected to port 2 = COM3 once:\n"
97 " > demo-temperature -p 2\n"
99 " - Print temperatures of an SDH connected to port 2 = COM3 every 500ms:\n"
100 " > demo-temperature -p 2 -t 0.5\n"
102 " - Print temperatures of an SDH connected to USB to RS232 converter 0 move:\n"
103 " > demo-temperature --sdh_rs_device=/dev/ttyUSB0 \n"
105 " - Get the version info of both the joint controllers and the tactile \n"
106 " sensor firmware from an SDH connected via Ethernet.\n"
107 " The joint controllers and the tactile sensors have a common IP-Address,\n"
108 " here 192.168.1.42. The SDH controller is attached to the \n"
109 " default TCP port 23 and the tactile sensors to the default TCP port 13000.\n"
110 " (Requires at least SDH-firmware v0.0.3.2)\n"
111 " > demo-GetAxisActualAngle --tcp=192.168.1.42 --dsa_tcp -v\n"
113 " - Get the version info of an SDH connected to port 2 = COM3 \n"
114 " > demo-temperature --port=2 -v\n";
115 char const*
__author__ =
"Dirk Osswald: dirk.osswald@de.schunk.com";
116 char const*
__url__ =
"http://www.schunk.com";
117 char const*
__version__ =
"$Id: demo-temperature.cpp 10351 2013-06-18 16:28:14Z Osswald2 $";
130 int main(
int argc,
char **argv )
147 cdbg <<
"Debug messages of " << argv[0] <<
" are printed like this.\n";
157 cdbg <<
"Successfully created cSDH instance\n";
161 cdbg <<
"Successfully opened communication to SDH\n";
164 cdbg <<
"Caption:\n";
166 cdbg <<
" times are reported in seconds\n";
175 double elapsed = 0.0;
189 cout << elapsed <<
" ";
190 elapsed += options.
period;
192 cout << start.
Elapsed() <<
" ";
196 for ( vector<double>::const_iterator vi = temps.begin();
213 cdbg <<
"Successfully disabled controllers of SDH and closed connection\n";
217 cerr <<
"demo-temperature main(): Caught exception from SDHLibrary: " << e->
what() <<
". Giving up!\n";
#define USING_NAMESPACE_SDH
Base class for exceptions in the SDHLibrary-CPP.
Very simple class to measure elapsed time.
char const * GetSymbol(void) const
Return the symbol of the external unit (something like "deg" or "ms")
double Elapsed(void) const
Return time in seconds elapsed between the time stored in the object and now.
Implementation of a class to parse common SDH related command line options.
void OpenCommunication(NS_SDH cSDH &hand)
static char const * GetLibraryRelease(void)
class for command line option parsing holding option parsing results
const cUnitConverter * uc_temperature
unit convert for temperatures: default = #SDH::cSDH::uc_temperature_celsius
#SDH::cSDH is the end user interface class to control a SDH (SCHUNK Dexterous Hand).
A class to print colored debug messages.
std::vector< double > GetTemperature(std::vector< int > const &sensors)
std::vector< int > all_temperature_sensors
A vector with indices of all temperature sensors.
This file contains some basic definitions (defines, macros, datatypes)
int main(int argc, char **argv)
Interface of auxilliary utility functions for SDHLibrary-CPP.
This file contains settings to make the SDHLibrary compile on differen systems:
static char const * GetLibraryName(void)
char const * GetName(void) const
Return the name of the external unit (something like "degrees" or "milliseconds")
USING_NAMESPACE_SDH NAMESPACE_SDH_START std::ostream * g_sdh_debug_log
This file contains the interface to class #SDH::cSDH, the end user class to access the SDH from a PC.
virtual const char * what() const
int Parse(int argc, char **argv, char const *helptext, char const *progname, char const *version, char const *libname, char const *librelease)
void Close(bool leave_enabled=false)
Interface of auxilliary utility functions for SDHLibrary-CPP.
#define SDH_ASSERT_TYPESIZES()
macro to assert that the defined typedefs have the expected sizes
char const * __copyright__
sdhlibrary_cpp
Author(s): Dirk Osswald
autogenerated on Wed Mar 2 2022 01:00:58