data structure with binary data for request from PC to SDH More...
Public Member Functions | |
| sSDHBinaryRequest (eCommandCode command, double *value, bool use_crc16) | |
| tCRCValue * | CRC16 () 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__ |
data structure with binary data for request from PC to SDH
| 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
| 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
| union { ... } SDH::sSDHBinaryRequest::__attribute__ |
| unsigned char SDH::sSDHBinaryRequest::cmd_code |
| unsigned char SDH::sSDHBinaryRequest::nb_data_bytes |
| unsigned char SDH::sSDHBinaryRequest::nb_valid_parameters |
| float SDH::sSDHBinaryRequest::parameter[eNUMBER_OF_ELEMENTS] |
| unsigned char SDH::sSDHBinaryRequest::parameter_bytes[sizeof(float)*eNUMBER_OF_ELEMENTS+sizeof(tCRCValue)] |