SDHLibrary-CPP 0.0.2.10SCHUNK GmbH & Co. KG
C++ access library for SCHUNK Dextrous Hand SDH

SDH::sSDHBinaryRequest Struct Reference

data structure with binary data for request from PC to SDH More...

List of all members.

Public Member Functions

 sSDHBinaryRequest (eCommandCode command, double *value, bool use_crc16)
tCRCValueCRC16 () const
 return a ptr to the CRC value in parameter_bytes, assuming that nb_data_bytes is correct (including the CRC bytes)
int GetNbBytesToSend () const
 return the total number of bytes to send

Public Attributes

unsigned char cmd_code
unsigned char nb_data_bytes
unsigned char nb_valid_parameters
union {
   float   parameter [eNUMBER_OF_ELEMENTS]
   unsigned char   parameter_bytes [sizeof(float)*eNUMBER_OF_ELEMENTS+sizeof(tCRCValue)]
__attribute__

Detailed Description

data structure with binary data for request from PC to SDH


Constructor & Destructor Documentation

sSDHBinaryRequest::sSDHBinaryRequest ( eCommandCode  command,
double *  value,
bool  use_crc16 
)

ctor, create a request with cmd_code command and eNUMBER_OF_ELEMENTS parameter from value or no parameters if value is NULL. Add crc if use_crc16 is true and set nb_data_bytes appropriately


Member Function Documentation

tCRCValue* SDH::sSDHBinaryRequest::CRC16 ( ) const [inline]

return a ptr to the CRC value in parameter_bytes, assuming that nb_data_bytes is correct (including the CRC bytes)

int SDH::sSDHBinaryRequest::GetNbBytesToSend ( ) const [inline]

return the total number of bytes to send


Member Data Documentation

float SDH::sSDHBinaryRequest::parameter[eNUMBER_OF_ELEMENTS]
unsigned char SDH::sSDHBinaryRequest::parameter_bytes[sizeof(float)*eNUMBER_OF_ELEMENTS+sizeof(tCRCValue)]

The documentation for this struct was generated from the following file: