sbgEComCmdCommon.h
Go to the documentation of this file.
1 
20 #ifndef __SBG_ECOM_CMD_COMMON_H__
21 #define __SBG_ECOM_CMD_COMMON_H__
22 
23 #include "../sbgECom.h"
24 
25 //----------------------------------------------------------------------//
26 //- Defintions -//
27 //----------------------------------------------------------------------//
28 
29 #define SBG_ECOM_DEFAULT_CMD_TIME_OUT (500)
34 typedef enum _SbgEComRejectionMode
35 {
40 
45 {
53 
58 typedef struct _SbgEComModelInfo
59 {
60  uint32_t id;
61  uint32_t revision;
63 
64 //----------------------------------------------------------------------//
65 //- Common command reception operations -//
66 //----------------------------------------------------------------------//
67 
85 SbgErrorCode sbgEComReceiveAnyCmd(SbgEComHandle *pHandle, uint8_t *pMsgClass, uint8_t *pMsg, void *pData, size_t *pSize, size_t maxSize, uint32_t timeOut);
86 
104 SbgErrorCode sbgEComReceiveCmd(SbgEComHandle *pHandle, uint8_t msgClass, uint8_t msg, void *pData, size_t *pSize, size_t maxSize, uint32_t timeOut);
105 
106 //----------------------------------------------------------------------//
107 //- ACK related commands operations -//
108 //----------------------------------------------------------------------//
109 
119 SbgErrorCode sbgEComWaitForAck(SbgEComHandle *pHandle, uint8_t msgClass, uint8_t msg, uint32_t timeOut);
120 
130 SbgErrorCode sbgEComSendAck(SbgEComHandle *pHandle, uint8_t msgClass, uint8_t msg, SbgErrorCode cmdError);
131 
132 //----------------------------------------------------------------------//
133 //- Generic command definitions -//
134 //----------------------------------------------------------------------//
135 
145 SbgErrorCode sbgEComCmdGenericSetModelId(SbgEComHandle *pHandle, uint8_t msgClass, uint8_t msg, uint32_t modelId);
146 
156 SbgErrorCode sbgEComCmdGenericGetModelId(SbgEComHandle *pHandle, uint8_t msgClass, uint8_t msg, uint32_t *pModelId);
157 
167 SbgErrorCode sbgEComCmdGenericGetModelInfo(SbgEComHandle *pHandle, uint8_t msgClass, uint8_t msg, SbgEComModelInfo *pModelInfo);
168 
169 #endif
sbgEComSendAck
SbgErrorCode sbgEComSendAck(SbgEComHandle *pHandle, uint8_t msgClass, uint8_t msg, SbgErrorCode cmdError)
Definition: sbgEComCmdCommon.c:351
SBG_ECOM_ALWAYS_ACCEPT_MODE
@ SBG_ECOM_ALWAYS_ACCEPT_MODE
Definition: sbgEComCmdCommon.h:38
_SbgEComModelInfo
Definition: sbgEComCmdCommon.h:58
SBG_ECOM_ALIGNMENT_DOWN
@ SBG_ECOM_ALIGNMENT_DOWN
Definition: sbgEComCmdCommon.h:51
sbgEComCmdGenericGetModelId
SbgErrorCode sbgEComCmdGenericGetModelId(SbgEComHandle *pHandle, uint8_t msgClass, uint8_t msg, uint32_t *pModelId)
Definition: sbgEComCmdCommon.c:446
SBG_ECOM_AUTOMATIC_MODE
@ SBG_ECOM_AUTOMATIC_MODE
Definition: sbgEComCmdCommon.h:37
SBG_ECOM_ALIGNMENT_RIGHT
@ SBG_ECOM_ALIGNMENT_RIGHT
Definition: sbgEComCmdCommon.h:49
SBG_ECOM_ALIGNMENT_BACKWARD
@ SBG_ECOM_ALIGNMENT_BACKWARD
Definition: sbgEComCmdCommon.h:47
SBG_ECOM_ALIGNMENT_LEFT
@ SBG_ECOM_ALIGNMENT_LEFT
Definition: sbgEComCmdCommon.h:48
SBG_ECOM_ALIGNMENT_FORWARD
@ SBG_ECOM_ALIGNMENT_FORWARD
Definition: sbgEComCmdCommon.h:46
sbgEComReceiveCmd
SbgErrorCode sbgEComReceiveCmd(SbgEComHandle *pHandle, uint8_t msgClass, uint8_t msg, void *pData, size_t *pSize, size_t maxSize, uint32_t timeOut)
Definition: sbgEComCmdCommon.c:174
sbgEComWaitForAck
SbgErrorCode sbgEComWaitForAck(SbgEComHandle *pHandle, uint8_t msgClass, uint8_t msg, uint32_t timeOut)
Definition: sbgEComCmdCommon.c:278
_SbgEComModelInfo::id
uint32_t id
Definition: sbgEComCmdCommon.h:60
sbgEComCmdGenericSetModelId
SbgErrorCode sbgEComCmdGenericSetModelId(SbgEComHandle *pHandle, uint8_t msgClass, uint8_t msg, uint32_t modelId)
Definition: sbgEComCmdCommon.c:380
SBG_ECOM_ALIGNMENT_UP
@ SBG_ECOM_ALIGNMENT_UP
Definition: sbgEComCmdCommon.h:50
sbgEComCmdGenericGetModelInfo
SbgErrorCode sbgEComCmdGenericGetModelInfo(SbgEComHandle *pHandle, uint8_t msgClass, uint8_t msg, SbgEComModelInfo *pModelInfo)
Definition: sbgEComCmdCommon.c:512
sbgEComReceiveAnyCmd
SbgErrorCode sbgEComReceiveAnyCmd(SbgEComHandle *pHandle, uint8_t *pMsgClass, uint8_t *pMsg, void *pData, size_t *pSize, size_t maxSize, uint32_t timeOut)
Definition: sbgEComCmdCommon.c:25
_SbgEComHandle
Definition: sbgECom.h:70
SbgEComModelInfo
struct _SbgEComModelInfo SbgEComModelInfo
SbgErrorCode
enum _SbgErrorCode SbgErrorCode
Header file that defines all error codes for SBG Systems libraries.
_SbgEComAxisDirection
_SbgEComAxisDirection
Definition: sbgEComCmdCommon.h:44
SbgEComAxisDirection
enum _SbgEComAxisDirection SbgEComAxisDirection
SbgEComRejectionMode
enum _SbgEComRejectionMode SbgEComRejectionMode
SBG_ECOM_NEVER_ACCEPT_MODE
@ SBG_ECOM_NEVER_ACCEPT_MODE
Definition: sbgEComCmdCommon.h:36
_SbgEComModelInfo::revision
uint32_t revision
Definition: sbgEComCmdCommon.h:61


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