Public Member Functions | Public Attributes | List of all members
sSDHBinaryRequest Struct Reference

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

Public Member Functions

tCRCValueCRC16 () 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__
 

Detailed Description

data structure with binary data for request from PC to SDH

Definition at line 65 of file sdhserial.cpp.

Constructor & Destructor Documentation

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.

Member Function Documentation

tCRCValue* 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)

Definition at line 86 of file sdhserial.cpp.

int sSDHBinaryRequest::GetNbBytesToSend ( ) const
inline

return the total number of bytes to send

Definition at line 92 of file sdhserial.cpp.

Member Data Documentation

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__

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


sdhlibrary_cpp
Author(s): Dirk Osswald
autogenerated on Sun Aug 18 2019 03:42:21