FreeRTOS:
BLE
BLE
|
Return to main page ↑ |
File exposes types and serializer, deserializer APIs for sending and receiving MQTT messages over BLE using a companion mobile device (iOS/Android) SDK. More...
Go to the source code of this file.
Data Structures | |
struct | MQTTBLESubscribeInfo_t |
struct | MQTTBLEConnectInfo_t |
struct | MQTTBLEPublishInfo_t |
Functions | |
MQTTBLEStatus_t | IotBleMqtt_SerializeConnect (const MQTTBLEConnectInfo_t *const pConnectInfo, uint8_t **const pConnectPacket, size_t *const pPacketSize) |
Serialize the MQTT CONNECT message sent over BLE connection. More... | |
MQTTBLEStatus_t | IotBleMqtt_DeserializeConnack (const uint8_t *pBuffer, size_t length) |
Deserialize MQTT CONNACK message received over BLE connection. More... | |
MQTTBLEStatus_t | IotBleMqtt_SerializePublish (const MQTTBLEPublishInfo_t *const pPublishInfo, uint8_t **const pPublishPacket, size_t *const pPacketSize, uint16_t packetIdentifier) |
Serialize MQTT PUBLISH message sent over BLE connection. More... | |
void | IotBleMqtt_PublishSetDup (uint8_t *const pPublishPacket, uint8_t *pPacketIdentifierHigh, uint16_t *const pNewPacketIdentifier) |
Set the DUP flag to indicate its a duplicate QoS1/QoS2 message. More... | |
MQTTBLEStatus_t | IotBleMqtt_DeserializePublish (uint8_t *pBuffer, size_t length, MQTTBLEPublishInfo_t *publishInfo, uint16_t *packetIdentifier) |
Deserialize MQTT PUBLISH message received over BLE connection. More... | |
MQTTBLEStatus_t | IotBleMqtt_SerializePuback (uint16_t packetIdentifier, uint8_t **const pPubackPacket, size_t *const pPacketSize) |
Serialize MQTT PUBACK message sent over BLE connection. More... | |
MQTTBLEStatus_t | IotBleMqtt_DeserializePuback (uint8_t *pBuffer, size_t length, uint16_t *packetIdentifier) |
Deserialize MQTT PUBACK message received from a BLE connection. More... | |
MQTTBLEStatus_t | IotBleMqtt_SerializeSubscribe (const MQTTBLESubscribeInfo_t *const pSubscriptionList, size_t subscriptionCount, uint8_t **const pSubscribePacket, size_t *const pPacketSize, uint16_t *const pPacketIdentifier) |
Serialize MQTT SUBSCRIBE message sent over BLE connection. More... | |
MQTTBLEStatus_t | IotBleMqtt_DeserializeSuback (const uint8_t *pBuffer, size_t length, uint16_t *packetIdentifier, uint8_t *pStatusCode) |
Deserialize MQTT SUBACK message received over BLE connection. More... | |
MQTTBLEStatus_t | IotBleMqtt_SerializeUnsubscribe (const MQTTBLESubscribeInfo_t *const pSubscriptionList, size_t subscriptionCount, uint8_t **const pUnsubscribePacket, size_t *const pPacketSize, uint16_t *const pPacketIdentifier) |
Serialize MQTT UNSUBSCRIBE message sent over BLE connection. More... | |
MQTTBLEStatus_t | IotBleMqtt_DeserializeUnsuback (uint8_t *pBuffer, size_t length, uint16_t *packetIdentifier) |
Deserialize MQTT UNSUBACK message received over BLE connection. More... | |
MQTTBLEStatus_t | IotBleMqtt_SerializeDisconnect (uint8_t **const pDisconnectPacket, size_t *const pPacketSize) |
Serialize MQTT DISCONNECT message sent over BLE connection. More... | |
MQTTBLEStatus_t | IotBleMqtt_SerializePingreq (uint8_t **const pPingreqPacket, size_t *const pPacketSize) |
Serializes MQTT PING request message sent over BLE connection. More... | |
MQTTBLEStatus_t | IotBleMqtt_DeserializePingresp (const uint8_t *pBuffer, size_t length) |
Deserializes MQTT PINGRESP received over BLE connection. More... | |
uint8_t | IotBleMqtt_GetPacketType (const uint8_t *pBuffer, size_t length) |
Gets the packet type for the MQTT message. More... | |
void | IotBleMqtt_FreePacket (uint8_t *pPacket) |
Frees an MQTT message. More... | |
File exposes types and serializer, deserializer APIs for sending and receiving MQTT messages over BLE using a companion mobile device (iOS/Android) SDK.
enum MQTTBLEQoS_t |
enum MQTTBLEStatus_t |
MQTTBLEStatus_t IotBleMqtt_SerializeConnect | ( | const MQTTBLEConnectInfo_t *const | pConnectInfo, |
uint8_t **const | pConnectPacket, | ||
size_t *const | pPacketSize | ||
) |
Serialize the MQTT CONNECT message sent over BLE connection.
Serialize the CONNECT message parameters into a CBOR map to be sent over BLE connection.
[in] | pConnectInfo | MQTT CONNECT parameters. |
[in] | pWillInfo | Will Message parameters. |
[out] | pConnectPacket | The buffer containing the serialized data. |
[in] | pPacketSize | The Size of the serialized data. |
MQTTBLEStatus_t IotBleMqtt_DeserializeConnack | ( | const uint8_t * | pBuffer, |
size_t | length | ||
) |
Deserialize MQTT CONNACK message received over BLE connection.
Deserialize CONNACK parameters from a CBOR map received over BLE connection.
[in] | pBuffer | Pointer to start of the CONNACK message within a buffer. |
[in] | length | Length of buffer containing the CONNACK message. |
MQTTBLEStatus_t IotBleMqtt_SerializePublish | ( | const MQTTBLEPublishInfo_t *const | pPublishInfo, |
uint8_t **const | pPublishPacket, | ||
size_t *const | pPacketSize, | ||
uint16_t | packetIdentifier | ||
) |
Serialize MQTT PUBLISH message sent over BLE connection.
Serialize PUBLISH message parameters into a CBOR map to be sent over BLE connection.
[in] | pPublishInfo | Pointer to the structure containing PUBLISH message parameters. |
[out] | pPublishPacket | Pointer to the serialized PUBLISH message. |
[out] | pPacketSize | Length of the serialized PUBLISH message. |
[out] | pPacketIdentifier | Unique Identifier for the PUBLISH message. |
void IotBleMqtt_PublishSetDup | ( | uint8_t *const | pPublishPacket, |
uint8_t * | pPacketIdentifierHigh, | ||
uint16_t *const | pNewPacketIdentifier | ||
) |
Set the DUP flag to indicate its a duplicate QoS1/QoS2 message.
Sets the DUP flag in the serialized message to indicate its a duplicate QoS1/QoS2 message.
[in] | pPublishOperation | The operation containing the PUBLISH message. |
MQTTBLEStatus_t IotBleMqtt_DeserializePublish | ( | uint8_t * | pBuffer, |
size_t | length, | ||
MQTTBLEPublishInfo_t * | publishInfo, | ||
uint16_t * | packetIdentifier | ||
) |
Deserialize MQTT PUBLISH message received over BLE connection.
Deserializes the PUBLISH parameters from a CBOR map received over BLE connection.
[in] | pBuffer | Pointer to start of the PUBLISH message within a buffer. |
[in] | length | Length of buffer containing the PUBLISH message. |
[out] | pPublishInfo | Parameters parsed from PUBLISH message. |
[out] | pPacketIdentifier | Unique identifier for the PUBLISH message. |
MQTTBLEStatus_t IotBleMqtt_SerializePuback | ( | uint16_t | packetIdentifier, |
uint8_t **const | pPubackPacket, | ||
size_t *const | pPacketSize | ||
) |
Serialize MQTT PUBACK message sent over BLE connection.
Serializes the PUBACK parameters into a CBOR map to be sent over BLE connection.
[in] | packetIdentifier | Identifier to be included in the PUBACK message. |
[out] | pPubackPacket | Pointer to the start of the PUBACK message. |
[out] | pPacketSize | Length of the PUBACK message. |
MQTTBLEStatus_t IotBleMqtt_DeserializePuback | ( | uint8_t * | pBuffer, |
size_t | length, | ||
uint16_t * | packetIdentifier | ||
) |
Deserialize MQTT PUBACK message received from a BLE connection.
Deserializes the PUBACK parameters from a CBOR map received over BLE connection.
[in] | pBuffer | Pointer to start of the PUBACK message within a buffer. |
[in] | length | Length of buffer containing the PUBACK message. |
[out] | pPacketIdentifier | Unique identifier for the PUBACK message. |
MQTTBLEStatus_t IotBleMqtt_SerializeSubscribe | ( | const MQTTBLESubscribeInfo_t *const | pSubscriptionList, |
size_t | subscriptionCount, | ||
uint8_t **const | pSubscribePacket, | ||
size_t *const | pPacketSize, | ||
uint16_t *const | pPacketIdentifier | ||
) |
Serialize MQTT SUBSCRIBE message sent over BLE connection.
Serialize the SUBSCRIBE message parameters into a CBOR map to be sent over BLE connection.
[in] | pSubscriptionList | Pointer to a array of subscriptions. |
[out] | subscriptionCount | Number of subscriptions. |
[out] | pSubscribePacket | Pointer to the SUBSCRIBE message. |
[out] | pPacketSize | Length of the SUBSCRIBE message. |
[out] | pPacketIdentifier | Unique identifier for the SUBSCRIBE message. |
MQTTBLEStatus_t IotBleMqtt_DeserializeSuback | ( | const uint8_t * | pBuffer, |
size_t | length, | ||
uint16_t * | packetIdentifier, | ||
uint8_t * | pStatusCode | ||
) |
Deserialize MQTT SUBACK message received over BLE connection.
Deserializes MQTT SUBACK parameters from a CBOR map received over BLE connection.
[in] | pBuffer | Pointer to the start of suback packet. |
[in] | length | Length of the buffer containing suback packet |
[out] | pPacketIdentifier | Unique identifier for the SUBACK message. |
[out] | pStatusCode | Status code of the subscription. |
MQTTBLEStatus_t IotBleMqtt_SerializeUnsubscribe | ( | const MQTTBLESubscribeInfo_t *const | pSubscriptionList, |
size_t | subscriptionCount, | ||
uint8_t **const | pUnsubscribePacket, | ||
size_t *const | pPacketSize, | ||
uint16_t *const | pPacketIdentifier | ||
) |
Serialize MQTT UNSUBSCRIBE message sent over BLE connection.
Serialize the UNSUBSCRIBE message parameters into a CBOR map to be sent over BLE connection.
[in] | pSubscriptionList | Pointer to a array of subscriptions. |
[out] | subscriptionCount | Number of subscriptions. |
[out] | pUnsubscribePacket | Pointer to the UNSUBSCRIBE message. |
[out] | pPacketSize | Length of the UNSUBSCRIBE message. |
[out] | pPacketIdentifier | Unique identifier for the UNSUBSCRIBE message. |
MQTTBLEStatus_t IotBleMqtt_DeserializeUnsuback | ( | uint8_t * | pBuffer, |
size_t | length, | ||
uint16_t * | packetIdentifier | ||
) |
Deserialize MQTT UNSUBACK message received over BLE connection.
Deserializes the UNSUBACK parameters from a CBOR map received over BLE connection.
[in] | pBuffer | Start of the UNSUBACK message within a buffer. |
[in] | length | Length of the buffer containing UNSUBACK message |
[out] | pPacketIdentifier | Unique identifier for the UNSUBACK message. |
MQTTBLEStatus_t IotBleMqtt_SerializeDisconnect | ( | uint8_t **const | pDisconnectPacket, |
size_t *const | pPacketSize | ||
) |
Serialize MQTT DISCONNECT message sent over BLE connection.
Serialize the DISCONNECT message parameters into a CBOR map to be sent over BLE connection.
[out] | pDisconnectPacket | Pointer to the DISCONNECT message |
[out] | pPacketSize | Length of the DISCONNECT message. |
MQTTBLEStatus_t IotBleMqtt_SerializePingreq | ( | uint8_t **const | pPingreqPacket, |
size_t *const | pPacketSize | ||
) |
Serializes MQTT PING request message sent over BLE connection.
Serializes PING request message parameters into a cbor map to be sent over BLE connection.
[out] | pPingreqPacket | Pointer to the PING request packet |
[out] | pPacketSize | Size of the PING request packet |
MQTTBLEStatus_t IotBleMqtt_DeserializePingresp | ( | const uint8_t * | pBuffer, |
size_t | length | ||
) |
Deserializes MQTT PINGRESP received over BLE connection.
Deserializes PINGRESP parameters from a CBOR map received over BLE connection.
[in] | pBuffer | Pointer to start of buffer containing PING response |
[in] | length | Length of the buffer containing PING response |
uint8_t IotBleMqtt_GetPacketType | ( | const uint8_t * | pBuffer, |
size_t | length | ||
) |
Gets the packet type for the MQTT message.
Parses the CBOR message received and gets the packet type.
[in] | pBuffer | Buffer pointing to the serialized packet |
[in] | length | Length of the buffer containing the packet |
void IotBleMqtt_FreePacket | ( | uint8_t * | pPacket | ) |
Frees an MQTT message.
[in] | Pointer | to the message. |