Bluetooth Mesh Time Client Model#

Bluetooth Mesh Time Client Model.

This class provides the commands and messages to interface with the Time Client model

Modules#

sl_btmesh_evt_time_client_time_status

sl_btmesh_evt_time_client_time_zone_status

sl_btmesh_evt_time_client_tai_utc_delta_status

sl_btmesh_evt_time_client_time_role_status

Enumerations#

enum
sl_btmesh_time_client_time_role_none = 0x0
sl_btmesh_time_client_time_role_authority = 0x1
sl_btmesh_time_client_time_role_relay = 0x2
sl_btmesh_time_client_time_role_client = 0x3
}

These values define the Time Role types used by the stack.

Functions#

sl_status_t
sl_btmesh_time_client_init(uint16_t elem_index)
sl_status_t
sl_btmesh_time_client_deinit(uint16_t elem_index)
sl_status_t
sl_btmesh_time_client_get_time(uint16_t server_address, uint16_t elem_index, uint16_t appkey_index)
sl_status_t
sl_btmesh_time_client_set_time(uint16_t server_address, uint16_t elem_index, uint16_t appkey_index, uint64_t tai_seconds, uint8_t subsecond, uint8_t uncertainty, uint8_t time_authority, int32_t tai_utc_delta, int16_t time_zone_offset)
sl_status_t
sl_btmesh_time_client_get_time_zone(uint16_t server_address, uint16_t elem_index, uint16_t appkey_index)
sl_status_t
sl_btmesh_time_client_set_time_zone(uint16_t server_address, uint16_t elem_index, uint16_t appkey_index, int16_t time_zone_offset_new, uint64_t tai_of_zone_change)
sl_status_t
sl_btmesh_time_client_get_tai_utc_delta(uint16_t server_address, uint16_t elem_index, uint16_t appkey_index)
sl_status_t
sl_btmesh_time_client_set_tai_utc_delta(uint16_t server_address, uint16_t elem_index, uint16_t appkey_index, int32_t tai_utc_delta_new, uint64_t tai_of_delta_change)
sl_status_t
sl_btmesh_time_client_get_time_role(uint16_t server_address, uint16_t elem_index, uint16_t appkey_index)
sl_status_t
sl_btmesh_time_client_set_time_role(uint16_t server_address, uint16_t elem_index, uint16_t appkey_index, uint8_t time_role)

Enumeration Documentation#

sl_btmesh_time_client_time_roles_t#

sl_btmesh_time_client_time_roles_t

These values define the Time Role types used by the stack.

Enumerator
sl_btmesh_time_client_time_role_none

(0x0) The element does not participate in propagation of time information.

sl_btmesh_time_client_time_role_authority

(0x1) The element publishes Time Status messages but does not process received Time Status messages.

sl_btmesh_time_client_time_role_relay

(0x2) The element processes received and publishes Time Status messages.

sl_btmesh_time_client_time_role_client

(0x3) The element does not publish but processes received Time Status messages.


Definition at line 16522 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

Function Documentation#

sl_btmesh_time_client_init#

sl_status_t sl_btmesh_time_client_init (uint16_t elem_index)
Parameters
[in]elem_index

Client model element index

Initialize the Time Client model

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 16678 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_time_client_deinit#

sl_status_t sl_btmesh_time_client_deinit (uint16_t elem_index)
Parameters
[in]elem_index

Client model element index

Deinitialize the Time Client model

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


Definition at line 16689 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_time_client_get_time#

sl_status_t sl_btmesh_time_client_get_time (uint16_t server_address, uint16_t elem_index, uint16_t appkey_index)
Parameters
[in]server_address

Destination server model address

[in]elem_index

Client model element index

[in]appkey_index

The application key index to use.

Send a Time Get message to Time Server

Returns

  • SL_STATUS_OK if successful. Error code otherwise.

Events


Definition at line 16705 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_time_client_set_time#

sl_status_t sl_btmesh_time_client_set_time (uint16_t server_address, uint16_t elem_index, uint16_t appkey_index, uint64_t tai_seconds, uint8_t subsecond, uint8_t uncertainty, uint8_t time_authority, int32_t tai_utc_delta, int16_t time_zone_offset)
Parameters
[in]server_address

Destination server model address

[in]elem_index

Client model element index

[in]appkey_index

The application key index to use.

[in]tai_seconds

The current TAI time in seconds since the epoch, 40-bit value

[in]subsecond

The sub-second in units of 1/256th second. Range is 0-255.

[in]uncertainty

The estimated uncertainty in 10-milliseconds steps. Range is 0-255, representing up to 2.55 seconds.

[in]time_authority

0: No Time Authority, the element does not have a trusted source of time such as GPS or NTP. 1: Time Authority, the element has a trusted source of time or a battery-backed properly initialized RTC. Other values are prohibited.

[in]tai_utc_delta

Current difference between TAI and UTC in seconds. Range is -255 to 32512.

[in]time_zone_offset

The local time zone offset in 15-minute increments. Range is -64 to 191, representing -16 to 47.75 hours.

Send a Time Set message to Time Server

Returns

  • SL_STATUS_OK if successful. Error code otherwise.

Events


Definition at line 16737 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_time_client_get_time_zone#

sl_status_t sl_btmesh_time_client_get_time_zone (uint16_t server_address, uint16_t elem_index, uint16_t appkey_index)
Parameters
[in]server_address

Destination server model address

[in]elem_index

Client model element index

[in]appkey_index

The application key index to use.

Send a Time Zone Get message to Time Server

Returns

  • SL_STATUS_OK if successful. Error code otherwise.

Events


Definition at line 16761 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_time_client_set_time_zone#

sl_status_t sl_btmesh_time_client_set_time_zone (uint16_t server_address, uint16_t elem_index, uint16_t appkey_index, int16_t time_zone_offset_new, uint64_t tai_of_zone_change)
Parameters
[in]server_address

Destination server model address

[in]elem_index

Client model element index

[in]appkey_index

The application key index to use.

[in]time_zone_offset_new

Upcoming local time zone offset. Range is -64 to 191, representing -16 to 47.75 hours.

[in]tai_of_zone_change

TAI Seconds time of upcoming Time Zone offset change

Send a Time Zone Set message to Time Server to set the Time Zone New state

Returns

  • SL_STATUS_OK if successful. Error code otherwise.

Events


Definition at line 16783 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_time_client_get_tai_utc_delta#

sl_status_t sl_btmesh_time_client_get_tai_utc_delta (uint16_t server_address, uint16_t elem_index, uint16_t appkey_index)
Parameters
[in]server_address

Destination server model address

[in]elem_index

Client model element index

[in]appkey_index

The application key index to use.

Send a TAI-UTC Delta Get message to Time Server

Returns

  • SL_STATUS_OK if successful. Error code otherwise.

Events


Definition at line 16803 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_time_client_set_tai_utc_delta#

sl_status_t sl_btmesh_time_client_set_tai_utc_delta (uint16_t server_address, uint16_t elem_index, uint16_t appkey_index, int32_t tai_utc_delta_new, uint64_t tai_of_delta_change)
Parameters
[in]server_address

Destination server model address

[in]elem_index

Client model element index

[in]appkey_index

The application key index to use.

[in]tai_utc_delta_new

Upcoming difference between TAI and UTC is seconds. Range is -255 to 32512.

[in]tai_of_delta_change

TAI Seconds time of the upcoming TAI-UTC Delta change

Send a TAI-UTC Delta Set message to Time Server, which responds with a TAI-UTC Delta Status message.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.

Events


Definition at line 16826 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_time_client_get_time_role#

sl_status_t sl_btmesh_time_client_get_time_role (uint16_t server_address, uint16_t elem_index, uint16_t appkey_index)
Parameters
[in]server_address

Destination server model address

[in]elem_index

Client model element index

[in]appkey_index

The application key index to use.

Send a Time Role Get message to Time Server, which responds with a Time Role Status message.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.

Events


Definition at line 16847 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_time_client_set_time_role#

sl_status_t sl_btmesh_time_client_set_time_role (uint16_t server_address, uint16_t elem_index, uint16_t appkey_index, uint8_t time_role)
Parameters
[in]server_address

Destination server model address

[in]elem_index

Client model element index

[in]appkey_index

The application key index to use.

[in]time_role

The Time Role for the element. Range is 0 to 3.

  • 0 = Time Role None, The element does not participate in propagation of time information.

  • 1 = Time Role Authority, The element publishes Time Status messages but does not process received Time Status messages.

  • 2 = Time Role Relay, The element processes received and publishes Time Status messages.

  • 3 = Time Role Client, The element does not publish but processes received Time Status messages.

Send Time Role Set message to Time Server, which responds with a Time Role Status message.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.

Events


Definition at line 16875 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_client_init_id#

#define sl_btmesh_cmd_time_client_init_id
Value:
0x00530028

Definition at line 16498 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_cmd_time_client_deinit_id#

#define sl_btmesh_cmd_time_client_deinit_id
Value:
0x01530028

Definition at line 16499 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_cmd_time_client_get_time_id#

#define sl_btmesh_cmd_time_client_get_time_id
Value:
0x02530028

Definition at line 16500 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_cmd_time_client_set_time_id#

#define sl_btmesh_cmd_time_client_set_time_id
Value:
0x03530028

Definition at line 16501 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_cmd_time_client_get_time_zone_id#

#define sl_btmesh_cmd_time_client_get_time_zone_id
Value:
0x04530028

Definition at line 16502 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_cmd_time_client_set_time_zone_id#

#define sl_btmesh_cmd_time_client_set_time_zone_id
Value:
0x05530028

Definition at line 16503 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_cmd_time_client_get_tai_utc_delta_id#

#define sl_btmesh_cmd_time_client_get_tai_utc_delta_id
Value:
0x06530028

Definition at line 16504 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_cmd_time_client_set_tai_utc_delta_id#

#define sl_btmesh_cmd_time_client_set_tai_utc_delta_id
Value:
0x07530028

Definition at line 16505 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_cmd_time_client_get_time_role_id#

#define sl_btmesh_cmd_time_client_get_time_role_id
Value:
0x08530028

Definition at line 16506 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_cmd_time_client_set_time_role_id#

#define sl_btmesh_cmd_time_client_set_time_role_id
Value:
0x09530028

Definition at line 16507 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_rsp_time_client_init_id#

#define sl_btmesh_rsp_time_client_init_id
Value:
0x00530028

Definition at line 16508 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_rsp_time_client_deinit_id#

#define sl_btmesh_rsp_time_client_deinit_id
Value:
0x01530028

Definition at line 16509 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_rsp_time_client_get_time_id#

#define sl_btmesh_rsp_time_client_get_time_id
Value:
0x02530028

Definition at line 16510 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_rsp_time_client_set_time_id#

#define sl_btmesh_rsp_time_client_set_time_id
Value:
0x03530028

Definition at line 16511 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_rsp_time_client_get_time_zone_id#

#define sl_btmesh_rsp_time_client_get_time_zone_id
Value:
0x04530028

Definition at line 16512 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_rsp_time_client_set_time_zone_id#

#define sl_btmesh_rsp_time_client_set_time_zone_id
Value:
0x05530028

Definition at line 16513 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_rsp_time_client_get_tai_utc_delta_id#

#define sl_btmesh_rsp_time_client_get_tai_utc_delta_id
Value:
0x06530028

Definition at line 16514 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_rsp_time_client_set_tai_utc_delta_id#

#define sl_btmesh_rsp_time_client_set_tai_utc_delta_id
Value:
0x07530028

Definition at line 16515 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_rsp_time_client_get_time_role_id#

#define sl_btmesh_rsp_time_client_get_time_role_id
Value:
0x08530028

Definition at line 16516 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h

sl_btmesh_rsp_time_client_set_time_role_id#

#define sl_btmesh_rsp_time_client_set_time_role_id
Value:
0x09530028

Definition at line 16517 of file /mnt/raid/workspaces/ws.wDIAeKYhQ/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h