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 sbgEComProtocolSend(SbgEComProtocol *pHandle, uint8 msgClass, uint8 msg, const void *pData, size_t size)
SbgErrorCode sbgEComProtocolClose(SbgEComProtocol *pHandle)
struct _SbgEComProtocol SbgEComProtocol
uint8 rxBuffer[SBG_ECOM_MAX_BUFFER_SIZE]
SbgErrorCode sbgEComFinalizeFrameGeneration(SbgStreamBuffer *pOutputStream)
SbgErrorCode sbgEComProtocolInit(SbgEComProtocol *pHandle, SbgInterface *pInterface)
Main header file for SBG Systems common C library.
SbgErrorCode sbgEComProtocolReceive(SbgEComProtocol *pHandle, uint8 *pMsgClass, uint8 *pMsg, void *pData, size_t *pSize, size_t maxSize)
SbgErrorCode sbgEComStartFrameGeneration(SbgStreamBuffer *pOutputStream, uint8 msgClass, uint8 msg)
enum _SbgErrorCode SbgErrorCode
#define SBG_ECOM_MAX_BUFFER_SIZE