Index: firmware/App/Services/MsgQueues.h =================================================================== diff -u -rcd3af1ebb7396ba3b2bec1d779510d29c30014f4 -r4fb1e15d35f6b968bab5620909c30baec98bfd4e --- firmware/App/Services/MsgQueues.h (.../MsgQueues.h) (revision cd3af1ebb7396ba3b2bec1d779510d29c30014f4) +++ firmware/App/Services/MsgQueues.h (.../MsgQueues.h) (revision 4fb1e15d35f6b968bab5620909c30baec98bfd4e) @@ -19,7 +19,8 @@ #define __MSG_QUEUES_H__ #include "DDCommon.h" -#include "CommBuffers.h" +#include "CommBuffers.h" +#include "MessageSupport.h" /** * @defgroup MsgQueues MsgQueues @@ -32,42 +33,13 @@ // ********** public definitions ********** -#define MAX_MSG_PAYLOAD_SIZE 250 ///< Maximum message payload size in bytes. - /// List of message queues. typedef enum Msg_Queues { MSG_Q_IN = 0, ///< Incoming message queue NUM_OF_MSG_QUEUES ///< Number of message queues } MSG_QUEUE_T; -#pragma pack(push,1) -/// Message header struct. -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; - -/// Message struct. -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; - -/// Message wrapper struct. -typedef struct -{ - MESSAGE_T msg; ///< Message struct - U08 crc; ///< Message's crc -} MESSAGE_WRAPPER_T; -#pragma pack(pop) - -#define MESSAGE_OVERHEAD_SIZE (sizeof(MESSAGE_HEADER_T) + sizeof(U08)) ///< Message overhead size - // ********** public function prototypes ********** void initMsgQueues( void );