Azure IoT middleware for FreeRTOS
Data Structures | Typedefs | Functions
azure_iot_message.h File Reference

Azure IoT FreeRTOS middleware message APIs and structs. More...

#include "azure_iot.h"
#include "azure_iot_result.h"
#include "azure/iot/az_iot_hub_client_properties.h"
#include "azure/core/_az_cfg_prefix.h"
#include "azure/core/_az_cfg_suffix.h"

Go to the source code of this file.

Data Structures

struct  AzureIoTMessageProperties
 The bag of properties associated with a message. More...
 

Typedefs

typedef struct AzureIoTMessageProperties AzureIoTMessageProperties_t
 The bag of properties associated with a message.
 

Functions

AzureIoTResult_t AzureIoTMessage_PropertiesInit (AzureIoTMessageProperties_t *pxMessageProperties, uint8_t *pucBuffer, uint32_t ulAlreadyWrittenLength, uint32_t ulBufferLength)
 Initialize the message properties. More...
 
AzureIoTResult_t AzureIoTMessage_PropertiesAppend (AzureIoTMessageProperties_t *pxMessageProperties, const uint8_t *pucName, uint32_t ulNameLength, const uint8_t *pucValue, uint32_t ulValueLength)
 Append a property name and value to a message. More...
 
AzureIoTResult_t AzureIoTMessage_PropertiesFind (AzureIoTMessageProperties_t *pxMessageProperties, const uint8_t *pucName, uint32_t ulNameLength, const uint8_t **ppucOutValue, uint32_t *pulOutValueLength)
 Find a property in the message property bag. More...
 

Detailed Description

Azure IoT FreeRTOS middleware message APIs and structs.

Note
You MUST NOT use any symbols (macros, functions, structures, enums, etc.) prefixed with an underscore ('_') directly in your application code. These symbols are part of Azure SDK's internal implementation; we do not document these symbols and they are subject to change in future versions of the SDK which would break your code.

Function Documentation

◆ AzureIoTMessage_PropertiesAppend()

AzureIoTResult_t AzureIoTMessage_PropertiesAppend ( AzureIoTMessageProperties_t pxMessageProperties,
const uint8_t *  pucName,
uint32_t  ulNameLength,
const uint8_t *  pucValue,
uint32_t  ulValueLength 
)

Append a property name and value to a message.

Note
The properties init API will not encode properties. In order to support the following characters, they must be percent-encoded (RFC3986) as follows:
  • / : %2F
  • % : %25
  • # : %23
  • & : %26 Only these characters would have to be encoded. If you would like to avoid the need to encode the names/values, avoid using these characters in names and values.
Parameters
[in]pxMessagePropertiesThe AzureIoTMessageProperties_t* to use for the operation.
[in]pucNameThe name of the property to append.
[in]ulNameLengthThe length of pucName.
[in]pucValueThe value of the property to append.
[in]ulValueLengthThe length of pucValue.
Returns
An AzureIoTResult_t with the result of the operation.

◆ AzureIoTMessage_PropertiesFind()

AzureIoTResult_t AzureIoTMessage_PropertiesFind ( AzureIoTMessageProperties_t pxMessageProperties,
const uint8_t *  pucName,
uint32_t  ulNameLength,
const uint8_t **  ppucOutValue,
uint32_t *  pulOutValueLength 
)

Find a property in the message property bag.

Parameters
[in]pxMessagePropertiesThe AzureIoTMessageProperties_t* to use for the operation.
[in]pucNameThe name of the property to find.
[in]ulNameLengthLength of the property name.
[out]ppucOutValueThe output pointer to the property value.
[out]pulOutValueLengthThe length of ppucOutValue.
Returns
An AzureIoTResult_t with the result of the operation.

◆ AzureIoTMessage_PropertiesInit()

AzureIoTResult_t AzureIoTMessage_PropertiesInit ( AzureIoTMessageProperties_t pxMessageProperties,
uint8_t *  pucBuffer,
uint32_t  ulAlreadyWrittenLength,
uint32_t  ulBufferLength 
)

Initialize the message properties.

Note
The properties init API will not encode properties. In order to support the following characters, they must be percent-encoded (RFC3986) as follows:
  • / : %2F
  • % : %25
  • # : %23
  • & : %26 Only these characters would have to be encoded. If you would like to avoid the need to encode the names/values, avoid using these characters in names and values.
Parameters
[out]pxMessagePropertiesThe AzureIoTMessageProperties_t* to use for the operation.
[out]pucBufferThe pointer to the buffer.
[in]ulAlreadyWrittenLengthThe length of the properties already written (if applicable).
[in]ulBufferLengthThe length of pucBuffer.
Returns
An AzureIoTResult_t with the result of the operation.