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 
60 typedef SbgErrorCode (*SbgEComReceiveFunc)(SbgEComHandle *pHandle, SbgEComCmdId logCmd, const SbgBinaryLogData *pLogData, void *pUserArg);
61 
71 typedef SbgErrorCode (*SbgEComReceiveLogFunc)(SbgEComHandle *pHandle, SbgEComClass msgClass, SbgEComMsgId msg, const SbgBinaryLogData *pLogData, void *pUserArg);
72 
73 //----------------------------------------------------------------------//
74 //- Structures definitions -//
75 //----------------------------------------------------------------------//
76 
81 {
85  void *pUserArg;
88 };
89 
90 //----------------------------------------------------------------------//
91 //- Public methods declarations -//
92 //----------------------------------------------------------------------//
93 
100 SbgErrorCode sbgEComInit(SbgEComHandle *pHandle, SbgInterface *pInterface);
101 
108 
115 
122 
131 
140 
148 
155 
160 const char *sbgEComGetVersionAsString(void);
161 
167 void sbgEComErrorToString(SbgErrorCode errorCode, char errorMsg[256]);
168 
169 //----------------------------------------------------------------------//
170 //- Footer (close extern C block) -//
171 //----------------------------------------------------------------------//
172 #ifdef __cplusplus
173 }
174 #endif
175 
176 #endif /* __SBG_ECOM_H__ */
177 
unsigned int uint32
Definition: sbgTypes.h:58
SbgErrorCode(* SbgEComReceiveLogFunc)(SbgEComHandle *pHandle, SbgEComClass msgClass, SbgEComMsgId msg, const SbgBinaryLogData *pLogData, void *pUserArg)
Definition: sbgECom.h:71
const char * sbgEComGetVersionAsString(void)
Definition: sbgECom.c:295
SbgErrorCode sbgEComSetReceiveLogCallback(SbgEComHandle *pHandle, SbgEComReceiveLogFunc pReceiveLogCallback, void *pUserArg)
Definition: sbgECom.c:236
SbgEComReceiveFunc pReceiveCallback
Definition: sbgECom.h:83
Defines all sbgECom commands identifiers.
SbgErrorCode sbgEComHandleOneLog(SbgEComHandle *pHandle)
Definition: sbgECom.c:87
SbgEComProtocol protocolHandle
Definition: sbgECom.h:82
uint32 sbgEComGetVersion(void)
Definition: sbgECom.c:286
uint16 SbgEComCmdId
Definition: sbgEComIds.h:272
SbgErrorCode sbgEComInit(SbgEComHandle *pHandle, SbgInterface *pInterface)
Definition: sbgECom.c:20
SbgErrorCode sbgEComClose(SbgEComHandle *pHandle)
Definition: sbgECom.c:60
void sbgEComSetCmdTrialsAndTimeOut(SbgEComHandle *pHandle, uint32 numTrials, uint32 cmdDefaultTimeOut)
Definition: sbgECom.c:265
uint32 numTrials
Definition: sbgECom.h:86
SbgErrorCode(* SbgEComReceiveFunc)(SbgEComHandle *pHandle, SbgEComCmdId logCmd, const SbgBinaryLogData *pLogData, void *pUserArg)
Definition: sbgECom.h:60
SbgEComReceiveLogFunc pReceiveLogCallback
Definition: sbgECom.h:84
uint32 cmdDefaultTimeOut
Definition: sbgECom.h:87
Main header file for SBG Systems common C library.
void sbgEComErrorToString(SbgErrorCode errorCode, char errorMsg[256])
Definition: sbgECom.c:305
void * pUserArg
Definition: sbgECom.h:85
uint8 SbgEComMsgId
Definition: sbgEComIds.h:278
SbgErrorCode sbgEComSetReceiveCallback(SbgEComHandle *pHandle, SbgEComReceiveFunc pReceiveCallback, void *pUserArg)
Definition: sbgECom.c:206
SbgErrorCode sbgEComHandle(SbgEComHandle *pHandle)
Definition: sbgECom.c:176
enum _SbgEComClass SbgEComClass
This file is used to parse received binary logs.
SBG_DEPRECATED(SbgErrorCode sbgEComSetReceiveCallback(SbgEComHandle *pHandle, SbgEComReceiveFunc pReceiveCallback, void *pUserArg))
Implementation of the Ekinox binary communication protocol. You can access low-level communication w...
enum _SbgErrorCode SbgErrorCode


sbg_driver
Author(s):
autogenerated on Sun Jan 27 2019 03:42:20