Soletta™ Framework
Framework for making IoT devices

Full online documentation | C API Index
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields
sol_gatt_attr Struct Reference

Representation of a GATT Attribute. More...

#include <sol-gatt.h>

Data Fields

void * _priv
 
uint16_t flags
 
int(* read )(struct sol_gatt_pending *op, uint16_t offset)
 The response for this operation will be returned by calling sol_gatt_pending_reply() passing a valid buffer, or an error. More...
 
enum sol_gatt_attr_type type
 
void * user_data
 
struct sol_bt_uuid uuid
 
int(* write )(struct sol_gatt_pending *op, struct sol_buffer *buf, uint16_t offset)
 The response for this operation will be returned by calling sol_gatt_pending_reply(), the buf parameter will be ignored. More...
 

Detailed Description

Representation of a GATT Attribute.

Examples:
/src/samples/bluetooth/browse.c, and /src/samples/bluetooth/heartbeat.c.

Field Documentation

void* sol_gatt_attr::_priv
uint16_t sol_gatt_attr::flags
Examples:
/src/samples/bluetooth/browse.c.

Referenced by print_attr().

int(* sol_gatt_attr::read)(struct sol_gatt_pending *op, uint16_t offset)

The response for this operation will be returned by calling sol_gatt_pending_reply() passing a valid buffer, or an error.

Examples:
/src/samples/bluetooth/heartbeat.c.
enum sol_gatt_attr_type sol_gatt_attr::type
Examples:
/src/samples/bluetooth/browse.c.

Referenced by print_attr().

void* sol_gatt_attr::user_data
struct sol_bt_uuid sol_gatt_attr::uuid
Examples:
/src/samples/bluetooth/browse.c.

Referenced by print_attr().

int(* sol_gatt_attr::write)(struct sol_gatt_pending *op, struct sol_buffer *buf, uint16_t offset)

The response for this operation will be returned by calling sol_gatt_pending_reply(), the buf parameter will be ignored.

Parameters
opThe pending operation.
bufThe buffer that will be written into the attribute, If the function returns success, it takes the ownership of the buffer.
offsetThe offset into which the write operation was made.
Returns
0 on success, -errno on failure.

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