Bluetooth Mesh Time Server Model#
Bluetooth Mesh Time Server Model.
This class provides the commands and messages to interface with the Time Server model
Modules#
sl_btmesh_evt_time_server_time_updated
sl_btmesh_evt_time_server_time_zone_offset_updated
sl_btmesh_evt_time_server_tai_utc_delta_updated
sl_btmesh_evt_time_server_time_role_updated
Functions#
Macros#
Function Documentation#
sl_btmesh_time_server_init#
sl_status_t sl_btmesh_time_server_init (uint16_t elem_index)
[in] | elem_index | Server model element index |
Initializes the Time Server model
Returns
SL_STATUS_OK if successful. Error code otherwise.
16341
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_time_server_deinit#
sl_status_t sl_btmesh_time_server_deinit (uint16_t elem_index)
[in] | elem_index | Server model element index |
Deinitialize the Time Server model
Returns
SL_STATUS_OK if successful. Error code otherwise.
16352
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_time_server_get_time#
sl_status_t sl_btmesh_time_server_get_time (uint16_t elem_index, uint64_t * tai_seconds, uint8_t * subsecond, uint8_t * uncertainty, uint8_t * time_authority, int16_t * time_zone_offset, int32_t * tai_utc_delta)
[in] | elem_index | Server model element index |
[out] | tai_seconds | The current TAI time in seconds |
[out] | subsecond | The sub-second time in units of 1/256th second |
[out] | uncertainty | The estimated uncertainty in 10 millisecond steps |
[out] | time_authority | 0 = No Time Authority, 1 = Time Authority |
[out] | time_zone_offset | Current local time zone offset. Range is -64 to 191, representing -16 to 47.75 hours. |
[out] | tai_utc_delta | Current difference between TAI and UTC in seconds. Range is -255 to 32512. |
Get the current time from Time Server
Returns
SL_STATUS_OK if successful. Error code otherwise.
16371
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_time_server_set_time#
sl_status_t sl_btmesh_time_server_set_time (uint16_t elem_index, uint64_t tai_seconds, uint8_t subsecond, uint8_t uncertainty, uint8_t time_authority, int16_t time_zone_offset, int32_t tai_utc_delta)
[in] | elem_index | Server model element index |
[in] | tai_seconds | The current TAI time in seconds |
[in] | subsecond | The sub-second time in units of 1/256th second |
[in] | uncertainty | The estimated uncertainty in 10 millisecond steps |
[in] | time_authority | 0 = No Time Authority, 1 = Time Authority |
[in] | time_zone_offset | Current local time zone offset. Range is -64 to 191, representing -16 to 47.75 hours. |
[in] | tai_utc_delta | Current difference between TAI and UTC in seconds. Range is -255 to 32512. |
Set the current time for the element.
Returns
SL_STATUS_OK if successful. Error code otherwise.
16396
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_time_server_get_time_zone_offset_new#
sl_status_t sl_btmesh_time_server_get_time_zone_offset_new (uint16_t elem_index, int16_t * new_offset, uint64_t * tai_of_zone_change)
[in] | elem_index | Server model element index |
[out] | new_offset | Upcoming local time zone offset. Range is -64 to 191, representing -16 to 47.75 hours. |
[out] | tai_of_zone_change | Absolute TAI time when the Time Zone Offset will change from Current to New |
Get the upcoming time zone offset from Time Server
Returns
SL_STATUS_OK if successful. Error code otherwise.
16417
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_time_server_set_time_zone_offset_new#
sl_status_t sl_btmesh_time_server_set_time_zone_offset_new (uint16_t elem_index, int16_t new_offset, uint64_t tai_of_zone_change)
[in] | elem_index | Server model element index |
[in] | new_offset | Upcoming local time zone offset. Range is -64 to 191, representing -16 to 47.75 hours. |
[in] | tai_of_zone_change | Absolute TAI time when the Time Zone Offset will change from Current to New |
Set the upcoming time zone offset for the element
Returns
SL_STATUS_OK if successful. Error code otherwise.
16434
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_time_server_get_tai_utc_delta_new#
sl_status_t sl_btmesh_time_server_get_tai_utc_delta_new (uint16_t elem_index, int32_t * new_delta, uint64_t * tai_of_delta_change)
[in] | elem_index | Server model element index |
[out] | new_delta | Upcoming difference between TAI and UTC in seconds |
[out] | tai_of_delta_change | Absolute TAI time when the TAI-UTC Delta will change from Current to New |
Get the upcoming TAI-UTC delta for the element
Returns
SL_STATUS_OK if successful. Error code otherwise.
16450
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_time_server_set_tai_utc_delta_new#
sl_status_t sl_btmesh_time_server_set_tai_utc_delta_new (uint16_t elem_index, int32_t new_delta, uint64_t tai_of_delta_change)
[in] | elem_index | Server model element index |
[in] | new_delta | Upcoming difference between TAI and UTC in seconds. Range is -255 to 32512. |
[in] | tai_of_delta_change | Absolute TAI time when the TAI-UTC Delta will change from Current to New |
Set the upcoming TAI-UTC delta for the element
Returns
SL_STATUS_OK if successful. Error code otherwise.
16467
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_time_server_get_time_role#
sl_status_t sl_btmesh_time_server_get_time_role (uint16_t elem_index, uint8_t * time_role)
[in] | elem_index | Server model element index |
[out] | time_role | Time Role of the element |
Get Time Role for the element
Returns
SL_STATUS_OK if successful. Error code otherwise.
16481
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_time_server_set_time_role#
sl_status_t sl_btmesh_time_server_set_time_role (uint16_t elem_index, uint8_t time_role)
[in] | elem_index | Server model element index |
[in] | time_role | Time Role of the element. Range is 0 to 3.
|
Set Time Role for the element
Returns
SL_STATUS_OK if successful. Error code otherwise.
16502
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_time_server_get_datetime#
sl_status_t sl_btmesh_time_server_get_datetime (uint16_t elem_index, uint16_t * year, uint8_t * month, uint8_t * day, uint8_t * hour, uint8_t * min, uint8_t * sec, uint16_t * ms, int16_t * timezone, uint8_t * day_of_week)
[in] | elem_index | Server model element index |
[out] | year | Year |
[out] | month | Month |
[out] | day | Day |
[out] | hour | Hour |
[out] | min | Minutes |
[out] | sec | Seconds |
[out] | ms | Milliseconds |
[out] | timezone | Local time zone offset. Range is -64 to 191, representing -16 to 47.75 hours. |
[out] | day_of_week | Day of week, 0..6 represents Monday to Sunday |
Return the date and time from the Time Server
Returns
SL_STATUS_OK if successful. Error code otherwise.
16524
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_time_server_publish#
sl_status_t sl_btmesh_time_server_publish (uint16_t elem_index)
[in] | elem_index | Element index of the Time Server |
Publish Time Status containing the current time. Permitted only for Time Server having the role of Time Authority.
Returns
SL_STATUS_OK if successful. Error code otherwise.
16545
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_time_server_status#
sl_status_t sl_btmesh_time_server_status (uint16_t destination_address, uint16_t elem_index, uint16_t appkey_index)
[in] | destination_address | Destination address |
[in] | elem_index | Element index of the Time Server |
[in] | appkey_index | The application key index to use |
Send a Time Status message containing the current time as an unsolicited message. Permitted only for Time Server having the role of Time Authority.
Returns
SL_STATUS_OK if successful. Error code otherwise.
16559
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
Macro Definition Documentation#
sl_btmesh_cmd_time_server_init_id#
#define sl_btmesh_cmd_time_server_init_idValue:
0x00520028
16184
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_cmd_time_server_deinit_id#
#define sl_btmesh_cmd_time_server_deinit_idValue:
0x01520028
16185
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_cmd_time_server_get_time_id#
#define sl_btmesh_cmd_time_server_get_time_idValue:
0x02520028
16186
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_cmd_time_server_set_time_id#
#define sl_btmesh_cmd_time_server_set_time_idValue:
0x03520028
16187
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_cmd_time_server_get_time_zone_offset_new_id#
#define sl_btmesh_cmd_time_server_get_time_zone_offset_new_idValue:
0x04520028
16188
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_cmd_time_server_set_time_zone_offset_new_id#
#define sl_btmesh_cmd_time_server_set_time_zone_offset_new_idValue:
0x05520028
16189
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_cmd_time_server_get_tai_utc_delta_new_id#
#define sl_btmesh_cmd_time_server_get_tai_utc_delta_new_idValue:
0x06520028
16190
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_cmd_time_server_set_tai_utc_delta_new_id#
#define sl_btmesh_cmd_time_server_set_tai_utc_delta_new_idValue:
0x07520028
16191
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_cmd_time_server_get_time_role_id#
#define sl_btmesh_cmd_time_server_get_time_role_idValue:
0x08520028
16192
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_cmd_time_server_set_time_role_id#
#define sl_btmesh_cmd_time_server_set_time_role_idValue:
0x09520028
16193
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_cmd_time_server_get_datetime_id#
#define sl_btmesh_cmd_time_server_get_datetime_idValue:
0x0a520028
16194
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_cmd_time_server_publish_id#
#define sl_btmesh_cmd_time_server_publish_idValue:
0x0b520028
16195
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_cmd_time_server_status_id#
#define sl_btmesh_cmd_time_server_status_idValue:
0x0c520028
16196
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_time_server_init_id#
#define sl_btmesh_rsp_time_server_init_idValue:
0x00520028
16197
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_time_server_deinit_id#
#define sl_btmesh_rsp_time_server_deinit_idValue:
0x01520028
16198
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_time_server_get_time_id#
#define sl_btmesh_rsp_time_server_get_time_idValue:
0x02520028
16199
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_time_server_set_time_id#
#define sl_btmesh_rsp_time_server_set_time_idValue:
0x03520028
16200
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_time_server_get_time_zone_offset_new_id#
#define sl_btmesh_rsp_time_server_get_time_zone_offset_new_idValue:
0x04520028
16201
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_time_server_set_time_zone_offset_new_id#
#define sl_btmesh_rsp_time_server_set_time_zone_offset_new_idValue:
0x05520028
16202
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_time_server_get_tai_utc_delta_new_id#
#define sl_btmesh_rsp_time_server_get_tai_utc_delta_new_idValue:
0x06520028
16203
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_time_server_set_tai_utc_delta_new_id#
#define sl_btmesh_rsp_time_server_set_tai_utc_delta_new_idValue:
0x07520028
16204
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_time_server_get_time_role_id#
#define sl_btmesh_rsp_time_server_get_time_role_idValue:
0x08520028
16205
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_time_server_set_time_role_id#
#define sl_btmesh_rsp_time_server_set_time_role_idValue:
0x09520028
16206
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_time_server_get_datetime_id#
#define sl_btmesh_rsp_time_server_get_datetime_idValue:
0x0a520028
16207
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_time_server_publish_id#
#define sl_btmesh_rsp_time_server_publish_idValue:
0x0b520028
16208
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_time_server_status_id#
#define sl_btmesh_rsp_time_server_status_idValue:
0x0c520028
16209
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h