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.
16263
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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.
16274
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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.
16293
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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.
16318
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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.
16339
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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.
16356
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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.
16372
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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.
16389
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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.
16403
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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.
16424
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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.
16446
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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.
16467
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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.
16481
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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
16106
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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
16107
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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
16108
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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
16109
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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
16110
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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
16111
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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
16112
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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
16113
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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
16114
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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
16115
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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
16116
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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
16117
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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
16118
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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
16119
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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
16120
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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
16121
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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
16122
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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
16123
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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
16124
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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
16125
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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
16126
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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
16127
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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
16128
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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
16129
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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
16130
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/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
16131
of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h