Go to the documentation of this file.
70 "eEC_SUCCESS: No error",
71 "eEC_NOT_AVAILABLE: Service or data is not available",
72 "eEC_NOT_INITIALIZED: The device is not initialized",
73 "eEC_ALREADY_RUNNING: Data acquisition: the acquisition loop is already running",
74 "eEC_FEATUReEC_NOT_SUPPORTED: The asked feature is not supported",
75 "eEC_INCONSISTENT_DATA: One or more dependent parameters mismatch",
76 "eEC_TIMEOUT: Timeout error",
77 "eEC_READ_ERROR: Error while reading from a device",
78 "eEC_WRITE_ERROR: Error while writing to a device",
79 "eEC_INSUFFICIENT_RESOURCES: No memory available",
80 "eEC_CHECKSUM_ERROR: Checksum error",
81 "eEC_NOT_ENOUGH_PARAMS: Not enough parameters",
82 "eEC_NO_PARAMS_EXPECTED: No parameters expected",
83 "eEC_CMD_UNKNOWN: Unknown command",
84 "eEC_CMD_FORMAT_ERROR: Command format error",
85 "eEC_ACCESS_DENIED: Access denied",
86 "eEC_ALREADY_OPEN: Interface already open",
87 "eEC_CMD_FAILED: Command failed",
88 "eEC_CMD_ABORTED: Command aborted",
89 "eEC_INVALID_HANDLE: Invalid handle",
90 "eEC_DEVICE_NOT_FOUND: Device not found",
91 "eEC_DEVICE_NOT_OPENED: Device not open",
92 "eEC_IO_ERROR: General I/O-Error",
93 "eEC_INVALID_PARAMETER: Invalid parameter",
94 "eEC_RANGE_ERROR: Range error",
95 "eEC_NO_DATAPIPE: No datapipe was found to open the specified device path",
96 "eEC_INDEX_OUT_OF_BOUNDS: The passed index is out of bounds",
97 "eEC_HOMING_ERROR: Error while homing",
98 "eEC_AXIS_DISABLED: The selected axis is disabled",
99 "eEC_OVER_TEMPERATURE: Over-temperature",
100 "eEC_MAX_COMMANDS_EXCEEDED: E_MAX_COMMANDS_EXCEEDED: cannot add more than CI_MAX_COMMANDS to interpreter / POSCON_MAX_OSCILLOSCOPE parameters to oscilloscope",
101 "eEC_INVALID_PASSWORD: E_INVALID_PASSWORD: invalid password given for change user command",
102 "eEC_MAX_COMMANDLINE_EXCEEDEDE_COMMANDLINE_EXCEEDED: the command line given is too long",
103 "eEC_CRC_ERROR: Cyclic Redundancy Code error",
104 "eEC_NO_COMMAND: No command available",
106 "eEC_INTERNAL: internal error",
107 "eEC_UNKNOWN_ERROR: unknown error",
109 "eEC_DIMENSION: Number of error codes"
115 "eGID_CENTRICAL: centrical grasp",
116 "eGID_PARALLEL: parallel grasp",
117 "eGID_CYLINDRICAL: cylindrical grasp",
118 "eGID_SPHERICAL: spherecial grasp",
120 "eGID_DIMENSION: number of predefined grasp ids"
127 "eCT_POSE: position/pose controller coordinated",
128 "eCT_VELOCITY: velocity controller",
129 "eCT_VELOCITY_ACCELERATION: velocity with acceleration ramp controller",
133 "eCT_DIMENSION: number of controller types"
141 debug_level(_debug_level),
143 NUMBER_OF_FINGERS( 3 ),
144 NUMBER_OF_TEMPERATURE_SENSORS( 9 )
146 cdbg <<
"Constructing cSDHBASE object\n";
171 if (index < 0 || maxindex <= index)
179 if (!
InRange(value, minvalue, maxvalue) )
189 if (!
InRange(values[i],minvalues[i],maxvalues[i]) )
190 throw new cSDHErrorInvalidParameter(
cMsg(
"Invalid %s value in vector (values[%d]=%f not in range [%f..%f])", name, i, values[i], minvalues[i], maxvalues[i] ) );
201 return "invalid error code";
211 return "invalid gasp id";
221 return "invalid controller type";
#define USING_NAMESPACE_SDH
@ eGID_DIMENSION
Endmarker and dimension.
cSimpleVector max_angle_v
Maximum allowed axis angles (in internal units (degrees))
#define NAMESPACE_SDH_END
int GetNumberOfAxes(void)
Return the number of axes of the SDH.
cDBG cdbg
debug stream to print colored debug messages
static char const * controller_type_name[]
A mapping from eControllerType controller type enums to strings with human readable controller type n...
double GetEps(void)
Return the eps value.
@ eCT_DIMENSION
Endmarker and dimension.
bool InRange(double v, double min, double max)
eControllerType
An enum for all possible SDH internal controller types (order must match that in the SDH firmware in ...
int GetNumberOfFingers(void)
Return the number of fingers of the SDH.
static char const * grasp_id_name[]
A mapping from eGraspId grasp id enums to strings with human readable grasp id names.
double eps
epsilon value (max absolute deviation of reported values from actual hardware values) (needed since S...
static char const * GetStringFromErrorCode(eErrorCode error_code)
Return a ptr to a (static) string describing error code error_code.
A simple vector implementation.
UInt16 error_code
0000h, if successful, otherwise error code
int NUMBER_OF_FINGERS
The number of fingers.
@ eCT_INVALID
invalid controller_type (needed for cSDHSerial::con() to indicate "read current controller type")
@ eEC_DIMENSION
Endmarker and dimension.
Class for short, fixed maximum length text messages.
void CheckRange(double value, double minvalue, double maxvalue, char const *name="")
Check if value is in [minvalue .. maxvalue]. Throw a cSDHErrorInvalidParameter exception if not.
static char const * firmware_error_codes[]
A mapping from eErrorCode error code enums to strings with human readable error messages.
cSDHBase(int debug_level)
void CheckIndex(int index, int maxindex, char const *name="")
Check if index is in [0 .. maxindex-1] or All. Throw a cSDHErrorInvalidParameter exception if not.
const cSimpleVector & GetEpsVector(void)
Return simple vector of number of axes epsilon values.
cSimpleVector min_angle_v
simple vector of 7 0 values ???
cSimpleVector eps_v
simple vector of 7 epsilon values
#define NAMESPACE_SDH_START
Derived exception class for exceptions related to invalid parameters.
int GetNumberOfTemperatureSensors(void)
Return the number of temperature sensors of the SDH.
@ eGID_INVALID
invalid grasp id
eErrorCode GetFirmwareState(void)
Return the last known state of the SDH firmware.
eErrorCode firmware_state
the last known state of the SDH firmware
int NUMBER_OF_TEMPERATURE_SENSORS
The number of temperature sensors.
USING_NAMESPACE_SDH NAMESPACE_SDH_START std::ostream * g_sdh_debug_log
Interface of class #SDH::cSDHBase.
int all_axes_used
Bit field with the bits for all axes set.
eGraspId
The enum values of the known grasps.
static char const * GetStringFromControllerType(eControllerType controller_type)
Return a ptr to a (static) string describing controller type controller_Type.
Interface of auxilliary utility functions for SDHLibrary-CPP.
static char const * GetStringFromGraspId(eGraspId grasp_id)
Return a ptr to a (static) string describing grasp id grasp_id.
int NUMBER_OF_AXES
The number of axes.
sdhlibrary_cpp
Author(s): Dirk Osswald
autogenerated on Wed Mar 2 2022 01:00:58