![]() |
Bluetooth LE Profile API document
Bluetooth LE Profile API document Rev.1.00 [May 22, 2020]
|
This service defines how the current time can be exposed using the Generic Attribute Profile (GATT). More...
This service defines how the current time can be exposed using the Generic Attribute Profile (GATT).
Data Structures | |
struct | st_ble_cts_cur_time_exact_time_256_t |
Current Time Exact Time 256 value structure. More... | |
struct | st_ble_cts_cur_time_adjust_reason_t |
Current Time Adjust Reason value structure. More... | |
struct | st_ble_cts_cur_time_t |
Current Time value structure. More... | |
struct | st_ble_cts_local_time_info_t |
Local Time Information value structure. More... | |
struct | st_ble_cts_ref_time_info_t |
Reference Time Information value structure. More... | |
Macros | |
#define | BLE_CTS_DATA_FIELD_IGNORED_ERROR (BLE_ERR_GROUP_GATT | 0x80) |
The server ignored one or more fields. More... | |
Enumerations | |
enum | e_ble_cts_local_time_info_daylight_saving_time_offset_t { BLE_CTS_LOCAL_TIME_INFO_DAYLIGHT_SAVING_TIME_OFFSET_STANDARD_TIME = 0, BLE_CTS_LOCAL_TIME_INFO_DAYLIGHT_SAVING_TIME_OFFSET_HALF_AN_HOUR_DAYLIGHT_TIME = 2, BLE_CTS_LOCAL_TIME_INFO_DAYLIGHT_SAVING_TIME_OFFSET_DAYLIGHT_TIME = 4, BLE_CTS_LOCAL_TIME_INFO_DAYLIGHT_SAVING_TIME_OFFSET_DOUBLE_DAYLIGHT_TIME = 8 } |
Local Time Information Daylight Saving Time Offset enumeration. More... | |
enum | e_ble_cts_ref_time_info_source_t { BLE_CTS_REF_TIME_INFO_SOURCE_UNKNOWN = 0, BLE_CTS_REF_TIME_INFO_SOURCE_NETWORK_TIME_PROTOCOL = 1, BLE_CTS_REF_TIME_INFO_SOURCE_GPS = 2, BLE_CTS_REF_TIME_INFO_SOURCE_RADIO_TIME_SIGNAL = 3, BLE_CTS_REF_TIME_INFO_SOURCE_MANUAL = 4, BLE_CTS_REF_TIME_INFO_SOURCE_ATOMIC_CLOCK = 5, BLE_CTS_REF_TIME_INFO_SOURCE_CELLULAR_NETWORK = 6 } |
Reference Time Information Source enumeration. More... | |
enum | e_ble_cts_char_idx_t { BLE_CTS_CUR_TIME_IDX, BLE_CTS_CUR_TIME_CLI_CNFG_IDX, BLE_CTS_LOCAL_TIME_INFO_IDX, BLE_CTS_REF_TIME_INFO_IDX } |
Current Time Service characteristic Index. More... | |
enum | e_ble_cts_event_t { BLE_CTS_EVENT_CUR_TIME_WRITE_REQ = BLE_SERVS_ATTR_EVENT(BLE_CTS_CUR_TIME_IDX, BLE_SERVS_WRITE_REQ), BLE_CTS_EVENT_CUR_TIME_WRITE_COMP = BLE_SERVS_ATTR_EVENT(BLE_CTS_CUR_TIME_IDX, BLE_SERVS_WRITE_COMP), BLE_CTS_EVENT_CUR_TIME_READ_REQ = BLE_SERVS_ATTR_EVENT(BLE_CTS_CUR_TIME_IDX, BLE_SERVS_READ_REQ), BLE_CTS_EVENT_CUR_TIME_CLI_CNFG_WRITE_REQ = BLE_SERVS_ATTR_EVENT(BLE_CTS_CUR_TIME_CLI_CNFG_IDX, BLE_SERVS_WRITE_REQ), BLE_CTS_EVENT_CUR_TIME_CLI_CNFG_WRITE_COMP = BLE_SERVS_ATTR_EVENT(BLE_CTS_CUR_TIME_CLI_CNFG_IDX, BLE_SERVS_WRITE_COMP), BLE_CTS_EVENT_CUR_TIME_CLI_CNFG_READ_REQ = BLE_SERVS_ATTR_EVENT(BLE_CTS_CUR_TIME_CLI_CNFG_IDX, BLE_SERVS_READ_REQ), BLE_CTS_EVENT_LOCAL_TIME_INFO_WRITE_REQ = BLE_SERVS_ATTR_EVENT(BLE_CTS_LOCAL_TIME_INFO_IDX, BLE_SERVS_WRITE_REQ), BLE_CTS_EVENT_LOCAL_TIME_INFO_WRITE_COMP = BLE_SERVS_ATTR_EVENT(BLE_CTS_LOCAL_TIME_INFO_IDX, BLE_SERVS_WRITE_COMP), BLE_CTS_EVENT_LOCAL_TIME_INFO_READ_REQ = BLE_SERVS_ATTR_EVENT(BLE_CTS_LOCAL_TIME_INFO_IDX, BLE_SERVS_READ_REQ), BLE_CTS_EVENT_REF_TIME_INFO_READ_REQ = BLE_SERVS_ATTR_EVENT(BLE_CTS_REF_TIME_INFO_IDX, BLE_SERVS_READ_REQ) } |
Current Time Service event type. More... | |
Functions | |
ble_status_t | R_BLE_CTS_SetCurTime (const st_ble_cts_cur_time_t *p_value) |
Set Current Time characteristic value to the local GATT database. More... | |
ble_status_t | R_BLE_CTS_GetCurTime (st_ble_cts_cur_time_t *p_value) |
Get Current Time characteristic value from the local GATT database. More... | |
ble_status_t | R_BLE_CTS_NotifyCurTime (uint16_t conn_hdl, const st_ble_cts_cur_time_t *p_value) |
Send notification of Current Time characteristic value to the remote device. More... | |
ble_status_t | R_BLE_CTS_SetCurTimeCliCnfg (const uint16_t *p_value) |
Set Current Time cli cnfg descriptor value to the local GATT database. More... | |
ble_status_t | R_BLE_CTS_GetCurTimeCliCnfg (uint16_t *p_value) |
Get Current Time cli cnfg descriptor value from the local GATT database. More... | |
ble_status_t | R_BLE_CTS_SetLocalTimeInfo (const st_ble_cts_local_time_info_t *p_value) |
Set Local Time Information characteristic value to the local GATT database. More... | |
ble_status_t | R_BLE_CTS_GetLocalTimeInfo (st_ble_cts_local_time_info_t *p_value) |
Get Local Time Information characteristic value from the local GATT database. More... | |
ble_status_t | R_BLE_CTS_SetRefTimeInfo (const st_ble_cts_ref_time_info_t *p_value) |
Set Reference Time Information characteristic value to the local GATT database. More... | |
ble_status_t | R_BLE_CTS_GetRefTimeInfo (st_ble_cts_ref_time_info_t *p_value) |
Get Reference Time Information characteristic value from the local GATT database. More... | |
ble_status_t | R_BLE_CTS_Init (ble_servs_app_cb_t cb) |
Initialize Current Time Service service. More... | |
#define BLE_CTS_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_cts_char_idx_t |
Current Time Service characteristic Index.
enum e_ble_cts_event_t |
Current Time Service event type.
ble_status_t R_BLE_CTS_SetCurTime | ( | const st_ble_cts_cur_time_t * | p_value | ) |
Set Current Time characteristic value to the local GATT database.
[in] | p_value | Characteristic value to set. |
ble_status_t R_BLE_CTS_GetCurTime | ( | st_ble_cts_cur_time_t * | p_value | ) |
Get Current Time characteristic value from the local GATT database.
[in] | p_value | Output location for the acquired descriptor value. |
ble_status_t R_BLE_CTS_NotifyCurTime | ( | uint16_t | conn_hdl, |
const st_ble_cts_cur_time_t * | p_value | ||
) |
Send notification of Current Time characteristic value to the remote device.
[in] | conn_hdl | Connection handle. |
[in] | p_value | Characteristic value to send. |
ble_status_t R_BLE_CTS_SetCurTimeCliCnfg | ( | const uint16_t * | p_value | ) |
Set Current Time cli cnfg descriptor value to the local GATT database.
[in] | p_value | Descriptor value to set. |
ble_status_t R_BLE_CTS_GetCurTimeCliCnfg | ( | uint16_t * | p_value | ) |
Get Current Time cli cnfg descriptor value from the local GATT database.
[in] | p_value | Output location for the acquired descriptor value. |
ble_status_t R_BLE_CTS_SetLocalTimeInfo | ( | const st_ble_cts_local_time_info_t * | p_value | ) |
Set Local Time Information characteristic value to the local GATT database.
[in] | p_value | Characteristic value to set. |
ble_status_t R_BLE_CTS_GetLocalTimeInfo | ( | st_ble_cts_local_time_info_t * | p_value | ) |
Get Local Time Information characteristic value from the local GATT database.
[in] | p_value | Output location for the acquired descriptor value. |
ble_status_t R_BLE_CTS_SetRefTimeInfo | ( | const st_ble_cts_ref_time_info_t * | p_value | ) |
Set Reference Time Information characteristic value to the local GATT database.
[in] | p_value | Characteristic value to set. |
ble_status_t R_BLE_CTS_GetRefTimeInfo | ( | st_ble_cts_ref_time_info_t * | p_value | ) |
Get Reference Time Information characteristic value from the local GATT database.
[in] | p_value | Output location for the acquired descriptor value. |
ble_status_t R_BLE_CTS_Init | ( | ble_servs_app_cb_t | cb | ) |