sbgECom
1.11.920-stable
|
Handle large send/receive transfer for specific ECom Protocol commands. More...
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 | sbgEComTransferSend (SbgEComHandle *pHandle, uint8_t msgClass, uint8_t msg, const void *pBuffer, size_t size) |
SbgErrorCode | sbgEComTransferReceive (SbgEComHandle *pHandle, uint8_t msgClass, uint8_t msg, void *pBuffer, size_t *pActualSize, size_t bufferSize) |
Handle large send/receive transfer for specific ECom Protocol commands.
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.
#define SBG_ECOM_TRANSFER_MAX_SIZE (8192u) |
Maximum buffer that can be transmitted using the sbgECom transfer protocol.
#define SBG_ECOM_TRANSFER_PACKET_SIZE (1300u) |
Max packet size transmitted in a single frame
typedef enum _SbgEComTransferCmd SbgEComTransferCmd |
Defines the ECom transfer commands
enum _SbgEComTransferCmd |
SbgErrorCode sbgEComTransferSend | ( | SbgEComHandle * | pHandle, |
uint8_t | msgClass, | ||
uint8_t | msg, | ||
const void * | pBuffer, | ||
size_t | size | ||
) |
Specific method to handle a large send into multiple frames.
[in] | pHandle | Pointer to a valid SbgEComHandle. |
[in] | msgClass | Original protocol class asking for transfer. |
[in] | msg | Original protocol message id asking for transfer. |
[in] | pBuffer | Pointer to the buffer containing the data to send. |
[in] | size | The size of the buffer. |
SbgErrorCode sbgEComTransferReceive | ( | SbgEComHandle * | pHandle, |
uint8_t | msgClass, | ||
uint8_t | msg, | ||
void * | pBuffer, | ||
size_t * | pActualSize, | ||
size_t | bufferSize | ||
) |
Specific method to handle a large receive from the device.
[in] | pHandle | Pointer to a valid SbgEComHandle. |
[in] | msgClass | Original protocol class asking for transfer. |
[in] | msg | Original protocol message id asking for transfer. |
[in] | pBuffer | Pointer to the buffer where to write data. |
[out] | pActualSize | The final size written into the buffer. |
[in] | size | The size of the buffer. |