Function declarations and field declarations for ota_cbor.c.  
More...
Go to the source code of this file.
 | 
| bool  | OTA_CBOR_Decode_GetStreamResponseMessage (const uint8_t *pMessageBuffer, size_t messageSize, int32_t *pFileId, int32_t *pBlockId, int32_t *pBlockSize, uint8_t **pPayload, size_t *pPayloadSize) | 
|   | Decode a Get Stream response message from AWS IoT OTA.  More...
  | 
|   | 
| bool  | OTA_CBOR_Encode_GetStreamRequestMessage (uint8_t *pMessageBuffer, size_t messageBufferSize, size_t *pEncodedMessageSize, const char *pClientToken, int32_t fileId, int32_t blockSize, int32_t blockOffset, uint8_t *pBlockBitmap, size_t blockBitmapSize, int32_t numOfBlocksRequested) | 
|   | Create an encoded Get Stream Request message for the AWS IoT OTA service. The service allows block count or block bitmap to be requested, but not both.  More...
  | 
|   | 
Function declarations and field declarations for ota_cbor.c. 
 
◆ OTA_CBOR_CLIENTTOKEN_KEY
      
        
          | #define OTA_CBOR_CLIENTTOKEN_KEY   "c" | 
        
      
 
Message field definitions, per the server specification. These are not part of the library interface but are included here for testability. Key for client id. 
 
 
◆ OTA_CBOR_FILEID_KEY
      
        
          | #define OTA_CBOR_FILEID_KEY   "f" | 
        
      
 
 
◆ OTA_CBOR_BLOCKSIZE_KEY
      
        
          | #define OTA_CBOR_BLOCKSIZE_KEY   "l" | 
        
      
 
 
◆ OTA_CBOR_BLOCKOFFSET_KEY
      
        
          | #define OTA_CBOR_BLOCKOFFSET_KEY   "o" | 
        
      
 
Key for file block offset. 
 
 
◆ OTA_CBOR_BLOCKBITMAP_KEY
      
        
          | #define OTA_CBOR_BLOCKBITMAP_KEY   "b" | 
        
      
 
 
◆ OTA_CBOR_STREAMDESCRIPTION_KEY
      
        
          | #define OTA_CBOR_STREAMDESCRIPTION_KEY   "d" | 
        
      
 
 
◆ OTA_CBOR_STREAMFILES_KEY
      
        
          | #define OTA_CBOR_STREAMFILES_KEY   "r" | 
        
      
 
 
◆ OTA_CBOR_FILESIZE_KEY
      
        
          | #define OTA_CBOR_FILESIZE_KEY   "z" | 
        
      
 
 
◆ OTA_CBOR_BLOCKID_KEY
      
        
          | #define OTA_CBOR_BLOCKID_KEY   "i" | 
        
      
 
 
◆ OTA_CBOR_BLOCKPAYLOAD_KEY
      
        
          | #define OTA_CBOR_BLOCKPAYLOAD_KEY   "p" | 
        
      
 
Key for payload of a block. 
 
 
◆ OTA_CBOR_NUMBEROFBLOCKS_KEY
      
        
          | #define OTA_CBOR_NUMBEROFBLOCKS_KEY   "n" | 
        
      
 
Key for number of blocks. 
 
 
◆ OTA_CBOR_Decode_GetStreamResponseMessage()
      
        
          | bool OTA_CBOR_Decode_GetStreamResponseMessage  | 
          ( | 
          const uint8_t *  | 
          pMessageBuffer,  | 
        
        
           | 
           | 
          size_t  | 
          messageSize,  | 
        
        
           | 
           | 
          int32_t *  | 
          pFileId,  | 
        
        
           | 
           | 
          int32_t *  | 
          pBlockId,  | 
        
        
           | 
           | 
          int32_t *  | 
          pBlockSize,  | 
        
        
           | 
           | 
          uint8_t **  | 
          pPayload,  | 
        
        
           | 
           | 
          size_t *  | 
          pPayloadSize  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Decode a Get Stream response message from AWS IoT OTA. 
- Parameters
 - 
  
    | [in] | pMessageBuffer | message to decode.  | 
    | [in] | messageSize | size of the message to decode.  | 
    | [out] | pFileId | Decoded file id value.  | 
    | [out] | pBlockId | Decoded block id value.  | 
    | [out] | pBlockSize | Decoded block size value.  | 
    | [out] | pPayload | Buffer for the decoded payload.  | 
    | [in,out] | pPayloadSize | maximum size of the buffer as in and actual payload size for the decoded payload as out. | 
  
   
- Returns
 - TRUE when success, otherwise FALSE. 
 
 
 
◆ OTA_CBOR_Encode_GetStreamRequestMessage()
      
        
          | bool OTA_CBOR_Encode_GetStreamRequestMessage  | 
          ( | 
          uint8_t *  | 
          pMessageBuffer,  | 
        
        
           | 
           | 
          size_t  | 
          messageBufferSize,  | 
        
        
           | 
           | 
          size_t *  | 
          pEncodedMessageSize,  | 
        
        
           | 
           | 
          const char *  | 
          pClientToken,  | 
        
        
           | 
           | 
          int32_t  | 
          fileId,  | 
        
        
           | 
           | 
          int32_t  | 
          blockSize,  | 
        
        
           | 
           | 
          int32_t  | 
          blockOffset,  | 
        
        
           | 
           | 
          uint8_t *  | 
          pBlockBitmap,  | 
        
        
           | 
           | 
          size_t  | 
          blockBitmapSize,  | 
        
        
           | 
           | 
          int32_t  | 
          numOfBlocksRequested  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Create an encoded Get Stream Request message for the AWS IoT OTA service. The service allows block count or block bitmap to be requested, but not both. 
- Parameters
 - 
  
    | [in,out] | pMessageBuffer | Buffer to store the encoded message.  | 
    | [in] | messageBufferSize | Size of the buffer to store the encoded message.  | 
    | [out] | pEncodedMessageSize | Size of the final encoded message.  | 
    | [in] | pClientToken | Client token in the encoded message.  | 
    | [in] | fileId | Value of file id in the encoded message.  | 
    | [in] | blockSize | Value of block size in the encoded message.  | 
    | [in] | blockOffset | Value of block offset in the encoded message.  | 
    | [in] | pBlockBitmap | bitmap in the encoded message.  | 
    | [in] | blockBitmapSize | Size of the provided bitmap buffer.  | 
    | [in] | numOfBlocksRequested | number of blocks to request in the encoded message. | 
  
   
- Returns
 - TRUE when success, otherwise FALSE.