InPlay API
|
BLE GATT. More...
Data Structures | |
struct | ble_gatt_sdp_t |
Service Discovery Procedure (SDP) More... | |
struct | ble_gatt_disc_t |
Attributes Discovery Structure. More... | |
struct | ble_gatt_read_simple_t |
Simple Read (GATT_READ or GATT_READ_LONG) More... | |
struct | ble_gatt_read_by_uuid_t |
struct | ble_gatt_read_multiple_t |
Read Multiple short characteristic (GATT_READ_MULTIPLE) More... | |
union | ble_gatt_read_t |
request union according to read type More... | |
struct | ble_gatt_read_req_t |
Read command (Simple, Long, Multiple, or by UUID) More... | |
struct | ble_gatt_write_t |
Write peer attribute value. More... | |
struct | ble_gatt_att_desc_t |
Attribute Description. More... | |
struct | ble_gatt_svc_desc_t |
Service description. More... | |
struct | ble_att_val_t |
attribute value More... | |
struct | ble_att_perm_t |
attribute permission More... | |
Enumerations | |
enum | ble_gatt_sdp_att_type { IN_BLE_GATT_SDP_NONE, IN_BLE_GATT_SDP_INC_SVC, IN_BLE_GATT_SDP_ATT_CHAR, IN_BLE_GATT_SDP_ATT_VAL, IN_BLE_GATT_SDP_ATT_DESC } |
Service Discovery Attribute type. More... | |
enum | ble_gatt_sdp_type { GATT_SDP_DISC_SVC, GATT_SDP_DISC_SVC_ALL, GATT_SDP_DISC_CANCEL } |
Gatt SDP type. More... | |
enum | ble_gatt_disc_type { GATT_DISC_ALL_SVC, GATT_DISC_BY_UUID_SVC, GATT_DISC_INCLUDED_SVC, GATT_DISC_ALL_CHAR, GATT_DISC_BY_UUID_CHAR, GATT_DISC_DESC_CHAR } |
Gatt discovery type. More... | |
enum | ble_gatt_read_type { GATT_READ, GATT_READ_LONG, GATT_READ_BY_UUID, GATT_READ_MULTIPLE } |
Gatt read type. More... | |
enum | ble_gatt_write_type { GATT_WRITE, GATT_WRITE_NO_RESPONSE, GATT_WRITE_SIGNED, GATT_EXEC_WRITE } |
Gatt write type. More... | |
Functions | |
int | in_ble_gatt_exc_mtu (void *hdl, int conidx, uint16_t *p_mtu, comp_cb callback) |
Exchange MTU request. More... | |
int | in_ble_gatt_sdp (void *hdl, int conidx, int sdp_type, ble_gatt_sdp_t *p_sdp, comp_cb callback) |
Service Discovery Procedure. More... | |
int | in_ble_gatt_discovery (void *hdl, int conidx, int disc_type, ble_gatt_disc_t *p_disc, comp_cb callback) |
Attributes Discovery. More... | |
int | in_ble_gatt_read (void *hdl, int conidx, int read_type, ble_gatt_read_req_t *p_req, comp_cb callback) |
Read Attribute. More... | |
int | in_ble_gatt_write (void *hdl, int conidx, int wrt_type, ble_gatt_write_t *p_write, comp_cb callback) |
Write Attribute. More... | |
int | in_ble_gatt_excute_write (void *hdl, int conidx, bool execute, comp_cb callback) |
Execute Write command for queue writes. More... | |
int | in_ble_gatt_register_ind_ntf_event (void *hdl, int conidx, bool reg, uint32_t start_hdl, uint32_t end_hdl, comp_cb callback) |
Registration to peer device events (Indication/Notification) More... | |
int | in_ble_gatt_indication_cfm (void *hdl, int conidx, uint16_t handle) |
Confirm receive Indication. More... | |
int | in_ble_gatt_send_ind (void *hdl, int conidx, uint32_t handle, uint32_t length, uint8_t *value, comp_cb callback) |
Send indication. More... | |
int | in_ble_gatt_send_ntf (void *hdl, int conidx, uint32_t handle, uint32_t length, uint8_t *value, comp_cb callback) |
Send notification. More... | |
int | in_ble_gatt_send_svc_changed (void *hdl, int conidx, uint32_t svc_shdl, uint32_t svc_ehdl, comp_cb callback) |
Inform Service changed. More... | |
int | in_ble_gatt_add_svc (void *hdl, ble_gatt_svc_desc_t *p_svc, uint16_t *p_hdl, comp_cb callback) |
Add a new Service More... | |
int | in_ble_gatt_get_svc_perm (void *hdl, uint16_t start_hdl, uint8_t *p_perm, comp_cb callback) |
Retrieve service attribute permission More... | |
int | in_ble_gatt_set_svc_perm (void *hdl, uint16_t start_hdl, uint8_t perm, comp_cb callback) |
Set service attribute permission More... | |
int | in_ble_gatt_get_att_perm (void *hdl, uint16_t handle, ble_att_perm_t *p_perm, comp_cb callback) |
Retrieve attribute permission More... | |
int | in_ble_gatt_set_att_perm (void *hdl, uint16_t handle, uint16_t perm, uint16_t ext_perm, comp_cb callback) |
Set attribute permission More... | |
int | in_ble_gatt_get_att_value (void *hdl, uint16_t handle, ble_att_val_t *p_att_val, comp_cb callback) |
Retrieve attribute value More... | |
int | in_ble_gatt_set_att_value (void *hdl, uint16_t handle, uint16_t length, uint8_t *value, comp_cb callback) |
Set attribute value More... | |
int | in_ble_gatt_att_info_req_cfm (void *hdl, int conidx, uint16_t handle, uint16_t length, uint8_t status) |
Confirm attribute prepare write reqeust More... | |
int | in_ble_gatt_write_req_cfm (void *hdl, uint8_t conidx, uint16_t handle, uint8_t status) |
Confirm attribute write reqeust More... | |
int | in_ble_gatt_read_req_cfm (void *hdl, uint8_t conidx, uint16_t handle, uint8_t status, uint16_t length, uint8_t *value) |
Confirm attribute read reqeust More... | |
BLE GATT.
enum ble_gatt_disc_type |
Gatt discovery type.
enum ble_gatt_read_type |
enum ble_gatt_sdp_type |
enum ble_gatt_write_type |
int in_ble_gatt_add_svc | ( | void * | hdl, |
ble_gatt_svc_desc_t * | p_svc, | ||
uint16_t * | p_hdl, | ||
comp_cb | callback | ||
) |
Add a new Service
[in] | p_svc | Pointer to service data structure |
[out] | p_hdl | Service handle |
int in_ble_gatt_att_info_req_cfm | ( | void * | hdl, |
int | conidx, | ||
uint16_t | handle, | ||
uint16_t | length, | ||
uint8_t | status | ||
) |
Confirm attribute prepare write reqeust
[in] | conidx | Connection index |
[in] | handle | Attribute handle |
[in] | length | Write length |
[in] | status | Write status |
int in_ble_gatt_discovery | ( | void * | hdl, |
int | conidx, | ||
int | disc_type, | ||
ble_gatt_disc_t * | p_disc, | ||
comp_cb | callback | ||
) |
Attributes Discovery.
[in] | conidx | Connection index |
[in] | disc_type | Attribute discovery type, |
[in] | p_disc | Pointer to attribute discovery paramters |
int in_ble_gatt_exc_mtu | ( | void * | hdl, |
int | conidx, | ||
uint16_t * | p_mtu, | ||
comp_cb | callback | ||
) |
Exchange MTU request.
[in] | conidx | Connection index |
[out] | p_mtu | Pointer to the server's max MTU size |
int in_ble_gatt_excute_write | ( | void * | hdl, |
int | conidx, | ||
bool | execute, | ||
comp_cb | callback | ||
) |
Execute Write command for queue writes.
[in] | conidx | Connection index |
[in] | execute | True: execute, false: cancel |
int in_ble_gatt_get_att_perm | ( | void * | hdl, |
uint16_t | handle, | ||
ble_att_perm_t * | p_perm, | ||
comp_cb | callback | ||
) |
Retrieve attribute permission
[in] | handle | Attribute handle |
[out] | p_perm | Pointer to return attribute permission |
int in_ble_gatt_get_att_value | ( | void * | hdl, |
uint16_t | handle, | ||
ble_att_val_t * | p_att_val, | ||
comp_cb | callback | ||
) |
Retrieve attribute value
[in] | handle | Attribute handle |
[out] | p_att_val | Pointer to return attribute value |
int in_ble_gatt_get_svc_perm | ( | void * | hdl, |
uint16_t | start_hdl, | ||
uint8_t * | p_perm, | ||
comp_cb | callback | ||
) |
Retrieve service attribute permission
[in] | start_hdl | Service attribute handle |
[out] | p_perm | Service attribute permission, |
int in_ble_gatt_indication_cfm | ( | void * | hdl, |
int | conidx, | ||
uint16_t | handle | ||
) |
Confirm receive Indication.
[in] | conidx | Connection index |
[in] | handle | Peer attribute handle |
int in_ble_gatt_read | ( | void * | hdl, |
int | conidx, | ||
int | read_type, | ||
ble_gatt_read_req_t * | p_req, | ||
comp_cb | callback | ||
) |
Read Attribute.
[in] | conidx | Connection index |
[in] | read_type | Attribute read type, |
[in] | p_req | Pointer to attribute read paramters |
int in_ble_gatt_read_req_cfm | ( | void * | hdl, |
uint8_t | conidx, | ||
uint16_t | handle, | ||
uint8_t | status, | ||
uint16_t | length, | ||
uint8_t * | value | ||
) |
Confirm attribute read reqeust
[in] | conidx | Connection index |
[in] | handle | Attribute handle |
[in] | status | Attribute Read status |
[in] | length | Attribute Read value length |
[in] | value | Attribute Read value |
int in_ble_gatt_register_ind_ntf_event | ( | void * | hdl, |
int | conidx, | ||
bool | reg, | ||
uint32_t | start_hdl, | ||
uint32_t | end_hdl, | ||
comp_cb | callback | ||
) |
Registration to peer device events (Indication/Notification)
[in] | conidx | Connection index |
[in] | reg | True: regiter, false: unregister |
[in] | start_hdl | Peer attribute start handle |
[in] | end_hdl | Peer attribute end handle |
int in_ble_gatt_sdp | ( | void * | hdl, |
int | conidx, | ||
int | sdp_type, | ||
ble_gatt_sdp_t * | p_sdp, | ||
comp_cb | callback | ||
) |
Service Discovery Procedure.
[in] | conidx | Connection index |
[in] | sdp_type | Service Discovery Type, |
[in] | p_sdp | Pointer to service discovery paramters |
int in_ble_gatt_send_ind | ( | void * | hdl, |
int | conidx, | ||
uint32_t | handle, | ||
uint32_t | length, | ||
uint8_t * | value, | ||
comp_cb | callback | ||
) |
Send indication.
[in] | conidx | Connection index |
[in] | handle | Inidcation attribute handle |
[in] | length | Inidcation attribute value length |
[in] | value | Inidcation attribute value |
int in_ble_gatt_send_ntf | ( | void * | hdl, |
int | conidx, | ||
uint32_t | handle, | ||
uint32_t | length, | ||
uint8_t * | value, | ||
comp_cb | callback | ||
) |
Send notification.
[in] | conidx | Connection index |
[in] | handle | Notification attribute handle |
[in] | length | Notification attribute value length |
[in] | value | Notification attribute value |
int in_ble_gatt_send_svc_changed | ( | void * | hdl, |
int | conidx, | ||
uint32_t | svc_shdl, | ||
uint32_t | svc_ehdl, | ||
comp_cb | callback | ||
) |
Inform Service changed.
[in] | conidx | Connection index |
[in] | svc_shdl | Service start handle |
[in] | svc_ehdl | Service end handle |
int in_ble_gatt_set_att_perm | ( | void * | hdl, |
uint16_t | handle, | ||
uint16_t | perm, | ||
uint16_t | ext_perm, | ||
comp_cb | callback | ||
) |
Set attribute permission
[in] | handle | Attribute handle |
[in] | perm | Attribute permission, |
[in] | ext_perm | Attribute extended permission, |
int in_ble_gatt_set_att_value | ( | void * | hdl, |
uint16_t | handle, | ||
uint16_t | length, | ||
uint8_t * | value, | ||
comp_cb | callback | ||
) |
Set attribute value
[in] | handle | Attribute handle |
[in] | length | Attribute value length |
[in] | value | Pointer to the attribute value |
int in_ble_gatt_set_svc_perm | ( | void * | hdl, |
uint16_t | start_hdl, | ||
uint8_t | perm, | ||
comp_cb | callback | ||
) |
Set service attribute permission
[in] | start_hdl | Service attribute handle |
[in] | perm | Service attribute permission, |
int in_ble_gatt_write | ( | void * | hdl, |
int | conidx, | ||
int | wrt_type, | ||
ble_gatt_write_t * | p_write, | ||
comp_cb | callback | ||
) |
Write Attribute.
[in] | conidx | Connection index |
[in] | wrt_type | Attribute write type, |
[in] | p_write | Pointer to attribute write paramters |
int in_ble_gatt_write_req_cfm | ( | void * | hdl, |
uint8_t | conidx, | ||
uint16_t | handle, | ||
uint8_t | status | ||
) |
Confirm attribute write reqeust
[in] | conidx | Connection index |
[in] | handle | Attribute handle |
[in] | status | Write status |