Current Time Service module.
More...
Current Time Service module.
The Current Time Service exposes Current Time characteristic. It optionally exposes Local Time Information characteristic and Reference Time Information characteristic.
After cts_init_t variable is intialized, the application must call cts_service_init() to add Current Time Service and Current Time, Local Time Information and Reference Time Information characteristics to the BLE Stack database according to cts_init_t::char_mask.
◆ cts_c_data_parse()
void cts_c_data_parse |
( |
uint8_t * |
p_data, |
|
|
uint16_t |
length |
|
) |
| |
Data accepts data and processing functions.
- Parameters
-
[in] | p_data | Serial port data. |
[in] | length | Data length. |
◆ current_time_encode()
void current_time_encode |
( |
uint8_t * |
p_data, |
|
|
uint16_t |
length |
|
) |
| |
Serial port data is converted into current time.
- Parameters
-
[in] | p_data | Serial port data. |
[in] | length | Data length. |
◆ current_time_universal_decode()
Decode for a Current Time.
- Parameters
-
[in] | p_cfm | Pointer to GATT write attribute result description. |
[in] | p_evt | Pointer to CTS event. |
- Returns
- Result of data lenth.
◆ local_time_encode()
void local_time_encode |
( |
uint8_t * |
p_data, |
|
|
uint8_t |
length |
|
) |
| |
Serial port data is converted into local time.
- Parameters
-
[in] | p_data | Serial port data. |
[in] | length | Data length. |
◆ local_time_universal_decode()
Handle Local Time Information conversion.
- Parameters
-
[in] | p_cfm | Pointer to GATT write attribute result description. |
[in] | p_evt | Pointer to CTS event. |
- Returns
- Result of data lenth.
◆ reference_time_encode()
void reference_time_encode |
( |
uint8_t * |
p_data, |
|
|
uint16_t |
length |
|
) |
| |
Serial port data is converted into reference time.
- Parameters
-
[in] | p_data | Serial port data. |
[in] | length | Data length. |