sbgECom  1.11.920-stable
sbgECom.h
Go to the documentation of this file.
1 
27 #ifndef __SBG_ECOM_H__
28 #define __SBG_ECOM_H__
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 #include <sbgCommon.h>
35 #include "sbgEComIds.h"
38 
39 //----------------------------------------------------------------------//
40 //- Predefinitions -//
41 //----------------------------------------------------------------------//
42 
47 
48 //----------------------------------------------------------------------//
49 //- Callbacks definitions -//
50 //----------------------------------------------------------------------//
51 
61 typedef SbgErrorCode (*SbgEComReceiveLogFunc)(SbgEComHandle *pHandle, SbgEComClass msgClass, SbgEComMsgId msg, const SbgBinaryLogData *pLogData, void *pUserArg);
62 
63 //----------------------------------------------------------------------//
64 //- Structures definitions -//
65 //----------------------------------------------------------------------//
66 
71 {
75  void *pUserArg;
77  uint32_t numTrials;
78  uint32_t cmdDefaultTimeOut;
79 };
80 
81 //----------------------------------------------------------------------//
82 //- Public methods declarations -//
83 //----------------------------------------------------------------------//
84 
91 SbgErrorCode sbgEComInit(SbgEComHandle *pHandle, SbgInterface *pInterface);
92 
98 SbgErrorCode sbgEComClose(SbgEComHandle *pHandle);
99 
105 SbgErrorCode sbgEComHandleOneLog(SbgEComHandle *pHandle);
106 
112 SbgErrorCode sbgEComHandle(SbgEComHandle *pHandle);
113 
122 
130 
136 void sbgEComErrorToString(SbgErrorCode errorCode, char errorMsg[256]);
137 
138 //----------------------------------------------------------------------//
139 //- Footer (close extern C block) -//
140 //----------------------------------------------------------------------//
141 #ifdef __cplusplus
142 }
143 #endif
144 
145 #endif /* __SBG_ECOM_H__ */
146 
SbgEComReceiveLogFunc pReceiveLogCallback
Definition: sbgECom.h:74
uint8_t SbgEComMsgId
Definition: sbgEComIds.h:289
void * pUserArg
Definition: sbgECom.h:75
This file is used to parse received binary logs.
void sbgEComSetCmdTrialsAndTimeOut(SbgEComHandle *pHandle, uint32_t numTrials, uint32_t cmdDefaultTimeOut)
Definition: sbgECom.h:70
SbgErrorCode sbgEComHandleOneLog(SbgEComHandle *pHandle)
Implementation of the Ekinox binary communication protocol. You can access low-level communication w...
SbgErrorCode sbgEComSetReceiveLogCallback(SbgEComHandle *pHandle, SbgEComReceiveLogFunc pReceiveLogCallback, void *pUserArg)
Definition: sbgEComProtocol.h:50
Definition: sbgEComBinaryLogs.h:49
SbgErrorCode sbgEComInit(SbgEComHandle *pHandle, SbgInterface *pInterface)
enum _SbgEComClass SbgEComClass
SbgEComProtocol protocolHandle
Definition: sbgECom.h:72
uint32_t numTrials
Definition: sbgECom.h:77
Defines all sbgECom commands identifiers.
uint32_t cmdDefaultTimeOut
Definition: sbgECom.h:78
void sbgEComErrorToString(SbgErrorCode errorCode, char errorMsg[256])
SbgErrorCode sbgEComClose(SbgEComHandle *pHandle)
SbgErrorCode(* SbgEComReceiveLogFunc)(SbgEComHandle *pHandle, SbgEComClass msgClass, SbgEComMsgId msg, const SbgBinaryLogData *pLogData, void *pUserArg)
Definition: sbgECom.h:61
SbgErrorCode sbgEComHandle(SbgEComHandle *pHandle)