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 
99 
106 
113 
121 SbgErrorCode sbgEComSetReceiveLogCallback(SbgEComHandle *pHandle, SbgEComReceiveLogFunc pReceiveLogCallback, void *pUserArg);
122 
129 void sbgEComSetCmdTrialsAndTimeOut(SbgEComHandle *pHandle, uint32_t numTrials, uint32_t cmdDefaultTimeOut);
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 
_SbgEComHandle::pUserArg
void * pUserArg
Definition: sbgECom.h:75
_SbgEComProtocol
Definition: sbgEComProtocol.h:50
SbgEComReceiveLogFunc
SbgErrorCode(* SbgEComReceiveLogFunc)(SbgEComHandle *pHandle, SbgEComClass msgClass, SbgEComMsgId msg, const SbgBinaryLogData *pLogData, void *pUserArg)
Definition: sbgECom.h:61
sbgEComIds.h
sbgEComInit
SbgErrorCode sbgEComInit(SbgEComHandle *pHandle, SbgInterface *pInterface)
Definition: sbgECom.c:19
sbgCommon.h
sbgEComErrorToString
void sbgEComErrorToString(SbgErrorCode errorCode, char errorMsg[256])
Definition: sbgECom.c:245
sbgEComHandle
SbgErrorCode sbgEComHandle(SbgEComHandle *pHandle)
Definition: sbgECom.c:165
_SbgEComHandle::pReceiveLogCallback
SbgEComReceiveLogFunc pReceiveLogCallback
Definition: sbgECom.h:74
sbgEComBinaryLogs.h
sbgEComSetReceiveLogCallback
SbgErrorCode sbgEComSetReceiveLogCallback(SbgEComHandle *pHandle, SbgEComReceiveLogFunc pReceiveLogCallback, void *pUserArg)
Definition: sbgECom.c:195
SbgEComClass
enum _SbgEComClass SbgEComClass
_SbgBinaryLogData
This file is used to parse received binary logs.
Definition: sbgEComBinaryLogs.h:49
sbgEComProtocol.h
_SbgEComHandle::cmdDefaultTimeOut
uint32_t cmdDefaultTimeOut
Definition: sbgECom.h:78
_SbgEComHandle::protocolHandle
SbgEComProtocol protocolHandle
Definition: sbgECom.h:72
_SbgEComHandle
Definition: sbgECom.h:70
sbgEComClose
SbgErrorCode sbgEComClose(SbgEComHandle *pHandle)
Definition: sbgECom.c:58
_SbgEComHandle::numTrials
uint32_t numTrials
Definition: sbgECom.h:77
SbgEComMsgId
uint8_t SbgEComMsgId
Definition: sbgEComIds.h:289
SbgErrorCode
enum _SbgErrorCode SbgErrorCode
Header file that defines all error codes for SBG Systems libraries.
_SbgInterface
Definition: sbgInterface.h:131
sbgEComHandleOneLog
SbgErrorCode sbgEComHandleOneLog(SbgEComHandle *pHandle)
Definition: sbgECom.c:85
sbgEComSetCmdTrialsAndTimeOut
void sbgEComSetCmdTrialsAndTimeOut(SbgEComHandle *pHandle, uint32_t numTrials, uint32_t cmdDefaultTimeOut)
Definition: sbgECom.c:224


sbg_driver
Author(s): SBG Systems
autogenerated on Fri Oct 11 2024 02:13:40