Bluetooth Mesh Scheduler Server Model#

Bluetooth Mesh Scheduler Server Model.

This class provides commands and messages to interface with the Scheduler Server model

The scheduler server uses multiple fields to define the occurrence of an event and the type of event to be triggered. The field definitions are as follows.

Year

The year field represents 2 last significant digits of the year of the occurrence of the scheduled event.

  • 0x00-0x63: 2 least significant digits of the year (0-99)

  • 0x64: Any year

  • All other values are prohibited

Month

The month field represents the months of the occurrences of the scheduled event, using a bitfield with one bit for each month.

  • Bit 0: Scheduled in January

  • Bit 1: February

  • Bit 2: March

  • Bit 3: April

  • Bit 4: May

  • Bit 5: June

  • Bit 6: July

  • Bit 7: August

  • Bit 8: September

  • Bit 9: October

  • Bit 10: November

  • Bit 11: December

Day

The Day field represents the day of the month of the occurrence of the scheduled event. If the day of the month has a number that is larger than the number of days in the month, the event occurs in the last day of the month. For example, in February if the day field holds the value 29, the action is triggered on February 28th in a non-leap year or February 29th in a leap year.

  • 0x00: Any day

  • 0x01-0x1F: Day of the month (1-31)

  • All other values are prohibited

Hour

The Hour field represents the hour of the occurrence of the scheduled event.

  • 0x00-0x17: Hour of the day (0-23)

  • 0x18: Any hour of the day

  • 0x19: Once a day (at a random hour)

  • All other values are prohibited

Minute

The Minute field represents the minute of the occurrence of the scheduled event.

  • 0x00-0x3B: Minute of the hour (0-59)

  • 0x3C: Any minute of the hour

  • 0x3D: Every 15 minutes (0, 15, 30, 45)

  • 0x3E: Every 20 minutes (0, 20, 40)

  • 0x3F: Once an hour (at a random minute)

  • All other values are prohibited

Second

The Second field represents the second of the occurrence of the scheduled event.

  • 0x00-0x3B: Seconds of the minute (0-59)

  • 0x3C: Any second of the minute

  • 0x3D: Every 15 seconds (0, 15, 30, 45)

  • 0x3E: Every 20 seconds (0, 20, 40)

  • 0x3F: Once a minute (at a random second)

  • All other values are prohibited

Day of Week

The DayOfWeek field represents the days of the week when the scheduled event will trigger. The week days are represented by a bitfield, by one bit for each day.

  • Bit 0: Scheduled on Mondays

  • Bit 1: Scheduled on Tuesdays

  • Bit 2: Scheduled on Wednesdays

  • Bit 3: Scheduled on Thursdays

  • Bit 4: Scheduled on Fridays

  • Bit 5: Scheduled on Saturdays

  • Bit 6: Scheduled on Sundays

Action

The action field represents an action to be executed for a scheduled event

  • 0x00: Turn Off

  • 0x01: Turn On

  • 0x02: Scene Recall

  • 0x0F: No action

  • All other values are prohibited

Transition time

This is a 1-octet value that consists of two fields: a 2-bit bit field representing the step resolution and a 6-bit bit field representing the number of transition steps.

Bit 0-1: Transition Step Resolution

  • 0b00: The Default Transition Step Resolution is 100 milliseconds

  • 0b01: 1 second resolution

  • 0b10: 10 seconds resolution

  • 0b11: 10 minutes resolution

Bit 2-7: Transition Number of Steps

  • 0x00: The Transition Time is immediate

  • 0x01-0x3E: The number of steps

  • 0x3F: The value is unknown. The state cannot be set to this value, but an element may report an unknown value if a transition is higher than 0x3E or not determined

Modules#

sl_btmesh_evt_scheduler_server_action_changed

sl_btmesh_evt_scheduler_server_scene_changed

sl_btmesh_evt_scheduler_server_action_triggered

Functions#

sl_status_t
sl_btmesh_scheduler_server_init(uint16_t elem_index)
sl_status_t
sl_status_t
sl_btmesh_scheduler_server_get(uint16_t elem_index, uint16_t *status)
sl_status_t
sl_btmesh_scheduler_server_get_action(uint16_t elem_index, uint8_t index, uint8_t *index_, uint8_t *year, uint16_t *month, uint8_t *day, uint8_t *hour, uint8_t *minute, uint8_t *second, uint8_t *day_of_week, uint8_t *action, uint32_t *transition_time_ms, uint16_t *scene_number)
sl_status_t
sl_btmesh_scheduler_server_set_action(uint16_t elem_index, uint8_t index, uint8_t year, uint16_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint8_t day_of_week, uint8_t action, uint32_t transition_time_ms, uint16_t scene_number)

Function Documentation#

sl_btmesh_scheduler_server_init#

sl_status_t sl_btmesh_scheduler_server_init (uint16_t elem_index)
Parameters
[in]elem_index

Scheduler server model element index

Initialize the Scheduler Server model

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


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

sl_btmesh_scheduler_server_deinit#

sl_status_t sl_btmesh_scheduler_server_deinit (uint16_t elem_index)
Parameters
[in]elem_index

Scheduler server model element index

Deinitialize the Scheduler Server model

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


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

sl_btmesh_scheduler_server_get#

sl_status_t sl_btmesh_scheduler_server_get (uint16_t elem_index, uint16_t * status)
Parameters
[in]elem_index

Scheduler server model element index

[out]status

Scheduler Server Scheduler Register status

Get Scheduler Register status of Scheduler Server.

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


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

sl_btmesh_scheduler_server_get_action#

sl_status_t sl_btmesh_scheduler_server_get_action (uint16_t elem_index, uint8_t index, uint8_t * index_, uint8_t * year, uint16_t * month, uint8_t * day, uint8_t * hour, uint8_t * minute, uint8_t * second, uint8_t * day_of_week, uint8_t * action, uint32_t * transition_time_ms, uint16_t * scene_number)
Parameters
[in]elem_index

Scheduler server model element index

[in]index

Index of the Scheduler Register entry to get

[out]index_

Index of the Scheduler Register entry to set

[out]year

Scheduled year for the action

[out]month

Scheduled month for the action

[out]day

Scheduled day of the month for the action

[out]hour

Scheduled hour for the action

[out]minute

Scheduled minute for the action

[out]second

Scheduled second for the action

[out]day_of_week

Scheduled days of the week for the action

[out]action

Action to be performed at the scheduled time

[out]transition_time_ms

Transition time for this action

[out]scene_number

Scene number to be used for some actions

Get the Scheduler Action defined by a Schedule Register state entry.

For the description of returned fields, see Scheduler Server

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


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

sl_btmesh_scheduler_server_set_action#

sl_status_t sl_btmesh_scheduler_server_set_action (uint16_t elem_index, uint8_t index, uint8_t year, uint16_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint8_t day_of_week, uint8_t action, uint32_t transition_time_ms, uint16_t scene_number)
Parameters
[in]elem_index

Scheduler server model element index

[in]index

Index of the Scheduler Register entry to set

[in]year

Scheduled year for the action

[in]month

Scheduled month for the action

[in]day

Scheduled day of the month for the action

[in]hour

Scheduled hour for the action

[in]minute

Scheduled minute for the action

[in]second

Scheduled second for the action

[in]day_of_week

Scheduled days of the week for the action

[in]action

Action to be performed at the scheduled time

[in]transition_time_ms

Transition time for this action

[in]scene_number

Scene number to be used for some actions

Set the given Scheduler Action entry of the Scheduler Register state.

For the description of these fields, see Scheduler Server

Returns

  • SL_STATUS_OK if successful. Error code otherwise.


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

Macro Definition Documentation#

sl_btmesh_cmd_scheduler_server_init_id#

#define sl_btmesh_cmd_scheduler_server_init_id
Value:
0x00550028

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

sl_btmesh_cmd_scheduler_server_deinit_id#

#define sl_btmesh_cmd_scheduler_server_deinit_id
Value:
0x01550028

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

sl_btmesh_cmd_scheduler_server_get_id#

#define sl_btmesh_cmd_scheduler_server_get_id
Value:
0x02550028

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

sl_btmesh_cmd_scheduler_server_get_action_id#

#define sl_btmesh_cmd_scheduler_server_get_action_id
Value:
0x03550028

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

sl_btmesh_cmd_scheduler_server_set_action_id#

#define sl_btmesh_cmd_scheduler_server_set_action_id
Value:
0x04550028

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

sl_btmesh_rsp_scheduler_server_init_id#

#define sl_btmesh_rsp_scheduler_server_init_id
Value:
0x00550028

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

sl_btmesh_rsp_scheduler_server_deinit_id#

#define sl_btmesh_rsp_scheduler_server_deinit_id
Value:
0x01550028

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

sl_btmesh_rsp_scheduler_server_get_id#

#define sl_btmesh_rsp_scheduler_server_get_id
Value:
0x02550028

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

sl_btmesh_rsp_scheduler_server_get_action_id#

#define sl_btmesh_rsp_scheduler_server_get_action_id
Value:
0x03550028

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

sl_btmesh_rsp_scheduler_server_set_action_id#

#define sl_btmesh_rsp_scheduler_server_set_action_id
Value:
0x04550028

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