|
AWS IoT Device SDK C++ v2
1.40.2
AWS IoT Device SDK C++ v2
|
#include <IotShadowClient.h>
The AWS IoT Device Shadow service adds shadows to AWS IoT thing objects. Shadows are a simple data store for device properties and state. Shadows can make a device’s state available to apps and other services whether the device is connected to AWS IoT or not.
https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html
| Aws::Iotshadow::IotShadowClient::IotShadowClient | ( | const std::shared_ptr< Aws::Crt::Mqtt::MqttConnection > & | connection | ) |
| Aws::Iotshadow::IotShadowClient::IotShadowClient | ( | const std::shared_ptr< Aws::Crt::Mqtt5::Mqtt5Client > & | mqtt5Client | ) |
|
noexcept |
|
noexcept |
| bool Aws::Iotshadow::IotShadowClient::PublishDeleteNamedShadow | ( | const Aws::Iotshadow::DeleteNamedShadowRequest & | request, |
| Aws::Crt::Mqtt::QOS | qos, | ||
| const OnPublishComplete & | onPubAck | ||
| ) |
Deletes a named shadow for an AWS IoT thing.
https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-pub-sub-topic
Publish a DeleteNamedShadow message. If the device is offline, the PUBLISH packet will be sent once the connection resumes.
| request | Message to be serialized and sent |
| qos | Quality of Service for delivering this message |
| onPubAck | callback when the publish "completes" (see below) |
| bool Aws::Iotshadow::IotShadowClient::PublishDeleteShadow | ( | const Aws::Iotshadow::DeleteShadowRequest & | request, |
| Aws::Crt::Mqtt::QOS | qos, | ||
| const OnPublishComplete & | onPubAck | ||
| ) |
Deletes the (classic) shadow for an AWS IoT thing.
https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-pub-sub-topic
Publish a DeleteShadow message. If the device is offline, the PUBLISH packet will be sent once the connection resumes.
| request | Message to be serialized and sent |
| qos | Quality of Service for delivering this message |
| onPubAck | callback when the publish "completes" (see below) |
| bool Aws::Iotshadow::IotShadowClient::PublishGetNamedShadow | ( | const Aws::Iotshadow::GetNamedShadowRequest & | request, |
| Aws::Crt::Mqtt::QOS | qos, | ||
| const OnPublishComplete & | onPubAck | ||
| ) |
Gets a named shadow for an AWS IoT thing.
https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-pub-sub-topic
Publish a GetNamedShadow message. If the device is offline, the PUBLISH packet will be sent once the connection resumes.
| request | Message to be serialized and sent |
| qos | Quality of Service for delivering this message |
| onPubAck | callback when the publish "completes" (see below) |
| bool Aws::Iotshadow::IotShadowClient::PublishGetShadow | ( | const Aws::Iotshadow::GetShadowRequest & | request, |
| Aws::Crt::Mqtt::QOS | qos, | ||
| const OnPublishComplete & | onPubAck | ||
| ) |
Gets the (classic) shadow for an AWS IoT thing.
https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-pub-sub-topic
Publish a GetShadow message. If the device is offline, the PUBLISH packet will be sent once the connection resumes.
| request | Message to be serialized and sent |
| qos | Quality of Service for delivering this message |
| onPubAck | callback when the publish "completes" (see below) |
| bool Aws::Iotshadow::IotShadowClient::PublishUpdateNamedShadow | ( | const Aws::Iotshadow::UpdateNamedShadowRequest & | request, |
| Aws::Crt::Mqtt::QOS | qos, | ||
| const OnPublishComplete & | onPubAck | ||
| ) |
Update a named shadow for a device.
https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-pub-sub-topic
Publish a UpdateNamedShadow message. If the device is offline, the PUBLISH packet will be sent once the connection resumes.
| request | Message to be serialized and sent |
| qos | Quality of Service for delivering this message |
| onPubAck | callback when the publish "completes" (see below) |
| bool Aws::Iotshadow::IotShadowClient::PublishUpdateShadow | ( | const Aws::Iotshadow::UpdateShadowRequest & | request, |
| Aws::Crt::Mqtt::QOS | qos, | ||
| const OnPublishComplete & | onPubAck | ||
| ) |
Update a device's (classic) shadow.
https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-pub-sub-topic
Publish a UpdateShadow message. If the device is offline, the PUBLISH packet will be sent once the connection resumes.
| request | Message to be serialized and sent |
| qos | Quality of Service for delivering this message |
| onPubAck | callback when the publish "completes" (see below) |
| bool Aws::Iotshadow::IotShadowClient::SubscribeToDeleteNamedShadowAccepted | ( | const Aws::Iotshadow::DeleteNamedShadowSubscriptionRequest & | request, |
| Aws::Crt::Mqtt::QOS | qos, | ||
| const OnSubscribeToDeleteNamedShadowAcceptedResponse & | handler, | ||
| const OnSubscribeComplete & | onSubAck | ||
| ) |
Subscribes to the accepted topic for the DeleteNamedShadow operation.
Subscribe to DeleteNamedShadowAccepted messages
Once subscribed, handler is invoked each time a message matching the topic is received. It is possible for such messages to arrive before the SUBACK is received.
| request | Subscription request configuration |
| qos | Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK |
| handler | callback function to invoke with messages received on the subscription topic |
| onSubAck | callback function invoked on receipt of the SUBACK from the server |
| bool Aws::Iotshadow::IotShadowClient::SubscribeToDeleteNamedShadowRejected | ( | const Aws::Iotshadow::DeleteNamedShadowSubscriptionRequest & | request, |
| Aws::Crt::Mqtt::QOS | qos, | ||
| const OnSubscribeToDeleteNamedShadowRejectedResponse & | handler, | ||
| const OnSubscribeComplete & | onSubAck | ||
| ) |
Subscribes to the rejected topic for the DeleteNamedShadow operation.
Subscribe to DeleteNamedShadowRejected messages
Once subscribed, handler is invoked each time a message matching the topic is received. It is possible for such messages to arrive before the SUBACK is received.
| request | Subscription request configuration |
| qos | Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK |
| handler | callback function to invoke with messages received on the subscription topic |
| onSubAck | callback function invoked on receipt of the SUBACK from the server |
| bool Aws::Iotshadow::IotShadowClient::SubscribeToDeleteShadowAccepted | ( | const Aws::Iotshadow::DeleteShadowSubscriptionRequest & | request, |
| Aws::Crt::Mqtt::QOS | qos, | ||
| const OnSubscribeToDeleteShadowAcceptedResponse & | handler, | ||
| const OnSubscribeComplete & | onSubAck | ||
| ) |
Subscribes to the accepted topic for the DeleteShadow operation
Subscribe to DeleteShadowAccepted messages
Once subscribed, handler is invoked each time a message matching the topic is received. It is possible for such messages to arrive before the SUBACK is received.
| request | Subscription request configuration |
| qos | Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK |
| handler | callback function to invoke with messages received on the subscription topic |
| onSubAck | callback function invoked on receipt of the SUBACK from the server |
| bool Aws::Iotshadow::IotShadowClient::SubscribeToDeleteShadowRejected | ( | const Aws::Iotshadow::DeleteShadowSubscriptionRequest & | request, |
| Aws::Crt::Mqtt::QOS | qos, | ||
| const OnSubscribeToDeleteShadowRejectedResponse & | handler, | ||
| const OnSubscribeComplete & | onSubAck | ||
| ) |
Subscribes to the rejected topic for the DeleteShadow operation
Subscribe to DeleteShadowRejected messages
Once subscribed, handler is invoked each time a message matching the topic is received. It is possible for such messages to arrive before the SUBACK is received.
| request | Subscription request configuration |
| qos | Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK |
| handler | callback function to invoke with messages received on the subscription topic |
| onSubAck | callback function invoked on receipt of the SUBACK from the server |
| bool Aws::Iotshadow::IotShadowClient::SubscribeToGetNamedShadowAccepted | ( | const Aws::Iotshadow::GetNamedShadowSubscriptionRequest & | request, |
| Aws::Crt::Mqtt::QOS | qos, | ||
| const OnSubscribeToGetNamedShadowAcceptedResponse & | handler, | ||
| const OnSubscribeComplete & | onSubAck | ||
| ) |
Subscribes to the accepted topic for the GetNamedShadow operation.
Subscribe to GetNamedShadowAccepted messages
Once subscribed, handler is invoked each time a message matching the topic is received. It is possible for such messages to arrive before the SUBACK is received.
| request | Subscription request configuration |
| qos | Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK |
| handler | callback function to invoke with messages received on the subscription topic |
| onSubAck | callback function invoked on receipt of the SUBACK from the server |
| bool Aws::Iotshadow::IotShadowClient::SubscribeToGetNamedShadowRejected | ( | const Aws::Iotshadow::GetNamedShadowSubscriptionRequest & | request, |
| Aws::Crt::Mqtt::QOS | qos, | ||
| const OnSubscribeToGetNamedShadowRejectedResponse & | handler, | ||
| const OnSubscribeComplete & | onSubAck | ||
| ) |
Subscribes to the rejected topic for the GetNamedShadow operation.
Subscribe to GetNamedShadowRejected messages
Once subscribed, handler is invoked each time a message matching the topic is received. It is possible for such messages to arrive before the SUBACK is received.
| request | Subscription request configuration |
| qos | Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK |
| handler | callback function to invoke with messages received on the subscription topic |
| onSubAck | callback function invoked on receipt of the SUBACK from the server |
| bool Aws::Iotshadow::IotShadowClient::SubscribeToGetShadowAccepted | ( | const Aws::Iotshadow::GetShadowSubscriptionRequest & | request, |
| Aws::Crt::Mqtt::QOS | qos, | ||
| const OnSubscribeToGetShadowAcceptedResponse & | handler, | ||
| const OnSubscribeComplete & | onSubAck | ||
| ) |
Subscribes to the accepted topic for the GetShadow operation.
Subscribe to GetShadowAccepted messages
Once subscribed, handler is invoked each time a message matching the topic is received. It is possible for such messages to arrive before the SUBACK is received.
| request | Subscription request configuration |
| qos | Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK |
| handler | callback function to invoke with messages received on the subscription topic |
| onSubAck | callback function invoked on receipt of the SUBACK from the server |
| bool Aws::Iotshadow::IotShadowClient::SubscribeToGetShadowRejected | ( | const Aws::Iotshadow::GetShadowSubscriptionRequest & | request, |
| Aws::Crt::Mqtt::QOS | qos, | ||
| const OnSubscribeToGetShadowRejectedResponse & | handler, | ||
| const OnSubscribeComplete & | onSubAck | ||
| ) |
Subscribes to the rejected topic for the GetShadow operation.
Subscribe to GetShadowRejected messages
Once subscribed, handler is invoked each time a message matching the topic is received. It is possible for such messages to arrive before the SUBACK is received.
| request | Subscription request configuration |
| qos | Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK |
| handler | callback function to invoke with messages received on the subscription topic |
| onSubAck | callback function invoked on receipt of the SUBACK from the server |
| bool Aws::Iotshadow::IotShadowClient::SubscribeToNamedShadowDeltaUpdatedEvents | ( | const Aws::Iotshadow::NamedShadowDeltaUpdatedSubscriptionRequest & | request, |
| Aws::Crt::Mqtt::QOS | qos, | ||
| const OnSubscribeToNamedShadowDeltaUpdatedEventsResponse & | handler, | ||
| const OnSubscribeComplete & | onSubAck | ||
| ) |
Subscribe to NamedShadowDelta events for a named shadow of an AWS IoT thing.
Subscribe to NamedShadowDeltaUpdatedEvents messages
Once subscribed, handler is invoked each time a message matching the topic is received. It is possible for such messages to arrive before the SUBACK is received.
| request | Subscription request configuration |
| qos | Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK |
| handler | callback function to invoke with messages received on the subscription topic |
| onSubAck | callback function invoked on receipt of the SUBACK from the server |
| bool Aws::Iotshadow::IotShadowClient::SubscribeToNamedShadowUpdatedEvents | ( | const Aws::Iotshadow::NamedShadowUpdatedSubscriptionRequest & | request, |
| Aws::Crt::Mqtt::QOS | qos, | ||
| const OnSubscribeToNamedShadowUpdatedEventsResponse & | handler, | ||
| const OnSubscribeComplete & | onSubAck | ||
| ) |
Subscribe to ShadowUpdated events for a named shadow of an AWS IoT thing.
Subscribe to NamedShadowUpdatedEvents messages
Once subscribed, handler is invoked each time a message matching the topic is received. It is possible for such messages to arrive before the SUBACK is received.
| request | Subscription request configuration |
| qos | Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK |
| handler | callback function to invoke with messages received on the subscription topic |
| onSubAck | callback function invoked on receipt of the SUBACK from the server |
| bool Aws::Iotshadow::IotShadowClient::SubscribeToShadowDeltaUpdatedEvents | ( | const Aws::Iotshadow::ShadowDeltaUpdatedSubscriptionRequest & | request, |
| Aws::Crt::Mqtt::QOS | qos, | ||
| const OnSubscribeToShadowDeltaUpdatedEventsResponse & | handler, | ||
| const OnSubscribeComplete & | onSubAck | ||
| ) |
Subscribe to ShadowDelta events for the (classic) shadow of an AWS IoT thing.
Subscribe to ShadowDeltaUpdatedEvents messages
Once subscribed, handler is invoked each time a message matching the topic is received. It is possible for such messages to arrive before the SUBACK is received.
| request | Subscription request configuration |
| qos | Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK |
| handler | callback function to invoke with messages received on the subscription topic |
| onSubAck | callback function invoked on receipt of the SUBACK from the server |
| bool Aws::Iotshadow::IotShadowClient::SubscribeToShadowUpdatedEvents | ( | const Aws::Iotshadow::ShadowUpdatedSubscriptionRequest & | request, |
| Aws::Crt::Mqtt::QOS | qos, | ||
| const OnSubscribeToShadowUpdatedEventsResponse & | handler, | ||
| const OnSubscribeComplete & | onSubAck | ||
| ) |
Subscribe to ShadowUpdated events for the (classic) shadow of an AWS IoT thing.
Subscribe to ShadowUpdatedEvents messages
Once subscribed, handler is invoked each time a message matching the topic is received. It is possible for such messages to arrive before the SUBACK is received.
| request | Subscription request configuration |
| qos | Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK |
| handler | callback function to invoke with messages received on the subscription topic |
| onSubAck | callback function invoked on receipt of the SUBACK from the server |
| bool Aws::Iotshadow::IotShadowClient::SubscribeToUpdateNamedShadowAccepted | ( | const Aws::Iotshadow::UpdateNamedShadowSubscriptionRequest & | request, |
| Aws::Crt::Mqtt::QOS | qos, | ||
| const OnSubscribeToUpdateNamedShadowAcceptedResponse & | handler, | ||
| const OnSubscribeComplete & | onSubAck | ||
| ) |
Subscribes to the accepted topic for the UpdateNamedShadow operation
Subscribe to UpdateNamedShadowAccepted messages
Once subscribed, handler is invoked each time a message matching the topic is received. It is possible for such messages to arrive before the SUBACK is received.
| request | Subscription request configuration |
| qos | Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK |
| handler | callback function to invoke with messages received on the subscription topic |
| onSubAck | callback function invoked on receipt of the SUBACK from the server |
| bool Aws::Iotshadow::IotShadowClient::SubscribeToUpdateNamedShadowRejected | ( | const Aws::Iotshadow::UpdateNamedShadowSubscriptionRequest & | request, |
| Aws::Crt::Mqtt::QOS | qos, | ||
| const OnSubscribeToUpdateNamedShadowRejectedResponse & | handler, | ||
| const OnSubscribeComplete & | onSubAck | ||
| ) |
Subscribes to the rejected topic for the UpdateNamedShadow operation
Subscribe to UpdateNamedShadowRejected messages
Once subscribed, handler is invoked each time a message matching the topic is received. It is possible for such messages to arrive before the SUBACK is received.
| request | Subscription request configuration |
| qos | Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK |
| handler | callback function to invoke with messages received on the subscription topic |
| onSubAck | callback function invoked on receipt of the SUBACK from the server |
| bool Aws::Iotshadow::IotShadowClient::SubscribeToUpdateShadowAccepted | ( | const Aws::Iotshadow::UpdateShadowSubscriptionRequest & | request, |
| Aws::Crt::Mqtt::QOS | qos, | ||
| const OnSubscribeToUpdateShadowAcceptedResponse & | handler, | ||
| const OnSubscribeComplete & | onSubAck | ||
| ) |
Subscribes to the accepted topic for the UpdateShadow operation
Subscribe to UpdateShadowAccepted messages
Once subscribed, handler is invoked each time a message matching the topic is received. It is possible for such messages to arrive before the SUBACK is received.
| request | Subscription request configuration |
| qos | Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK |
| handler | callback function to invoke with messages received on the subscription topic |
| onSubAck | callback function invoked on receipt of the SUBACK from the server |
| bool Aws::Iotshadow::IotShadowClient::SubscribeToUpdateShadowRejected | ( | const Aws::Iotshadow::UpdateShadowSubscriptionRequest & | request, |
| Aws::Crt::Mqtt::QOS | qos, | ||
| const OnSubscribeToUpdateShadowRejectedResponse & | handler, | ||
| const OnSubscribeComplete & | onSubAck | ||
| ) |
Subscribes to the rejected topic for the UpdateShadow operation
Subscribe to UpdateShadowRejected messages
Once subscribed, handler is invoked each time a message matching the topic is received. It is possible for such messages to arrive before the SUBACK is received.
| request | Subscription request configuration |
| qos | Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACK |
| handler | callback function to invoke with messages received on the subscription topic |
| onSubAck | callback function invoked on receipt of the SUBACK from the server |