Mistake on this page?
Report an issue in GitHub or email us
Public Types | Data Fields
GattWriteCallbackParams Struct Reference

#include <GattCallbackParamTypes.h>

Public Types

enum  WriteOp_t {
  OP_INVALID = 0x00, OP_WRITE_REQ = 0x01, OP_WRITE_CMD = 0x02, OP_SIGN_WRITE_CMD = 0x03,
  OP_PREP_WRITE_REQ = 0x04, OP_EXEC_WRITE_REQ_CANCEL = 0x05, OP_EXEC_WRITE_REQ_NOW = 0x06
}
 

Data Fields

Gap::Handle_t connHandle
 
GattAttribute::Handle_t handle
 
WriteOp_t writeOp
 
union {
   uint16_t   offset
 
   ble_error_t   status
 
}; 
 
union {
   uint16_t   len
 
   uint8_t   error_code
 
}; 
 
const uint8_t * data
 

Detailed Description

GATT Write event definition.

Instances of this type are created and passed to user registered callbacks whether the GattServer has received a write request or a GattClient has received a write response.

Attention
The GattServer only populates the fields offset, len and data when it has received a write request. Callbacks attached to the GattClient do not use those fields.
The GattClient only populates the fields status and error_code when it has received a write response. Callbacks attached to the GattServer do not use those fields.

Member Enumeration Documentation

Enumeration of allowed write operations.

Enumerator
OP_INVALID 

Invalid operation.

OP_WRITE_REQ 

Write request.

OP_WRITE_CMD 

Write command.

OP_SIGN_WRITE_CMD 

Signed write command.

OP_PREP_WRITE_REQ 

Prepare write request.

OP_EXEC_WRITE_REQ_CANCEL 

Execute write request: cancel all prepared writes.

OP_EXEC_WRITE_REQ_NOW 

Execute write request: immediately execute all prepared writes.

Field Documentation

Gap::Handle_t GattWriteCallbackParams::connHandle

Handle of the connection that triggered the event.

const uint8_t* GattWriteCallbackParams::data

Pointer to the data to write.

Attention
Data may not persist beyond the callback scope.
Reserved for GattServer registered callbacks.
uint8_t GattWriteCallbackParams::error_code

Error code of the GattClient Write operation.

Attention
Reserved for GattClient registered callbacks.
GattAttribute::Handle_t GattWriteCallbackParams::handle

Handle of the attribute to which the write operation applies.

uint16_t GattWriteCallbackParams::len

Length (in bytes) of the data to write.

Attention
Reserved for GattServer registered callbacks.
uint16_t GattWriteCallbackParams::offset

Offset within the attribute value to be written.

Attention
Reserved for GattServer registered callbacks.
ble_error_t GattWriteCallbackParams::status

Status of the GattClient Write operation.

Attention
Reserved for GattClient registered callbacks.
WriteOp_t GattWriteCallbackParams::writeOp

Type of the write operation.


The documentation for this struct was generated from the following file:
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.