Scheduler models

The Scheduler models provide the ability to autonomically change the state of a device. The states are changed based on the notion of the UTC time and the ISO 8601 calendar. The UTC time is provided from the referenced Time Server model.

One state change is referred to as an action. The models provide an action scheduler. The action scheduler uses the Scheduler Register state to schedule up to sixteen action entries.

The Scheduler models also feature their own common types, listed below. For types common to all models, see Bluetooth mesh models.

Common types

This section lists the types common to the Scheduler mesh models.

Header file: include/bluetooth/mesh/scheduler.h
group bt_mesh_scheduler

Common API for the Scheduler models.

Defines

BT_MESH_SCHEDULER_ACTION_ENTRY_COUNT

Maximum number of entries of the Schedule Register state .

BT_MESH_SCHEDULER_ANY_YEAR

Scheduled at any year.

BT_MESH_SCHEDULER_ANY_DAY

Scheduled at any day of the month.

BT_MESH_SCHEDULER_ANY_HOUR

Scheduled at any hour of the day.

BT_MESH_SCHEDULER_ONCE_A_DAY

Scheduled once a day at a random hour.

BT_MESH_SCHEDULER_ANY_MINUTE

Scheduled at any minute of the hour.

BT_MESH_SCHEDULER_EVERY_15_MINUTES

Scheduled every 15 minutes (minute modulo 15 is 0) (0, 15, 30, 45).

BT_MESH_SCHEDULER_EVERY_20_MINUTES

Scheduled every 20 minutes (minute modulo 20 is 0) (0, 20, 40).

BT_MESH_SCHEDULER_ONCE_AN_HOUR

Scheduled once an hour (at a random minute).

BT_MESH_SCHEDULER_ANY_SECOND

Scheduled at any second of the minute.

BT_MESH_SCHEDULER_EVERY_15_SECONDS

Scheduled every 15 seconds (minute modulo 15 is 0) (0, 15, 30, 45).

BT_MESH_SCHEDULER_EVERY_20_SECONDS

Scheduled every 20 seconds (minute modulo 20 is 0) (0, 20, 40).

BT_MESH_SCHEDULER_ONCE_A_MINUTE

Scheduled once a minute (at a random second).

Enums

enum bt_mesh_scheduler_month

Representation of the months of the year in which the scheduled event is enabled.

Values:

enumerator BT_MESH_SCHEDULER_JAN
enumerator BT_MESH_SCHEDULER_FEB
enumerator BT_MESH_SCHEDULER_MAR
enumerator BT_MESH_SCHEDULER_APR
enumerator BT_MESH_SCHEDULER_MAY
enumerator BT_MESH_SCHEDULER_JUN
enumerator BT_MESH_SCHEDULER_JUL
enumerator BT_MESH_SCHEDULER_AUG
enumerator BT_MESH_SCHEDULER_SEP
enumerator BT_MESH_SCHEDULER_OCT
enumerator BT_MESH_SCHEDULER_NOV
enumerator BT_MESH_SCHEDULER_DEC
enum bt_mesh_scheduler_wday

Representation of the days of the week in which the scheduled event is enabled.

Values:

enumerator BT_MESH_SCHEDULER_MON
enumerator BT_MESH_SCHEDULER_TUE
enumerator BT_MESH_SCHEDULER_WED
enumerator BT_MESH_SCHEDULER_THU
enumerator BT_MESH_SCHEDULER_FRI
enumerator BT_MESH_SCHEDULER_SAT
enumerator BT_MESH_SCHEDULER_SUN
enum bt_mesh_scheduler_action

Representation of the actions to be executed for a scheduled event.

Values:

enumerator BT_MESH_SCHEDULER_TURN_OFF
enumerator BT_MESH_SCHEDULER_TURN_ON
enumerator BT_MESH_SCHEDULER_SCENE_RECALL
enumerator BT_MESH_SCHEDULER_NO_ACTIONS
struct bt_mesh_schedule_entry
#include <scheduler.h>

Schedule Register entry.

Public Members

uint8_t year

Two last digits of the scheduled year for the action, or BT_MESH_SCHEDULER_ANY_YEAR.

enum bt_mesh_scheduler_month month

Scheduled month for the action.

uint8_t day

Scheduled day of the month for the action.

uint8_t hour

Scheduled hour for the action.

uint8_t minute

Scheduled minute for the action.

uint8_t second

Scheduled second for the action.

enum bt_mesh_scheduler_wday day_of_week

Schedule days of the week for the action.

enum bt_mesh_scheduler_action action

Action to be performed at the scheduled time.

uint8_t transition_time

Transition time for this action.

uint16_t scene_number

Scene number to be used for some actions.