Exported Functions

group Prov_Client_Exported_Functions

Functions

T_CLIENT_ID prov_client_add(P_FUN_GENERAL_APP_CB app_cb)

register the client

参数:

app_cb -- [in] the callback function

返回:

client id

bool prov_client_handle_set(uint8_t conn_id, prov_handle_type_t type, uint16_t value)

set the handle of the client

参数:
  • conn_id -- [in] the connection id

  • type -- [in] the handle type

  • value -- [in] the handle value

返回:

the operation result

uint16_t prov_client_handle_get(uint8_t conn_id, prov_handle_type_t type)

get the handle of the client

参数:
  • conn_id -- [in] the connection id

  • type -- [in] the handle type

返回:

the handle value

bool prov_client_start_discovery(uint8_t conn_id)

start the service discovery

contains the service/characteristic/cccd declaration

参数:

conn_id -- [in] the connection id

返回:

the operation result

bool prov_client_read_by_handle(uint8_t conn_id, prov_read_type_t type)

read the server by handle

参数:
  • conn_id -- [in] the connection id

  • type -- [in] the read type

返回:

the operation result

bool prov_client_read_by_uuid(uint8_t conn_id, prov_read_type_t type)

read the server by uuid

参数:
  • conn_id -- [in] the connection id

  • type -- [in] the handle type

返回:

the operation result

bool prov_client_data_out_cccd_set(uint8_t conn_id, bool command)

write the cccd of the characteristic

参数:
  • conn_id -- [in] the connection id

  • command -- [in] the cccd value

返回:

the operation result

bool prov_client_data_in_write(uint8_t conn_id, uint8_t *pdata, uint16_t length)

write the characteristic

参数:
  • conn_id -- [in] the connection id

  • pdata -- [in] the data pointer

  • length -- [in] the data length

返回:

the operation result