PebbleOS v4.47.0-505-g4bbc630fa
Loading...
Searching...
No Matches
pbl_bt_gattc_service_cb Struct Reference

What a service client reports; any may be null. More...

#include <gatt.h>

Data Fields

void(* discovered )(struct pbl_bt_gattc_service *svc, int status)
 The search for the service ended.
 
void(* subscribed )(struct pbl_bt_gattc_service *svc, uint8_t chr, bool enable, int status)
 A pbl_bt_gattc_service_subscribe() was answered.
 
void(* notified )(struct pbl_bt_gattc_service *svc, uint8_t chr, const uint8_t *data, uint16_t len)
 The peer notified or indicated a value, valid during the call.
 
void(* written )(struct pbl_bt_gattc_service *svc, uint8_t chr, int status)
 A pbl_bt_gattc_service_write() was answered.
 
void(* read )(struct pbl_bt_gattc_service *svc, uint8_t chr, int status, const uint8_t *data, uint16_t len)
 A pbl_bt_gattc_service_read() was answered, with the value if status is 0.
 

Detailed Description

What a service client reports; any may be null.

Characteristics are told by their index among those of the service client. A status is 0, the ATT error code the peer answered with (positive), or a negative errno. Called on the host task, and not after pbl_bt_gattc_service_stop() returns, but for a call already running.

Field Documentation

◆ discovered

void(* pbl_bt_gattc_service_cb::discovered) (struct pbl_bt_gattc_service *svc, int status)

The search for the service ended.

Parameters
status0 if the peer has it with the characteristics required, -ENOENT if not, or what failed.

◆ notified

void(* pbl_bt_gattc_service_cb::notified) (struct pbl_bt_gattc_service *svc, uint8_t chr, const uint8_t *data, uint16_t len)

The peer notified or indicated a value, valid during the call.

◆ read

void(* pbl_bt_gattc_service_cb::read) (struct pbl_bt_gattc_service *svc, uint8_t chr, int status, const uint8_t *data, uint16_t len)

A pbl_bt_gattc_service_read() was answered, with the value if status is 0.

◆ subscribed

void(* pbl_bt_gattc_service_cb::subscribed) (struct pbl_bt_gattc_service *svc, uint8_t chr, bool enable, int status)

◆ written

void(* pbl_bt_gattc_service_cb::written) (struct pbl_bt_gattc_service *svc, uint8_t chr, int status)

The documentation for this struct was generated from the following file: