Functions
sbgEComTransfer.c File Reference
#include "sbgEComTransfer.h"
#include "../sbgEComCmdCommon.h"
#include <streamBuffer/sbgStreamBuffer.h>
#include <splitBuffer/sbgSplitBuffer.h>
Include dependency graph for sbgEComTransfer.c:

Go to the source code of this file.

Functions

SbgErrorCode sbgEComTransferReceive (SbgEComHandle *pHandle, uint8 msgClass, uint8 msg, void *pBuffer, size_t *pActualSize, size_t bufferSize)
 
SbgErrorCode sbgEComTransferReceiveData (SbgEComHandle *pHandle, uint8 msgClass, uint8 msg, void *pBuffer, size_t offset, size_t packetSize)
 
SbgErrorCode sbgEComTransferReceiveEnd (SbgEComHandle *pHandle, uint8 msgClass, uint8 msg)
 
SbgErrorCode sbgEComTransferReceiveInit (SbgEComHandle *pHandle, uint8 msgClass, uint8 msg, size_t *pSize)
 
SbgErrorCode sbgEComTransferSend (SbgEComHandle *pHandle, uint8 msgClass, uint8 msg, const void *pBuffer, size_t size)
 
SbgErrorCode sbgEComTransferSendData (SbgEComHandle *pHandle, uint8 msgClass, uint8 msg, const void *pBuffer, size_t offset, size_t packetSize)
 
SbgErrorCode sbgEComTransferSendEnd (SbgEComHandle *pHandle, uint8 msgClass, uint8 msg)
 
SbgErrorCode sbgEComTransferSendInit (SbgEComHandle *pHandle, uint8 msgClass, uint8 msg, size_t size)
 

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 sbgEComTransferReceiveData ( SbgEComHandle pHandle,
uint8  msgClass,
uint8  msg,
void *  pBuffer,
size_t  offset,
size_t  packetSize 
)

Receive one packet of data on a initiated download transfer.

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 the packet.
[in]offsetThe offset from the start of the buffer.
[in]packetSizeThe size of the data asked to the device.
Returns
SBG_NO_ERROR if the packet was successfully received.

Definition at line 326 of file sbgEComTransfer.c.

SbgErrorCode sbgEComTransferReceiveEnd ( SbgEComHandle pHandle,
uint8  msgClass,
uint8  msg 
)

Function that ends a download sequence with a device.

Parameters
[in]pHandlePointer to a valid SbgEComHandle.
[in]msgClassOriginal protocol class asking for transfer.
[in]msgOriginal protocol message id asking for transfer.
Returns
SBG_NO_ERROR when the transfer ended successfully.

Definition at line 434 of file sbgEComTransfer.c.

SbgErrorCode sbgEComTransferReceiveInit ( SbgEComHandle pHandle,
uint8  msgClass,
uint8  msg,
size_t *  pSize 
)

Initiates a download sequences with a device.

Parameters
[in]pHandlePointer to a valid SbgEComHandle.
[in]msgClassOriginal protocol class asking for transfer.
[in]msgOriginal protocol message id asking for transfer.
[out]pSizeSize of the transfer initiated, returned from the device.
Returns
SBG_NO_ERROR when the transfer initiated successfully.

Definition at line 213 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.

SbgErrorCode sbgEComTransferSendData ( SbgEComHandle pHandle,
uint8  msgClass,
uint8  msg,
const void *  pBuffer,
size_t  offset,
size_t  packetSize 
)

Send one packet of data on a initiated upload transfer.

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]offsetThe offset from the start of the transfer.
[in]packetSizeThe size of this packet.
Returns
SBG_NO_ERROR if the packet was sent and acknowledged by the device.

Definition at line 84 of file sbgEComTransfer.c.

SbgErrorCode sbgEComTransferSendEnd ( SbgEComHandle pHandle,
uint8  msgClass,
uint8  msg 
)

Ends ongoing upload transfer sequence with a device.

Parameters
[in]pHandlePointer to a valid SbgEComHandle.
[in]msgClassOriginal protocol class asking for transfer.
[in]msgOriginal protocol message id asking for transfer.
Returns
SBG_NO_ERROR when the transfer ended successfully.

Definition at line 150 of file sbgEComTransfer.c.

SbgErrorCode sbgEComTransferSendInit ( SbgEComHandle pHandle,
uint8  msgClass,
uint8  msg,
size_t  size 
)

Initiates an upload transfer sequence with a device.

Parameters
[in]pHandlePointer to a valid SbgEComHandle.
[in]msgClassOriginal protocol class asking for transfer.
[in]msgOriginal protocol message id asking for transfer.
[in]sizeTotal size of the upload.
Returns
SBG_NO_ERROR when the transfer was initiated successfully.

Definition at line 18 of file sbgEComTransfer.c.



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