OTA_SERVICE_Transport_MsgRecv

C

uint32_t OTA_SERVICE_Transport_MsgRecv(void* handle, uint8_t* buf, uint32_t bufSize)

Summary

This function populate the data buffer with the requested amount of data.

Description

User receives data in this particular format:

%OTA_DATA,<sequence_num/hex8>,<length/hex16>,<payload>%

This format is used to transmit the image payload in fragmented hex values. By using the above syntax, user can extract the sequence number, the expected length of data in the payload, and the actual data. The purpose of this function is to extract and separate all the header-related information and populate the input buffer with the expected data.

Precondition

None.

Parameters

ParamDescription
handle

Transport handle

buf

Data Buffer pointer

bufSizePayload size

Returns

payloadSize : The size of the payload that was received.

Remarks

None.