Index: firmware/App/Services/MsgQueues.h =================================================================== diff -u -r3518e8a088c32e75c0c8960d5e629a7401095feb -re8654d6ebf2c76c6bae8e1b465cc1382d205832a --- firmware/App/Services/MsgQueues.h (.../MsgQueues.h) (revision 3518e8a088c32e75c0c8960d5e629a7401095feb) +++ firmware/App/Services/MsgQueues.h (.../MsgQueues.h) (revision e8654d6ebf2c76c6bae8e1b465cc1382d205832a) @@ -20,6 +20,7 @@ #include "TDCommon.h" #include "CommBuffers.h" +#include "MessageSupport.h" /** * @defgroup MsgQueues MsgQueues @@ -32,44 +33,13 @@ // ********** public definitions ********** -#define MAX_MSG_PAYLOAD_SIZE 250 ///< Bytes - /// Enumeration of message queues. typedef enum Msg_Queues { MSG_Q_IN = 0, ///< Incoming CAN message queue. NUM_OF_MSG_QUEUES ///< Number of message queues. } MSG_QUEUE_T; -#pragma pack(push,1) - -/// Record structure for message header. -typedef struct -{ - S16 seqNo; ///< Sequence number (and ACK required bit) of message - U16 msgID; ///< ID of message - U08 payloadLen; ///< Length of payload in bytes -} MESSAGE_HEADER_T; - -/// Record structure for a message (header + payload). -typedef struct -{ - COMM_BUFFER_T in_buffer; ///< Message received into this channel buffer - MESSAGE_HEADER_T hdr; ///< Message header - U08 payload[ MAX_MSG_PAYLOAD_SIZE ]; ///< Message payload -} MESSAGE_T; - -/// Record structure for a wrapped message (message + CRC). -typedef struct -{ - MESSAGE_T msg; ///< Message - U08 crc; ///< Message CRC -} MESSAGE_WRAPPER_T; - -#pragma pack(pop) - -#define MESSAGE_OVERHEAD_SIZE (sizeof(MESSAGE_HEADER_T) + sizeof(U08)) ///< Byte size of a message's overhead (fixed at 6 bytes). - // ********** public function prototypes ********** void initMsgQueues( void );