![]() |
Bluetooth LE Profile API document
Bluetooth LE Profile API document Rev.1.00 [May 22, 2020]
|
This is the client for the Current Time Service Service. More...
This is the client for the Current Time Service Service.
Data Structures | |
struct | st_ble_ctc_cur_time_exact_time_256_t |
Current Time Exact Time 256 value structure. More... | |
struct | st_ble_ctc_cur_time_adjust_reason_t |
Current Time Adjust Reason value structure. More... | |
struct | st_ble_ctc_cur_time_t |
Current Time value structure. More... | |
struct | st_ble_ctc_cur_time_attr_hdl_t |
Current Time attribute handle value. More... | |
struct | st_ble_ctc_local_time_info_t |
Local Time Information value structure. More... | |
struct | st_ble_ctc_local_time_info_attr_hdl_t |
Local Time Information attribute handle value. More... | |
struct | st_ble_ctc_ref_time_info_t |
Reference Time Information value structure. More... | |
struct | st_ble_ctc_ref_time_info_attr_hdl_t |
Reference Time Information attribute handle value. More... | |
struct | st_ble_ctc_evt_data_t |
Current Time Service client event data. More... | |
Macros | |
#define | BLE_CTC_CUR_TIME_UUID (0x2A2B) |
#define | BLE_CTC_CUR_TIME_LEN (10) |
#define | BLE_CTC_CUR_TIME_CLI_CNFG_UUID (0x2902) |
#define | BLE_CTC_CUR_TIME_CLI_CNFG_LEN (2) |
#define | BLE_CTC_LOCAL_TIME_INFO_UUID (0x2A0F) |
#define | BLE_CTC_LOCAL_TIME_INFO_LEN (2) |
#define | BLE_CTC_REF_TIME_INFO_UUID (0x2A14) |
#define | BLE_CTC_REF_TIME_INFO_LEN (4) |
#define | BLE_CTC_DATA_FIELD_IGNORED_ERROR (BLE_ERR_GROUP_GATT | 0x80) |
The server ignored one or more fields. More... | |
Enumerations | |
enum | e_ble_ctc_local_time_info_daylight_saving_time_offset_t { BLE_CTC_LOCAL_TIME_INFO_DAYLIGHT_SAVING_TIME_OFFSET_STANDARD_TIME = 0, BLE_CTC_LOCAL_TIME_INFO_DAYLIGHT_SAVING_TIME_OFFSET_HALF_AN_HOUR_DAYLIGHT_TIME = 2, BLE_CTC_LOCAL_TIME_INFO_DAYLIGHT_SAVING_TIME_OFFSET_DAYLIGHT_TIME = 4, BLE_CTC_LOCAL_TIME_INFO_DAYLIGHT_SAVING_TIME_OFFSET_DOUBLE_DAYLIGHT_TIME = 8 } |
Local Time Information Daylight Saving Time Offset enumeration. More... | |
enum | e_ble_ctc_ref_time_info_source_t { BLE_CTC_REF_TIME_INFO_SOURCE_UNKNOWN = 0, BLE_CTC_REF_TIME_INFO_SOURCE_NETWORK_TIME_PROTOCOL = 1, BLE_CTC_REF_TIME_INFO_SOURCE_GPS = 2, BLE_CTC_REF_TIME_INFO_SOURCE_RADIO_TIME_SIGNAL = 3, BLE_CTC_REF_TIME_INFO_SOURCE_MANUAL = 4, BLE_CTC_REF_TIME_INFO_SOURCE_ATOMIC_CLOCK = 5, BLE_CTC_REF_TIME_INFO_SOURCE_CELLULAR_NETWORK = 6 } |
Reference Time Information Source enumeration. More... | |
enum | e_ble_ctc_char_idx_t { BLE_CTC_CUR_TIME_IDX, BLE_CTC_CUR_TIME_CLI_CNFG_IDX, BLE_CTC_LOCAL_TIME_INFO_IDX, BLE_CTC_REF_TIME_INFO_IDX } |
Current Time Service characteristic ID. More... | |
enum | e_ble_ctc_event_t { BLE_CTC_EVENT_CUR_TIME_READ_RSP = BLE_SERVC_ATTR_EVENT(BLE_CTC_CUR_TIME_IDX, BLE_SERVC_READ_RSP), BLE_CTC_EVENT_CUR_TIME_WRITE_RSP = BLE_SERVC_ATTR_EVENT(BLE_CTC_CUR_TIME_IDX, BLE_SERVC_WRITE_RSP), BLE_CTC_EVENT_CUR_TIME_HDL_VAL_NTF = BLE_SERVC_ATTR_EVENT(BLE_CTC_CUR_TIME_IDX, BLE_SERVC_HDL_VAL_IND), BLE_CTC_EVENT_CUR_TIME_CLI_CNFG_READ_RSP = BLE_SERVC_ATTR_EVENT(BLE_CTC_CUR_TIME_CLI_CNFG_IDX, BLE_SERVC_READ_RSP), BLE_CTC_EVENT_CUR_TIME_CLI_CNFG_WRITE_RSP = BLE_SERVC_ATTR_EVENT(BLE_CTC_CUR_TIME_CLI_CNFG_IDX, BLE_SERVC_WRITE_RSP), BLE_CTC_EVENT_LOCAL_TIME_INFO_READ_RSP = BLE_SERVC_ATTR_EVENT(BLE_CTC_LOCAL_TIME_INFO_IDX, BLE_SERVC_READ_RSP), BLE_CTC_EVENT_LOCAL_TIME_INFO_WRITE_RSP = BLE_SERVC_ATTR_EVENT(BLE_CTC_LOCAL_TIME_INFO_IDX, BLE_SERVC_WRITE_RSP), BLE_CTC_EVENT_REF_TIME_INFO_READ_RSP = BLE_SERVC_ATTR_EVENT(BLE_CTC_REF_TIME_INFO_IDX, BLE_SERVC_READ_RSP) } |
Current Time Service client event type. More... | |
Functions | |
ble_status_t | R_BLE_CTC_ReadCurTimeCliCnfg (uint16_t conn_hdl) |
Read Current Time characteristic Client Characteristic Configuration descriptor value from the remote GATT database. More... | |
ble_status_t | R_BLE_CTC_WriteCurTimeCliCnfg (uint16_t conn_hdl, const uint16_t *p_value) |
Write Current Time characteristic Client Characteristic Configuration descriptor value to remote GATT database. More... | |
ble_status_t | R_BLE_CTC_ReadCurTime (uint16_t conn_hdl) |
Read Current Time characteristic value from the remote GATT database. More... | |
ble_status_t | R_BLE_CTC_WriteCurTime (uint16_t conn_hdl, const st_ble_ctc_cur_time_t *p_value) |
Write Current Time characteristic value to remote GATT database. More... | |
void | R_BLE_CTC_GetCurTimeAttrHdl (const st_ble_dev_addr_t *p_addr, st_ble_ctc_cur_time_attr_hdl_t *p_hdl) |
Get Current Time attribute handles. More... | |
ble_status_t | R_BLE_CTC_ReadLocalTimeInfo (uint16_t conn_hdl) |
Read Local Time Information characteristic value from the remote GATT database. More... | |
ble_status_t | R_BLE_CTC_WriteLocalTimeInfo (uint16_t conn_hdl, const st_ble_ctc_local_time_info_t *p_value) |
Write Local Time Information characteristic value to remote GATT database. More... | |
void | R_BLE_CTC_GetLocalTimeInfoAttrHdl (const st_ble_dev_addr_t *p_addr, st_ble_ctc_local_time_info_attr_hdl_t *p_hdl) |
Get Local Time Information attribute handles. More... | |
ble_status_t | R_BLE_CTC_ReadRefTimeInfo (uint16_t conn_hdl) |
Read Reference Time Information characteristic value from the remote GATT database. More... | |
void | R_BLE_CTC_GetRefTimeInfoAttrHdl (const st_ble_dev_addr_t *p_addr, st_ble_ctc_ref_time_info_attr_hdl_t *p_hdl) |
Get Reference Time Information attribute handles. More... | |
ble_status_t | R_BLE_CTC_Init (ble_servc_app_cb_t cb) |
Initialize Current Time Service client. More... | |
void | R_BLE_CTC_ServDiscCb (uint16_t conn_hdl, uint8_t serv_idx, uint16_t type, void *p_param) |
Current Time Service client discovery callback. More... | |
void | R_BLE_CTC_GetServAttrHdl (const st_ble_dev_addr_t *p_addr, st_ble_gatt_hdl_range_t *p_hdl) |
Get Current Time Service client attribute handle. More... | |
#define BLE_CTC_DATA_FIELD_IGNORED_ERROR (BLE_ERR_GROUP_GATT | 0x80) |
The server ignored one or more fields.
Local Time Information Daylight Saving Time Offset enumeration.
Reference Time Information Source enumeration.
enum e_ble_ctc_char_idx_t |
Current Time Service characteristic ID.
enum e_ble_ctc_event_t |
Current Time Service client event type.
ble_status_t R_BLE_CTC_ReadCurTimeCliCnfg | ( | uint16_t | conn_hdl | ) |
Read Current Time characteristic Client Characteristic Configuration descriptor value from the remote GATT database.
[in] | conn_hdl | Connection handle. |
ble_status_t R_BLE_CTC_WriteCurTimeCliCnfg | ( | uint16_t | conn_hdl, |
const uint16_t * | p_value | ||
) |
Write Current Time characteristic Client Characteristic Configuration descriptor value to remote GATT database.
[in] | conn_hdl | Connection handle. |
[in] | p_value | Current Time characteristic Client Characteristic Configuration descriptor value to write. |
ble_status_t R_BLE_CTC_ReadCurTime | ( | uint16_t | conn_hdl | ) |
Read Current Time characteristic value from the remote GATT database.
[in] | conn_hdl | Connection handle. |
ble_status_t R_BLE_CTC_WriteCurTime | ( | uint16_t | conn_hdl, |
const st_ble_ctc_cur_time_t * | p_value | ||
) |
Write Current Time characteristic value to remote GATT database.
[in] | conn_hdl | Connection handle. |
[in] | p_value | Current Time characteristic value to write. |
void R_BLE_CTC_GetCurTimeAttrHdl | ( | const st_ble_dev_addr_t * | p_addr, |
st_ble_ctc_cur_time_attr_hdl_t * | p_hdl | ||
) |
Get Current Time attribute handles.
[in] | p_addr | Bluetooth device address for the attribute handles. |
[out] | p_hdl | The pointer to store the retrieved attribute handles. |
ble_status_t R_BLE_CTC_ReadLocalTimeInfo | ( | uint16_t | conn_hdl | ) |
Read Local Time Information characteristic value from the remote GATT database.
[in] | conn_hdl | Connection handle. |
ble_status_t R_BLE_CTC_WriteLocalTimeInfo | ( | uint16_t | conn_hdl, |
const st_ble_ctc_local_time_info_t * | p_value | ||
) |
Write Local Time Information characteristic value to remote GATT database.
[in] | conn_hdl | Connection handle. |
[in] | p_value | Local Time Information characteristic value to write. |
void R_BLE_CTC_GetLocalTimeInfoAttrHdl | ( | const st_ble_dev_addr_t * | p_addr, |
st_ble_ctc_local_time_info_attr_hdl_t * | p_hdl | ||
) |
Get Local Time Information attribute handles.
[in] | p_addr | Bluetooth device address for the attribute handles. |
[out] | p_hdl | The pointer to store the retrieved attribute handles. |
ble_status_t R_BLE_CTC_ReadRefTimeInfo | ( | uint16_t | conn_hdl | ) |
Read Reference Time Information characteristic value from the remote GATT database.
[in] | conn_hdl | Connection handle. |
void R_BLE_CTC_GetRefTimeInfoAttrHdl | ( | const st_ble_dev_addr_t * | p_addr, |
st_ble_ctc_ref_time_info_attr_hdl_t * | p_hdl | ||
) |
Get Reference Time Information attribute handles.
[in] | p_addr | Bluetooth device address for the attribute handles. |
[out] | p_hdl | The pointer to store the retrieved attribute handles. |
ble_status_t R_BLE_CTC_Init | ( | ble_servc_app_cb_t | cb | ) |
void R_BLE_CTC_ServDiscCb | ( | uint16_t | conn_hdl, |
uint8_t | serv_idx, | ||
uint16_t | type, | ||
void * | p_param | ||
) |
Current Time Service client discovery callback.
[in] | conn_hdl | Connection handle |
[in] | serv_idx | Service instance index. |
[in] | type | Service discovery event type. |
[in] | p_param | Service discovery event parameter. |
void R_BLE_CTC_GetServAttrHdl | ( | const st_ble_dev_addr_t * | p_addr, |
st_ble_gatt_hdl_range_t * | p_hdl | ||
) |
Get Current Time Service client attribute handle.
[in] | p_addr | Bluetooth device address for the attribute handles. |
[out] | p_hdl | The pointer to store the retrieved attribute handles. |