|
AWS IoT Device SDK C:
MQTT
MQTT 3.1.1 client library
|
| Return to main page ↑ |
Implements functions that validate the structs of the MQTT library. More...
Functions | |
| static bool | _validatePublish (bool awsIotMqttMode, size_t maximumPayloadLength, const char *pPublishTypeDescription, const IotMqttPublishInfo_t *pPublishInfo) |
| Check that an IotMqttPublishInfo_t is valid. More... | |
| static bool | _validatePublishPayload (const IotMqttPublishInfo_t *pPublishInfo, size_t maximumPayloadLength, const char *pPublishTypeDescription) |
| Check that the payload inside IotMqttPublishInfo_t is valid. More... | |
| static bool | _validateQos (IotMqttQos_t qos) |
| Check that an IotMqttQos_t is valid. More... | |
| static bool | _validateString (const char *pString, uint16_t length) |
| Check that a string is valid. More... | |
| static bool | _validateListSize (bool awsIotMqttMode, const IotMqttSubscription_t *pListStart, size_t listSize) |
| Check that a list of subscriptions is valid. More... | |
| static bool | _validateSubscription (bool awsIotMqttMode, IotMqttOperationType_t operation, const IotMqttSubscription_t *pSubscription) |
| Check that a single subscription is valid. More... | |
| static bool | _validateWildcardPlus (uint16_t index, const IotMqttSubscription_t *pSubscription) |
Check that the MQTT + wildcard is being used correctly. More... | |
| static bool | _validateWildcardHash (uint16_t index, const IotMqttSubscription_t *pSubscription) |
Check that the MQTT # wildcard is being used correctly. More... | |
| static bool | _validateClientId (const IotMqttConnectInfo_t *pConnectInfo) |
| Validate the MQTT client identifier. More... | |
| bool | _IotMqtt_ValidateConnect (const IotMqttConnectInfo_t *pConnectInfo) |
| Check that an IotMqttConnectInfo_t is valid. More... | |
| bool | _IotMqtt_ValidatePublish (bool awsIotMqttMode, const IotMqttPublishInfo_t *pPublishInfo, uint32_t flags, const IotMqttCallbackInfo_t *pCallbackInfo, const IotMqttOperation_t *const pPublishOperation) |
| Check that parameters for an MQTT PUBLISH are valid. More... | |
| bool | _IotMqtt_ValidateLwtPublish (bool awsIotMqttMode, const IotMqttPublishInfo_t *pLwtPublishInfo) |
| Check that an IotMqttPublishInfo_t is valid for an LWT publish. More... | |
| bool | _IotMqtt_ValidateOperation (IotMqttOperation_t operation) |
| Check that an IotMqttOperation_t is valid and waitable. More... | |
| bool | _IotMqtt_ValidateSubscriptionList (IotMqttOperationType_t operation, bool awsIotMqttMode, const IotMqttSubscription_t *pListStart, size_t listSize) |
| Check that a list of IotMqttSubscription_t is valid. More... | |
Implements functions that validate the structs of the MQTT library.
|
static |
Check that an IotMqttPublishInfo_t is valid.
| [in] | awsIotMqttMode | Specifies if this PUBLISH packet is being sent to an AWS IoT MQTT server. |
| [in] | maximumPayloadLength | Maximum payload length. |
| [in] | pPublishTypeDescription | String describing the publish type. |
| [in] | pPublishInfo | The IotMqttPublishInfo_t to validate. |
true if pPublishInfo is valid; false otherwise.
|
static |
Check that the payload inside IotMqttPublishInfo_t is valid.
| [in] | pPublishInfo | The IotMqttPublishInfo_t to validate. |
| [in] | maximumPayloadLength | Maximum payload length. |
| [in] | pPublishTypeDescription | String describing the publish type. |
true if payload is valid; false otherwise
|
static |
Check that an IotMqttQos_t is valid.
| [in] | qos | The QoS to check. |
true if qos is valid; false otherwise.
|
static |
Check that a string is valid.
| [in] | pString | The string to check. |
| [in] | length | Length of string to check. |
true if pString is valid; false otherwise.
|
static |
Check that a list of subscriptions is valid.
| [in] | awsIotMqttMode | Whether to enforce list length restrictions from AWS IoT. |
| [in] | pListStart | First element of the list. |
| [in] | listSize | Length of the list. |
true if pListStart is valid; false otherwise.
|
static |
Check that a single subscription is valid.
| [in] | awsIotMqttMode | Whether to enforce the topic filter restrictions from AWS IoT. |
| [in] | operation | Either IOT_MQTT_SUBSCRIBE or IOT_MQTT_UNSUBSCRIBE. |
| [in] | pSubscription | The subscription to check. |
true if pSubscription is valid; false otherwise.
|
static |
Check that the MQTT + wildcard is being used correctly.
| [in] | index | Index of + in the topic filter. |
| [in] | pSubscription | Subscription with the topic filter to check. |
true if the + wildcard is valid; false otherwise.
|
static |
Check that the MQTT # wildcard is being used correctly.
| [in] | index | Index of # in the topic filter. |
| [in] | pSubscription | Subscription with the topic filter to check. |
true if the # wildcard is valid; false otherwise.
|
static |
Validate the MQTT client identifier.
| [in] | pConnectInfo | The IotMqttConnectInfo_t containing the client identifier to validate. |
true if client identifier is valid, false otherwise. | bool _IotMqtt_ValidateConnect | ( | const IotMqttConnectInfo_t * | pConnectInfo | ) |
Check that an IotMqttConnectInfo_t is valid.
| [in] | pConnectInfo | The IotMqttConnectInfo_t to validate. |
true if pConnectInfo is valid; false otherwise. | bool _IotMqtt_ValidatePublish | ( | bool | awsIotMqttMode, |
| const IotMqttPublishInfo_t * | pPublishInfo, | ||
| uint32_t | flags, | ||
| const IotMqttCallbackInfo_t * | pCallbackInfo, | ||
| const IotMqttOperation_t *const | pPublishOperation | ||
| ) |
Check that parameters for an MQTT PUBLISH are valid.
| [in] | awsIotMqttMode | Specifies if this PUBLISH packet is being sent to an AWS IoT MQTT server. |
| [in] | pPublishInfo | The IotMqttPublishInfo_t to validate. |
| [in] | flags | Behavior modification flags to validate. See MQTT Function Flags. |
| [in] | pCallbackInfo | IotMqttCallbackInfo_t to validate. |
| [in] | pPublishOperation | Handle to a PUBLISH operation. |
true if all parameters are valid; false otherwise. | bool _IotMqtt_ValidateLwtPublish | ( | bool | awsIotMqttMode, |
| const IotMqttPublishInfo_t * | pLwtPublishInfo | ||
| ) |
Check that an IotMqttPublishInfo_t is valid for an LWT publish.
| [in] | awsIotMqttMode | Specifies if this PUBLISH packet is being sent to an AWS IoT MQTT server. |
| [in] | pLwtPublishInfo | The IotMqttPublishInfo_t to validate. |
true if pLwtPublishInfo is valid; false otherwise. | bool _IotMqtt_ValidateOperation | ( | IotMqttOperation_t | operation | ) |
Check that an IotMqttOperation_t is valid and waitable.
| [in] | operation | The IotMqttOperation_t to validate. |
true if operation is valid; false otherwise. | bool _IotMqtt_ValidateSubscriptionList | ( | IotMqttOperationType_t | operation, |
| bool | awsIotMqttMode, | ||
| const IotMqttSubscription_t * | pListStart, | ||
| size_t | listSize | ||
| ) |
Check that a list of IotMqttSubscription_t is valid.
| [in] | operation | Either IOT_MQTT_SUBSCRIBE or IOT_MQTT_UNSUBSCRIBE. Some parameters are not validated for IOT_MQTT_UNSUBSCRIBE. |
| [in] | awsIotMqttMode | Specifies if this SUBSCRIBE packet is being sent to an AWS IoT MQTT server. |
| [in] | pListStart | First element of the list to validate. |
| [in] | listSize | Number of elements in the subscription list. |
true if every element in the list is valid; false otherwise.