AWS IoT Device SDK C++ v2  1.43.1
AWS IoT Device SDK C++ v2
Namespaces | Classes | Typedefs | Enumerations | Functions
Aws::Iotcommands Namespace Reference

Namespaces

 CommandExecutionStatusMarshaller
 
 DeviceTypeMarshaller
 
 RejectedErrorCodeMarshaller
 

Classes

class  ClientV2
 
class  CommandExecutionEvent
 
class  CommandExecutionResult
 
class  CommandExecutionsSubscriptionRequest
 
class  IClientV2
 
class  ServiceErrorV2
 
class  ServiceStreamingOperation
 
class  StatusReason
 
class  UpdateCommandExecutionRequest
 
class  UpdateCommandExecutionResponse
 
class  V2ErrorResponse
 

Typedefs

using UpdateCommandExecutionResult = Aws::Iot::RequestResponse::Result< UpdateCommandExecutionResponse, ServiceErrorV2< V2ErrorResponse > >
 
using UpdateCommandExecutionResultHandler = std::function< void(UpdateCommandExecutionResult &&)>
 

Enumerations

enum  CommandExecutionStatus {
  CommandExecutionStatus::IN_PROGRESS, CommandExecutionStatus::SUCCEEDED, CommandExecutionStatus::FAILED, CommandExecutionStatus::REJECTED,
  CommandExecutionStatus::TIMED_OUT
}
 
enum  DeviceType { DeviceType::THING, DeviceType::CLIENT }
 
enum  RejectedErrorCode {
  RejectedErrorCode::InvalidTopic, RejectedErrorCode::InvalidJson, RejectedErrorCode::InvalidRequest, RejectedErrorCode::InvalidStateTransition,
  RejectedErrorCode::ResourceNotFound, RejectedErrorCode::VersionMismatch, RejectedErrorCode::InternalError, RejectedErrorCode::RequestThrottled,
  RejectedErrorCode::TerminalStateReached
}
 

Functions

AWS_IOTCOMMANDS_API std::shared_ptr< IClientV2NewClientFrom5 (const Aws::Crt::Mqtt5::Mqtt5Client &protocolClient, const Aws::Iot::RequestResponse::RequestResponseClientOptions &options, Aws::Crt::Allocator *allocator=Aws::Crt::ApiAllocator())
 
AWS_IOTCOMMANDS_API std::shared_ptr< IClientV2NewClientFrom311 (const Aws::Crt::Mqtt::MqttConnection &protocolClient, const Aws::Iot::RequestResponse::RequestResponseClientOptions &options, Aws::Crt::Allocator *allocator=Aws::Crt::ApiAllocator())
 
template<typename R , typename E >
static void s_applyUnmodeledErrorToHandler (const std::function< void(R &&)> &handler, int errorCode)
 
template<typename R , typename E >
static void s_applyModeledErrorToHandler (const std::function< void(R &&)> &handler, E &&modeledError)
 
static void s_UpdateCommandExecutionResponseHandler (Aws::Iot::RequestResponse::UnmodeledResult &&result, const UpdateCommandExecutionResultHandler &handler, const Aws::Crt::String &successPathTopic, const Aws::Crt::String &failurePathTopic)
 
static struct aws_byte_cursor s_getSegmentFromTopic (const Aws::Crt::ByteCursor &topic, int segment)
 
static bool s_initModeledEvent (const Aws::Iot::RequestResponse::IncomingPublishEvent &publishEvent, CommandExecutionEvent &modeledEvent)
 

Typedef Documentation

◆ UpdateCommandExecutionResult

◆ UpdateCommandExecutionResultHandler

Enumeration Type Documentation

◆ CommandExecutionStatus

The status of the command execution.

Enumerator
IN_PROGRESS 

The device is currently processing the received command.

SUCCEEDED 

The device successfully completed the command.

FAILED 

The device failed to complete the command.

REJECTED 

The device received an invalid or incomplete request.

TIMED_OUT 

When the command execution timed out, this status can be used to provide additional information in the statusReason field in the UpdateCommandExecutionRequest request.

◆ DeviceType

Possible device types for command executions.

Enumerator
THING 

A target for the commands is an IoT Thing.

CLIENT 

A target for the commands is an MQTT client ID.

◆ RejectedErrorCode

A value indicating the kind of error encountered while processing an AWS IoT Commands request

Enumerator
InvalidTopic 

The request was sent to a topic in the AWS IoT Commands namespace that does not map to any API.

InvalidJson 

The contents of the request could not be interpreted as valid UTF-8-encoded JSON.

InvalidRequest 

The contents of the request were invalid. The message contains details about the error.

InvalidStateTransition 

An update attempted to change the command execution to a state that is invalid because of the command execution's current state. In this case, the body of the error message also contains the executionState field.

ResourceNotFound 

The CommandExecution specified by the request topic does not exist.

VersionMismatch 

The expected version specified in the request does not match the version of the command execution in the AWS IoT Commands service. In this case, the body of the error message also contains the executionState field.

InternalError 

There was an internal error during the processing of the request.

RequestThrottled 

The request was throttled.

TerminalStateReached 

Occurs when a command to describe a command is performed on a command that is in a terminal state.

Function Documentation

◆ NewClientFrom311()

std::shared_ptr< IClientV2 > Aws::Iotcommands::NewClientFrom311 ( const Aws::Crt::Mqtt::MqttConnection protocolClient,
const Aws::Iot::RequestResponse::RequestResponseClientOptions options,
Aws::Crt::Allocator allocator = Aws::Crt::ApiAllocator() 
)

Creates a new service client that uses an SDK MQTT311 client for transport.

Parameters
protocolClientMQTT client to use as transport
optionsrequest-response MQTT client configuration options
allocatormemory allocator to use for all client functionality
Returns
a new service client

◆ NewClientFrom5()

std::shared_ptr< IClientV2 > Aws::Iotcommands::NewClientFrom5 ( const Aws::Crt::Mqtt5::Mqtt5Client protocolClient,
const Aws::Iot::RequestResponse::RequestResponseClientOptions options,
Aws::Crt::Allocator allocator = Aws::Crt::ApiAllocator() 
)

Creates a new service client that uses an SDK MQTT5 client for transport.

Parameters
protocolClientMQTT client to use as transport
optionsrequest-response MQTT client configuration options
allocatormemory allocator to use for all client functionality
Returns
a new service client

◆ s_applyModeledErrorToHandler()

template<typename R , typename E >
static void Aws::Iotcommands::s_applyModeledErrorToHandler ( const std::function< void(R &&)> &  handler,
E &&  modeledError 
)
static

◆ s_applyUnmodeledErrorToHandler()

template<typename R , typename E >
static void Aws::Iotcommands::s_applyUnmodeledErrorToHandler ( const std::function< void(R &&)> &  handler,
int  errorCode 
)
static

◆ s_getSegmentFromTopic()

static struct aws_byte_cursor Aws::Iotcommands::s_getSegmentFromTopic ( const Aws::Crt::ByteCursor topic,
int  segment 
)
static

◆ s_initModeledEvent()

static bool Aws::Iotcommands::s_initModeledEvent ( const Aws::Iot::RequestResponse::IncomingPublishEvent publishEvent,
CommandExecutionEvent modeledEvent 
)
static

◆ s_UpdateCommandExecutionResponseHandler()

static void Aws::Iotcommands::s_UpdateCommandExecutionResponseHandler ( Aws::Iot::RequestResponse::UnmodeledResult &&  result,
const UpdateCommandExecutionResultHandler handler,
const Aws::Crt::String successPathTopic,
const Aws::Crt::String failurePathTopic 
)
static