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(* | SbgEComReceiveFunc) (SbgEComHandle *pHandle, SbgEComCmdId logCmd, const SbgBinaryLogData *pLogData, void *pUserArg) |
typedef SbgErrorCode(* | SbgEComReceiveLogFunc) (SbgEComHandle *pHandle, SbgEComClass msgClass, SbgEComMsgId msg, const SbgBinaryLogData *pLogData, void *pUserArg) |
Functions | |
SBG_DEPRECATED (SbgErrorCode sbgEComSetReceiveCallback(SbgEComHandle *pHandle, SbgEComReceiveFunc pReceiveCallback, void *pUserArg)) | |
SbgErrorCode | sbgEComClose (SbgEComHandle *pHandle) |
void | sbgEComErrorToString (SbgErrorCode errorCode, char errorMsg[256]) |
uint32 | sbgEComGetVersion (void) |
const char * | sbgEComGetVersionAsString (void) |
SbgErrorCode | sbgEComHandle (SbgEComHandle *pHandle) |
SbgErrorCode | sbgEComHandleOneLog (SbgEComHandle *pHandle) |
SbgErrorCode | sbgEComInit (SbgEComHandle *pHandle, SbgInterface *pInterface) |
void | sbgEComSetCmdTrialsAndTimeOut (SbgEComHandle *pHandle, uint32 numTrials, uint32 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(* SbgEComReceiveFunc) (SbgEComHandle *pHandle, SbgEComCmdId logCmd, const SbgBinaryLogData *pLogData, void *pUserArg) |
DEPRECATED. Callback definition called each time a new log is received.
[in] | pHandle | Valid handle on the sbgECom instance that has called this callback. |
[in] | logCmd | Contains the binary received log command id (msg + class). |
[in] | pLogData | Contains the received log data as an union. |
[in] | pUserArg | Optional user supplied argument. |
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. |
SBG_DEPRECATED | ( | SbgErrorCode | sbgEComSetReceiveCallbackSbgEComHandle *pHandle, SbgEComReceiveFunc pReceiveCallback, void *pUserArg | ) |
DEPRECATED FUNCTION. Define the callback that should be called each time a new binary log is received. Please use sbgEComSetInputLogsCallback instead
[in] | pHandle | A valid sbgECom handle. |
[in] | pReceiveCallback | 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. |
SbgErrorCode sbgEComClose | ( | SbgEComHandle * | pHandle | ) |
void sbgEComErrorToString | ( | SbgErrorCode | errorCode, |
char | errorMsg[256] | ||
) |
uint32 sbgEComGetVersion | ( | void | ) |
Returns an integer representing the version of the sbgCom library.
const char* sbgEComGetVersionAsString | ( | void | ) |
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. |
void sbgEComSetCmdTrialsAndTimeOut | ( | SbgEComHandle * | pHandle, |
uint32 | numTrials, | ||
uint32 | 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. |