Contains main sbgECom methods. More...
#include <sbgCommon.h>
#include "sbgEComIds.h"
#include "protocol/sbgEComProtocol.h"
#include "binaryLogs/sbgEComBinaryLogs.h"
Go to the source code of this file.
Classes | |
struct | _SbgEComHandle |
Typedefs | |
typedef struct _SbgEComHandle | SbgEComHandle |
typedef SbgErrorCode(* | SbgEComReceiveLogFunc) (SbgEComHandle *pHandle, SbgEComClass msgClass, SbgEComMsgId msg, const SbgBinaryLogData *pLogData, void *pUserArg) |
Functions | |
SbgErrorCode | sbgEComClose (SbgEComHandle *pHandle) |
void | sbgEComErrorToString (SbgErrorCode errorCode, char errorMsg[256]) |
SbgErrorCode | sbgEComHandle (SbgEComHandle *pHandle) |
SbgErrorCode | sbgEComHandleOneLog (SbgEComHandle *pHandle) |
SbgErrorCode | sbgEComInit (SbgEComHandle *pHandle, SbgInterface *pInterface) |
void | sbgEComSetCmdTrialsAndTimeOut (SbgEComHandle *pHandle, uint32_t numTrials, uint32_t cmdDefaultTimeOut) |
SbgErrorCode | sbgEComSetReceiveLogCallback (SbgEComHandle *pHandle, SbgEComReceiveLogFunc pReceiveLogCallback, void *pUserArg) |
Contains main sbgECom methods.
Copyright (C) 2007-2013, SBG Systems SAS. All rights reserved.
This source code is intended for use only by SBG Systems SAS and those that have explicit written permission to use it from SBG Systems SAS.
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
Definition in file sbgECom.h.
typedef struct _SbgEComHandle SbgEComHandle |
typedef SbgErrorCode(* SbgEComReceiveLogFunc) (SbgEComHandle *pHandle, SbgEComClass msgClass, SbgEComMsgId msg, const SbgBinaryLogData *pLogData, void *pUserArg) |
Callback definition called each time a new log is received.
[in] | pHandle | Valid handle on the sbgECom instance that has called this callback. |
[in] | msgClass | Class of the message we have received |
[in] | msg | Message ID of the log received. |
[in] | pLogData | Contains the received log data as an union. |
[in] | pUserArg | Optional user supplied argument. |
SbgErrorCode sbgEComClose | ( | SbgEComHandle * | pHandle | ) |
void sbgEComErrorToString | ( | SbgErrorCode | errorCode, |
char | errorMsg[256] | ||
) |
SbgErrorCode sbgEComHandle | ( | SbgEComHandle * | pHandle | ) |
SbgErrorCode sbgEComHandleOneLog | ( | SbgEComHandle * | pHandle | ) |
SbgErrorCode sbgEComInit | ( | SbgEComHandle * | pHandle, |
SbgInterface * | pInterface | ||
) |
Initialize the protocol system used to communicate with the product and return the created handle.
[out] | pHandle | Pointer used to store the allocated and initialized sbgECom handle. |
[in] | pInterface | Interface to use for read/write operations. |
Initialize the protocol system used to communicate with the product and return the created handle.
[out] | pHandle | Pointer used to store the allocated and initialized sbgECom handle. |
[in] | pInterface | Interface to use for read/write operations. |
void sbgEComSetCmdTrialsAndTimeOut | ( | SbgEComHandle * | pHandle, |
uint32_t | numTrials, | ||
uint32_t | cmdDefaultTimeOut | ||
) |
Define the default number of trials that should be done when a command is send to the device as well as the time out.
[in] | pHandle | A valid sbgECom handle. [in] numTrials Number of trials when a command is sent (starting at 1). |
[in] | cmdDefaultTimeOut | Default time out in milliseconds to wait to receive an answer from the device. |
SbgErrorCode sbgEComSetReceiveLogCallback | ( | SbgEComHandle * | pHandle, |
SbgEComReceiveLogFunc | pReceiveLogCallback, | ||
void * | pUserArg | ||
) |
Define the callback that should be called each time a new binary log is received.
[in] | pHandle | A valid sbgECom handle. |
[in] | pReceiveLogCallback | Pointer on the callback to call when a new log is received. |
[in] | pUserArg | Optional user argument that will be passed to the callback method. |