Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
aws_iot_mqtt_client_unsubscribe.c File Reference
MQTT client unsubscribe API definitions. More...
Go to the source code of this file.
Functions | |
| static IoT_Error_t | _aws_iot_mqtt_serialize_unsubscribe (unsigned char *pTxBuf, size_t txBufLen, uint8_t dup, uint16_t packetId, uint32_t count, const char **pTopicNameList, uint16_t *pTopicNameLenList, uint32_t *pSerializedLen) |
| Serializes the supplied unsubscribe data into the supplied buffer, ready for sending. | |
| static IoT_Error_t | _aws_iot_mqtt_deserialize_unsuback (uint16_t *pPacketId, unsigned char *pRxBuf, size_t rxBufLen) |
| Deserializes the supplied (wire) buffer into unsuback data. | |
| static IoT_Error_t | _aws_iot_mqtt_internal_unsubscribe (AWS_IoT_Client *pClient, const char *pTopicFilter, uint16_t topicFilterLen) |
| Unsubscribe to an MQTT topic. | |
| IoT_Error_t | aws_iot_mqtt_unsubscribe (AWS_IoT_Client *pClient, const char *pTopicFilter, uint16_t topicFilterLen) |
| Unsubscribe to an MQTT topic. | |
Detailed Description
MQTT client unsubscribe API definitions.
Definition in file aws_iot_mqtt_client_unsubscribe.c.
Function Documentation
| static IoT_Error_t _aws_iot_mqtt_deserialize_unsuback | ( | uint16_t * | pPacketId, |
| unsigned char * | pRxBuf, | ||
| size_t | rxBufLen | ||
| ) | [static] |
Deserializes the supplied (wire) buffer into unsuback data.
- Parameters:
-
pPacketId returned integer - the MQTT packet identifier pRxBuf the raw buffer data, of the correct length determined by the remaining length field rxBufLen the length in bytes of the data in the supplied buffer
- Returns:
- IoT_Error_t indicating function execution status
Definition at line 103 of file aws_iot_mqtt_client_unsubscribe.c.
| static IoT_Error_t _aws_iot_mqtt_internal_unsubscribe | ( | AWS_IoT_Client * | pClient, |
| const char * | pTopicFilter, | ||
| uint16_t | topicFilterLen | ||
| ) | [static] |
Unsubscribe to an MQTT topic.
Called to send an unsubscribe message to the broker requesting removal of a subscription to an MQTT topic.
- Note:
- Call is blocking. The call returns after the receipt of the UNSUBACK control packet. This is the internal function which is called by the unsubscribe API to perform the operation. Not meant to be called directly as it doesn't do validations or client state changes
- Parameters:
-
pClient Reference to the IoT Client pTopicName Topic Name to publish to topicNameLen Length of the topic name
- Returns:
- An IoT Error Type defining successful/failed unsubscribe call
Definition at line 133 of file aws_iot_mqtt_client_unsubscribe.c.
| static IoT_Error_t _aws_iot_mqtt_serialize_unsubscribe | ( | unsigned char * | pTxBuf, |
| size_t | txBufLen, | ||
| uint8_t | dup, | ||
| uint16_t | packetId, | ||
| uint32_t | count, | ||
| const char ** | pTopicNameList, | ||
| uint16_t * | pTopicNameLenList, | ||
| uint32_t * | pSerializedLen | ||
| ) | [static] |
Serializes the supplied unsubscribe data into the supplied buffer, ready for sending.
- Parameters:
-
pTxBuf the raw buffer data, of the correct length determined by the remaining length field txBufLen the length in bytes of the data in the supplied buffer dup integer - the MQTT dup flag packetId integer - the MQTT packet identifier count - number of members in the topicFilters array pTopicNameList - array of topic filter names pTopicNameLenList - array of length of topic filter names in pTopicNameList pSerializedLen - the length of the serialized data
- Returns:
- IoT_Error_t indicating function execution status
Definition at line 56 of file aws_iot_mqtt_client_unsubscribe.c.
| IoT_Error_t aws_iot_mqtt_unsubscribe | ( | AWS_IoT_Client * | pClient, |
| const char * | pTopicFilter, | ||
| uint16_t | topicFilterLen | ||
| ) |
Unsubscribe to an MQTT topic.
Called to send an unsubscribe message to the broker requesting removal of a subscription to an MQTT topic.
- Note:
- Call is blocking. The call returns after the receipt of the UNSUBACK control packet. This is the outer function which does the validations and calls the internal unsubscribe above to perform the actual operation. It is also responsible for client state changes
- Parameters:
-
pClient Reference to the IoT Client pTopicName Topic Name to publish to topicNameLen Length of the topic name
- Returns:
- An IoT Error Type defining successful/failed unsubscribe call
Definition at line 214 of file aws_iot_mqtt_client_unsubscribe.c.
Generated on Tue Jul 12 2022 19:02:38 by
1.7.2