data structure with binary data for request from PC to SDH More...
Public Member Functions | |
tCRCValue * | CRC16 () const |
return a ptr to the CRC value in parameter_bytes, assuming that nb_data_bytes is correct (including the CRC bytes) More... | |
int | GetNbBytesToSend () const |
return the total number of bytes to send More... | |
sSDHBinaryRequest (eCommandCode command, double *value, bool use_crc16) | |
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)] | |
} | SDH__attribute__ |
data structure with binary data for request from PC to SDH
Definition at line 65 of file sdhserial.cpp.
NAMESPACE_SDH_END USING_NAMESPACE_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
Definition at line 155 of file sdhserial.cpp.
|
inline |
return a ptr to the CRC value in parameter_bytes, assuming that nb_data_bytes is correct (including the CRC bytes)
Definition at line 86 of file sdhserial.cpp.
|
inline |
return the total number of bytes to send
Definition at line 92 of file sdhserial.cpp.
unsigned char sSDHBinaryRequest::cmd_code |
Definition at line 71 of file sdhserial.cpp.
unsigned char sSDHBinaryRequest::nb_data_bytes |
Definition at line 72 of file sdhserial.cpp.
unsigned char sSDHBinaryRequest::nb_valid_parameters |
Definition at line 73 of file sdhserial.cpp.
float sSDHBinaryRequest::parameter[eNUMBER_OF_ELEMENTS] |
Definition at line 75 of file sdhserial.cpp.
unsigned char sSDHBinaryRequest::parameter_bytes[sizeof(float)*eNUMBER_OF_ELEMENTS+sizeof(tCRCValue)] |
Definition at line 76 of file sdhserial.cpp.
union { ... } sSDHBinaryRequest::SDH__attribute__ |