Macros | Typedefs | Enumerations | Functions
sbgEComTransfer.h File Reference

Handle large send/receive transfer for specific ECom Protocol commands. More...

#include <sbgCommon.h>
#include "../../sbgECom.h"
Include dependency graph for sbgEComTransfer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SBG_ECOM_TRANSFER_MAX_SIZE   (8192u)
 
#define SBG_ECOM_TRANSFER_PACKET_SIZE   (1300u)
 

Typedefs

typedef enum _SbgEComTransferCmd SbgEComTransferCmd
 

Enumerations

enum  _SbgEComTransferCmd { SBG_ECOM_TRANSFER_START = 0, SBG_ECOM_TRANSFER_DATA = 1, SBG_ECOM_TRANSFER_END = 2 }
 

Functions

SbgErrorCode sbgEComTransferReceive (SbgEComHandle *pHandle, uint8 msgClass, uint8 msg, void *pBuffer, size_t *pActualSize, size_t bufferSize)
 
SbgErrorCode sbgEComTransferSend (SbgEComHandle *pHandle, uint8 msgClass, uint8 msg, const void *pBuffer, size_t size)
 

Detailed Description

Handle large send/receive transfer for specific ECom Protocol commands.

Author
SBG Systems (Maxime Renaudet)
Date
19 November 2013

Copyright Notice

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 sbgEComTransfer.h.

Macro Definition Documentation

#define SBG_ECOM_TRANSFER_MAX_SIZE   (8192u)

Maximum buffer that can be transmitted using the sbgECom transfer protocol.

Definition at line 31 of file sbgEComTransfer.h.

#define SBG_ECOM_TRANSFER_PACKET_SIZE   (1300u)

Max packet size transmitted in a single frame

Definition at line 32 of file sbgEComTransfer.h.

Typedef Documentation

Defines the ECom transfer commands

Enumeration Type Documentation

Defines the ECom transfer commands

Enumerator
SBG_ECOM_TRANSFER_START 

Command to initiate a transfer.

SBG_ECOM_TRANSFER_DATA 

Command to transmit/receive data.

SBG_ECOM_TRANSFER_END 

Command to end a transfer.

Definition at line 41 of file sbgEComTransfer.h.

Function Documentation

SbgErrorCode sbgEComTransferReceive ( SbgEComHandle pHandle,
uint8  msgClass,
uint8  msg,
void *  pBuffer,
size_t *  pActualSize,
size_t  bufferSize 
)

Specific method to handle a large receive from the device.

Parameters
[in]pHandlePointer to a valid SbgEComHandle.
[in]msgClassOriginal protocol class asking for transfer.
[in]msgOriginal protocol message id asking for transfer.
[in]pBufferPointer to the buffer where to write data.
[out]pActualSizeThe final size written into the buffer.
[in]sizeThe size of the buffer.
Returns
SBG_NO_ERROR in case of a successful download.

Definition at line 590 of file sbgEComTransfer.c.

SbgErrorCode sbgEComTransferSend ( SbgEComHandle pHandle,
uint8  msgClass,
uint8  msg,
const void *  pBuffer,
size_t  size 
)

Specific method to handle a large send into multiple frames.

Parameters
[in]pHandlePointer to a valid SbgEComHandle.
[in]msgClassOriginal protocol class asking for transfer.
[in]msgOriginal protocol message id asking for transfer.
[in]pBufferPointer to the buffer containing the data to send.
[in]sizeThe size of the buffer.
Returns
SBG_NO_ERROR in case of a successful upload.

Definition at line 502 of file sbgEComTransfer.c.



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