3.2.6.2 COMMAND_NOT_EXECUTED Response
When a client receives a command, there are a number of error checks it performs. Several of those checks result in the client concluding that there is a problem detected with an incoming command. These can include command corruption errors, framing errors, and sequence number errors. When these errors are detected, the client does not execute the command and responds to the host with the COMMAND_NOT_EXECUTED response.
See Client Command Processing and Response Generation for more details on when this response is generated by a client.
3.2.6.2.1 Response Details
COMMAND_NOT_EXECUTED Response Details | |
---|---|
Status Code | 0x04 |
Response Data Payload | [uint8_t CommandNotExecutedCause]1 |
Note 1: When reporting that a command was not executed, it is optional to report the CommandNotExecutedCause. |
CommandNotExecutedCause Definition
Reporting a CommandNotExecutedCause is optional but encouraged. The smallest clients are allowed to report a COMMAND_NOT_EXECUTED status without reporting a CommandNotExecutedCause and the protocol will function properly. However, when errors are encountered, the reason the command was not executed will not be known by the host and can’t be communicated to the developer or user. It is encouraged for clients to report a CommandNotExecutedCause to improve the debugging experience when errors are encountered.
CommandNotExecutedCause Name | CommandNotExecutedCause Value | Detailed Description |
---|---|---|
TRANSPORT_INTEGRITY_CHECK_ERROR | 0x00 | Code for reporting that the command received failed the Transport Integrity Check indicating that the command was corrupted during transportation from the host to the client |
COMMAND_TOO_LONG | 0x01 | Code for reporting that the received command exceeded the size of the client buffer |
COMMAND_TOO_SHORT | 0x02 | Code for reporting that the received command was too short |
SEQUENCE_NUMBER_INVALID | 0x03 | Code for reporting that the sequence number of the received command is invalid |
Reserved for Future Use | 0x04-0xFF | Reserved for future use |
3.2.6.2.2 Response Examples
The following figure shows an example of the COMMAND_NOT_EXECUTED response where no CommandNotExecutedCause is reported.
The following figure shows an example of the COMMAND_NOT_EXECUTED response where the TRANSPORT_INTEGRITY_CHECK_ERROR CommandNotExecutedCause is reported.