Rtos API example

Embed: (wiki syntax)

« Back to documentation index

AttErrorResponse Struct Reference

AttErrorResponse Struct Reference

Response to a request which can't be performed. More...

#include <AttServerMessage.h>

Inherits ble::pal::AttServerMessage.

Public Types

enum  AttributeErrorCode {
  INVALID_HANDLE = 0x01, READ_NOT_PERMITTED = 0x02, WRITE_NOT_PERMITTED = 0x03, INVALID_PDU = 0x04,
  INSUFFICIENT_AUTHENTICATION = 0x05, REQUEST_NOT_SUPPORTED = 0x06, INVALID_OFFSET = 0x07, INSUFFICIENT_AUTHORIZATION = 0x08,
  PREPARE_QUEUE_FULL = 0x09, ATTRIBUTE_NOT_FOUND = 0x0A, ATTRIBUTE_NOT_LONG = 0x0B, INSUFFICIENT_ENCRYPTION_KEY_SIZE = 0x0C,
  INVALID_ATTRIBUTE_VALUE_LENGTH = 0x0D, UNLIKELY_ERROR = 0x0E, INSUFFICIENT_ENCRYPTION = 0x0F, UNSUPPORTED_GROUP_TYPE = 0x10,
  INSUFFICIENT_RESOURCES = 0x11, WRITE_REQUEST_REJECTED = 0xFC, CLIENT_CHARACTERISTIC_CONFIGURATION_DESCRIPTOR_IMPROPERLY_CONFIGURED = 0xFD, PROCEDURE_ALREADY_IN_PROGRESS = 0xFE,
  OUT_OF_RANGE = 0xFF
}
 

List of Error codes for the ATT protocol.

More...

Public Member Functions

 AttErrorResponse (AttributeOpcode request_opcode_, attribute_handle_t handle_in_error_, uint8_t error_code_)
 Construct an attribute error response.
 AttErrorResponse (AttributeOpcode request_opcode_, uint8_t error_code_)
 Construct an attribute error response in the case where there was no attribute handle in the original response or if the request is not supported.

Data Fields

const AttributeOpcode request_opcode
 The opcode of the request that generated this error response.
const attribute_handle_t handle_in_error
 The attribute handle that generated this error response.
const uint8_t error_code
 The reason why the request has generated an error response.
const AttributeOpcode opcode
 Op code used to identify the type of the attribute response.

Detailed Description

Response to a request which can't be performed.

Note:
see BLUETOOTH SPECIFICATION Version 5.0 | Vol 3, Part F Section 3.4.1.1 for details about error response.
see BLUETOOTH SPECIFICATION Version 5.0 | Vol 3, Part F Section 3.4.9 which details possible error response by requests.

Definition at line 119 of file AttServerMessage.h.


Member Enumeration Documentation

List of Error codes for the ATT protocol.

Enumerator:
INVALID_HANDLE 

The attribute handle given was not valid on this server.

READ_NOT_PERMITTED 

The attribute cannot be read.

WRITE_NOT_PERMITTED 

The attribute cannot be written.

INVALID_PDU 

The attribute PDU was invalid.

INSUFFICIENT_AUTHENTICATION 

The attribute requires authentication before it can be read or written.

REQUEST_NOT_SUPPORTED 

Attribute server does not support the request received from the client.

INVALID_OFFSET 

Offset specified was past the end of the attribute.

INSUFFICIENT_AUTHORIZATION 

The attribute requires authorization before it can be read or written.

PREPARE_QUEUE_FULL 

Too many prepare writes have been queued.

ATTRIBUTE_NOT_FOUND 

No attribute found within the given attribute handle range.

ATTRIBUTE_NOT_LONG 

The attribute cannot be read using the Read Blob Request.

INSUFFICIENT_ENCRYPTION_KEY_SIZE 

The Encryption Key Size used for encrypting this link is insufficient.

INVALID_ATTRIBUTE_VALUE_LENGTH 

The attribute value length is invalid for the operation.

UNLIKELY_ERROR 

The attribute request that was requested has encountered an error that was unlikely, and therefore could not be completed as requested.

INSUFFICIENT_ENCRYPTION 

The attribute requires encryption before it can be read or written.

UNSUPPORTED_GROUP_TYPE 

The attribute type is not a supported grouping attribute as defined by a higher layer specification.

INSUFFICIENT_RESOURCES 

Insufficient Resources to complete the request.

WRITE_REQUEST_REJECTED 

The Write Request Rejected error code is used when a requested write operation cannot be fulfilled for reasons other than permissions.

CLIENT_CHARACTERISTIC_CONFIGURATION_DESCRIPTOR_IMPROPERLY_CONFIGURED 

The Client Characteristic Configuration Descriptor Improperly Configured error code is used when a Client Characteristic Configuration descriptor is not configured according to the requirements of the profile or service.

PROCEDURE_ALREADY_IN_PROGRESS 

The Procedure Already in Progress error code is used when a profile or service request cannot be serviced because an operation that has been previously triggered is still in progress.

OUT_OF_RANGE 

The Out of Range error code is used when an attribute value is out of range as defined by a profile or service specification.

Definition at line 175 of file AttServerMessage.h.


Constructor & Destructor Documentation

AttErrorResponse ( AttributeOpcode  request_opcode_,
attribute_handle_t  handle_in_error_,
uint8_t  error_code_ 
)

Construct an attribute error response.

Parameters:
request_opcode_The Attribute opcode of the request that generated the error.
handle_in_error_The attribute handle that generated this error response.
error_codeThe reason why the request has generated an error.

Definition at line 129 of file AttServerMessage.h.

AttErrorResponse ( AttributeOpcode  request_opcode_,
uint8_t  error_code_ 
)

Construct an attribute error response in the case where there was no attribute handle in the original response or if the request is not supported.

Parameters:
request_opcode_The Attribute opcode of the request that generated the error.
error_codeThe reason why the request has generated an error.

Definition at line 147 of file AttServerMessage.h.


Field Documentation

const uint8_t error_code

The reason why the request has generated an error response.

Definition at line 170 of file AttServerMessage.h.

The attribute handle that generated this error response.

If there was no attribute handle in the original request or if the request is not supported, then this field is equal to 0x0000.

Definition at line 165 of file AttServerMessage.h.

const AttributeOpcode opcode [inherited]

Op code used to identify the type of the attribute response.

Definition at line 102 of file AttServerMessage.h.

The opcode of the request that generated this error response.

Definition at line 158 of file AttServerMessage.h.