25 #ifndef __SBG_ECOM_PROTOCOL_H__ 26 #define __SBG_ECOM_PROTOCOL_H__ 35 #define SBG_ECOM_MAX_BUFFER_SIZE (4096) 36 #define SBG_ECOM_MAX_PAYLOAD_SIZE (4086) 37 #define SBG_ECOM_SYNC_1 (0xFF) 38 #define SBG_ECOM_SYNC_2 (0x5A) 39 #define SBG_ECOM_ETX (0x33) 41 #define SBG_ECOM_RX_TIME_OUT (450) 43 //----------------------------------------------------------------------// SbgInterface * pLinkedInterface
This file implements the base interface for all Serial and Ethernet ports.
Used to read/write data from/to a memory buffer stream.
SbgErrorCode sbgEComProtocolClose(SbgEComProtocol *pHandle)
struct _SbgEComProtocol SbgEComProtocol
uint8_t rxBuffer[SBG_ECOM_MAX_BUFFER_SIZE]
SbgErrorCode sbgEComProtocolInit(SbgEComProtocol *pHandle, SbgInterface *pInterface)
SbgErrorCode sbgEComProtocolReceive(SbgEComProtocol *pHandle, uint8_t *pMsgClass, uint8_t *pMsg, void *pData, size_t *pSize, size_t maxSize)
SbgErrorCode sbgEComProtocolSend(SbgEComProtocol *pHandle, uint8_t msgClass, uint8_t msg, const void *pData, size_t size)
Main header file for SBG Systems common C library.
SbgErrorCode sbgEComStartFrameGeneration(SbgStreamBuffer *pOutputStream, uint8_t msgClass, uint8_t msg, size_t *pStreamCursor)
SbgErrorCode sbgEComFinalizeFrameGeneration(SbgStreamBuffer *pOutputStream, size_t streamCursor)
enum _SbgErrorCode SbgErrorCode
#define SBG_ECOM_MAX_BUFFER_SIZE