Modules#

EmberAfCalendarDayScheduleEntryStruct

EmberAfCalendarDayStruct

EmberAfCalendarSpecialDayStruct

EmberAfCalendarWeekStruct

EmberAfCalendarSeasonStruct

EmberAfCalendarStruct

Calendar Common#

API and Callbacks for the Calendar Common Component.

This component provides common utility functions that are used by the client and server of the Calendar Cluster.

API#

uint8_t
emberAfPluginCalendarCommonGetCalendarById(uint32_t calendarId, uint32_t providerId)

Gets the calender by calender ID.

uint32_t
emberAfPluginCalendarCommonEndTimeUtc(const EmberAfCalendarStruct *calendar)

Get the calender end time (UTC).

bool
emberAfCalendarCommonSetCalInfo(uint8_t index, uint32_t providerId, uint32_t issuerEventId, uint32_t issuerCalendarId, uint32_t startTimeUtc, uint8_t calendarType, uint8_t *calendarName, uint8_t numberOfSeasons, uint8_t numberOfWeekProfiles, uint8_t numberOfDayProfiles)

Sets the calender info.

bool
emberAfCalendarCommonAddCalInfo(uint32_t providerId, uint32_t issuerEventId, uint32_t issuerCalendarId, uint32_t startTimeUtc, uint8_t calendarType, uint8_t *calendarName, uint8_t numberOfSeasons, uint8_t numberOfWeekProfiles, uint8_t numberOfDayProfiles)

Adds a new entry corresponding to the PublishCalendar command. Tries to handle the new entry in the following method: 1) Try to apply new data to a matching existing entry. 2) Fields such as providerId, issuerEventId, and startTime, will be used. 3) Overwrite the oldest entry (one with smallest event ID) with new information.

bool
emberAfCalendarServerSetSeasonsInfo(uint8_t index, uint8_t seasonId, EmberAfDate startDate, uint8_t weekIndex)

Set calender server season info.

bool
emberAfCalendarServerAddSeasonsInfo(uint32_t issuerCalendarId, uint8_t *seasonsEntries, uint8_t seasonsEntriesLength, uint8_t *unknownWeekIdSeasonsMask)

Add calender server season info.

bool
emberAfCalendarCommonSetDayProfInfo(uint8_t index, uint8_t dayId, uint8_t entryId, uint16_t minutesFromMidnight, uint8_t data)

Set day profile info.

bool
emberAfCalendarCommonAddDayProfInfo(uint32_t issuerCalendarId, uint8_t dayId, uint8_t *dayScheduleEntries, uint16_t dayScheduleEntriesLength)

Add day profile info.

bool
emberAfCalendarServerSetWeekProfInfo(uint8_t index, uint8_t weekId, uint8_t dayIdRefMon, uint8_t dayIdRefTue, uint8_t dayIdRefWed, uint8_t dayIdRefThu, uint8_t dayIdRefFri, uint8_t dayIdRefSat, uint8_t dayIdRefSun)

Set calender server week profile info.

bool
emberAfCalendarServerAddWeekProfInfo(uint32_t issuerCalendarId, uint8_t weekId, uint8_t dayIdRefMon, uint8_t dayIdRefTue, uint8_t dayIdRefWed, uint8_t dayIdRefThu, uint8_t dayIdRefFri, uint8_t dayIdRefSat, uint8_t dayIdRefSun)

Add calender server week profile.

bool
emberAfCalendarCommonAddSpecialDaysInfo(uint32_t issuerCalendarId, uint8_t totalNumberOfSpecialDays, uint8_t *specialDaysEntries, uint16_t specialDaysEntriesLength, uint8_t *unknownSpecialDaysMask)

Updating special days information of the specified calendar. Assumes that the value of totalNumberOfSpecialDays will match up with the information passed in between specialDaysEntries and specialDaysEntriesLength.

Enumerations#

enum
EMBER_AF_PLUGIN_CALENDAR_COMMON_FLAGS_SENT = 0x01
}

API Documentation#

emberAfPluginCalendarCommonGetCalendarById#

uint8_t emberAfPluginCalendarCommonGetCalendarById (uint32_t calendarId, uint32_t providerId)

Gets the calender by calender ID.

Parameters
N/AcalendarId

Ver.: always

N/AproviderId

Ver.: always

Returns

  • uint8_t Calender index


Definition at line 159 of file app/framework/plugin/calendar-common/calendar-common.h

emberAfPluginCalendarCommonEndTimeUtc#

uint32_t emberAfPluginCalendarCommonEndTimeUtc (const EmberAfCalendarStruct * calendar)

Get the calender end time (UTC).

Parameters
N/Acalendar

pointer to the calender struct Ver.: always

Returns

  • uint32_t end UTC time in seconds


Definition at line 169 of file app/framework/plugin/calendar-common/calendar-common.h

emberAfCalendarCommonSetCalInfo#

bool emberAfCalendarCommonSetCalInfo (uint8_t index, uint32_t providerId, uint32_t issuerEventId, uint32_t issuerCalendarId, uint32_t startTimeUtc, uint8_t calendarType, uint8_t * calendarName, uint8_t numberOfSeasons, uint8_t numberOfWeekProfiles, uint8_t numberOfDayProfiles)

Sets the calender info.

Parameters
N/Aindex

Ver.: always

N/AproviderId

Ver.: always

N/AissuerEventId

Ver.: always

N/AissuerCalendarId

Ver.: always

N/AstartTimeUtc

Ver.: always

N/AcalendarType

Ver.: always

N/AcalendarName

Ver.: always

N/AnumberOfSeasons

Ver.: always

N/AnumberOfWeekProfiles

Ver.: always

N/AnumberOfDayProfiles

Ver.: always

Returns

  • bool true if success


Definition at line 186 of file app/framework/plugin/calendar-common/calendar-common.h

emberAfCalendarCommonAddCalInfo#

bool emberAfCalendarCommonAddCalInfo (uint32_t providerId, uint32_t issuerEventId, uint32_t issuerCalendarId, uint32_t startTimeUtc, uint8_t calendarType, uint8_t * calendarName, uint8_t numberOfSeasons, uint8_t numberOfWeekProfiles, uint8_t numberOfDayProfiles)

Adds a new entry corresponding to the PublishCalendar command. Tries to handle the new entry in the following method: 1) Try to apply new data to a matching existing entry. 2) Fields such as providerId, issuerEventId, and startTime, will be used. 3) Overwrite the oldest entry (one with smallest event ID) with new information.

Parameters
N/AproviderId

Ver.: always

N/AissuerEventId

Ver.: always

N/AissuerCalendarId

Ver.: always

N/AstartTimeUtc

Ver.: always

N/AcalendarType

Ver.: always

N/AcalendarName

Ver.: always

N/AnumberOfSeasons

Ver.: always

N/AnumberOfWeekProfiles

Ver.: always

N/AnumberOfDayProfiles

Ver.: always

Returns

  • bool true if success


Definition at line 216 of file app/framework/plugin/calendar-common/calendar-common.h

emberAfCalendarServerSetSeasonsInfo#

bool emberAfCalendarServerSetSeasonsInfo (uint8_t index, uint8_t seasonId, EmberAfDate startDate, uint8_t weekIndex)

Set calender server season info.

Parameters
N/Aindex

Ver.: always

N/AseasonId

Ver.: always

N/AstartDate

Ver.: always

N/AweekIndex

Ver.: always

Returns

  • bool true if success


Definition at line 236 of file app/framework/plugin/calendar-common/calendar-common.h

emberAfCalendarServerAddSeasonsInfo#

bool emberAfCalendarServerAddSeasonsInfo (uint32_t issuerCalendarId, uint8_t * seasonsEntries, uint8_t seasonsEntriesLength, uint8_t * unknownWeekIdSeasonsMask)

Add calender server season info.

Parameters
N/AissuerCalendarId

Ver.: always

N/AseasonsEntries

Ver.: always

N/AseasonsEntriesLength

Ver.: always

N/AunknownWeekIdSeasonsMask

Ver.: always

Returns

  • bool true if success


Definition at line 251 of file app/framework/plugin/calendar-common/calendar-common.h

emberAfCalendarCommonSetDayProfInfo#

bool emberAfCalendarCommonSetDayProfInfo (uint8_t index, uint8_t dayId, uint8_t entryId, uint16_t minutesFromMidnight, uint8_t data)

Set day profile info.

Parameters
N/Aindex

Ver.: always

N/AdayId

Ver.: always

N/AentryId

Ver.: always

N/AminutesFromMidnight

Ver.: always

N/Adata

Ver.: always

Returns

  • bool true if success


Definition at line 266 of file app/framework/plugin/calendar-common/calendar-common.h

emberAfCalendarCommonAddDayProfInfo#

bool emberAfCalendarCommonAddDayProfInfo (uint32_t issuerCalendarId, uint8_t dayId, uint8_t * dayScheduleEntries, uint16_t dayScheduleEntriesLength)

Add day profile info.

Parameters
N/AissuerCalendarId

Ver.: always

N/AdayId

Ver.: always

N/AdayScheduleEntries

Ver.: always

N/AdayScheduleEntriesLength

Ver.: always

Returns

  • bool true if success


Definition at line 282 of file app/framework/plugin/calendar-common/calendar-common.h

emberAfCalendarServerSetWeekProfInfo#

bool emberAfCalendarServerSetWeekProfInfo (uint8_t index, uint8_t weekId, uint8_t dayIdRefMon, uint8_t dayIdRefTue, uint8_t dayIdRefWed, uint8_t dayIdRefThu, uint8_t dayIdRefFri, uint8_t dayIdRefSat, uint8_t dayIdRefSun)

Set calender server week profile info.

Parameters
N/Aindex

Ver.: always

N/AweekId

Ver.: always

N/AdayIdRefMon

Ver.: always

N/AdayIdRefTue

Ver.: always

N/AdayIdRefWed

Ver.: always

N/AdayIdRefThu

Ver.: always

N/AdayIdRefFri

Ver.: always

N/AdayIdRefSat

Ver.: always

N/AdayIdRefSun

Ver.: always

Returns

  • bool true if success


Definition at line 301 of file app/framework/plugin/calendar-common/calendar-common.h

emberAfCalendarServerAddWeekProfInfo#

bool emberAfCalendarServerAddWeekProfInfo (uint32_t issuerCalendarId, uint8_t weekId, uint8_t dayIdRefMon, uint8_t dayIdRefTue, uint8_t dayIdRefWed, uint8_t dayIdRefThu, uint8_t dayIdRefFri, uint8_t dayIdRefSat, uint8_t dayIdRefSun)

Add calender server week profile.

Parameters
N/AissuerCalendarId

Ver.: always

N/AweekId

Ver.: always

N/AdayIdRefMon

Ver.: always

N/AdayIdRefTue

Ver.: always

N/AdayIdRefWed

Ver.: always

N/AdayIdRefThu

Ver.: always

N/AdayIdRefFri

Ver.: always

N/AdayIdRefSat

Ver.: always

N/AdayIdRefSun

Ver.: always

Returns

  • bool true if success


Definition at line 326 of file app/framework/plugin/calendar-common/calendar-common.h

emberAfCalendarCommonAddSpecialDaysInfo#

bool emberAfCalendarCommonAddSpecialDaysInfo (uint32_t issuerCalendarId, uint8_t totalNumberOfSpecialDays, uint8_t * specialDaysEntries, uint16_t specialDaysEntriesLength, uint8_t * unknownSpecialDaysMask)

Updating special days information of the specified calendar. Assumes that the value of totalNumberOfSpecialDays will match up with the information passed in between specialDaysEntries and specialDaysEntriesLength.

Parameters
N/AissuerCalendarId

Ver.: always

N/AtotalNumberOfSpecialDays

Ver.: always

N/AspecialDaysEntries

Ver.: always

N/AspecialDaysEntriesLength

Ver.: always

N/AunknownSpecialDaysMask

Ver.: always

Returns

  • bool true if success


Definition at line 350 of file app/framework/plugin/calendar-common/calendar-common.h

Enumeration Documentation#

EmberAfPluginCalendarCommonFlags#

EmberAfPluginCalendarCommonFlags
Enumerator
EMBER_AF_PLUGIN_CALENDAR_COMMON_FLAGS_SENT

Definition at line 103 of file app/framework/plugin/calendar-common/calendar-common.h

Variable Documentation#

calendars#

EmberAfCalendarStruct calendars[]

Definition at line 137 of file app/framework/plugin/calendar-common/calendar-common.h

Macro Definition Documentation#

fieldLength#

#define fieldLength
Value:
(field)

Definition at line 49 of file app/framework/plugin/calendar-common/calendar-common.h

EMBER_AF_PLUGIN_CALENDAR_COMMON_INVALID_SCHEDULE_ENTRY#

#define EMBER_AF_PLUGIN_CALENDAR_COMMON_INVALID_SCHEDULE_ENTRY
Value:
0xFFFF

Definition at line 52 of file app/framework/plugin/calendar-common/calendar-common.h

EMBER_AF_PLUGIN_CALENDAR_COMMON_INVALID_ID#

#define EMBER_AF_PLUGIN_CALENDAR_COMMON_INVALID_ID
Value:
0xFF

Definition at line 53 of file app/framework/plugin/calendar-common/calendar-common.h

EMBER_AF_PLUGIN_CALENDAR_MAX_CALENDAR_NAME_LENGTH#

#define EMBER_AF_PLUGIN_CALENDAR_MAX_CALENDAR_NAME_LENGTH
Value:
12

Definition at line 54 of file app/framework/plugin/calendar-common/calendar-common.h

EMBER_AF_PLUGIN_CALENDAR_COMMON_INVALID_INDEX#

#define EMBER_AF_PLUGIN_CALENDAR_COMMON_INVALID_INDEX
Value:
0xFF

Definition at line 55 of file app/framework/plugin/calendar-common/calendar-common.h

EMBER_AF_PLUGIN_CALENDAR_COMMON_MONDAY_INDEX#

#define EMBER_AF_PLUGIN_CALENDAR_COMMON_MONDAY_INDEX
Value:
(0)

Definition at line 82 of file app/framework/plugin/calendar-common/calendar-common.h

EMBER_AF_PLUGIN_CALENDAR_COMMON_SUNDAY_INDEX#

#define EMBER_AF_PLUGIN_CALENDAR_COMMON_SUNDAY_INDEX
Value:
(6)

Definition at line 83 of file app/framework/plugin/calendar-common/calendar-common.h

EMBER_AF_DAYS_IN_THE_WEEK#

#define EMBER_AF_DAYS_IN_THE_WEEK
Value:
(7)

Definition at line 84 of file app/framework/plugin/calendar-common/calendar-common.h

EMBER_AF_PLUGIN_CALENDAR_COMMON_INVALID_CALENDAR_ID#

#define EMBER_AF_PLUGIN_CALENDAR_COMMON_INVALID_CALENDAR_ID
Value:
0xFFFFFFFF

Definition at line 96 of file app/framework/plugin/calendar-common/calendar-common.h

EMBER_AF_PLUGIN_CALENDAR_COMMON_WILDCARD_CALENDAR_ID#

#define EMBER_AF_PLUGIN_CALENDAR_COMMON_WILDCARD_CALENDAR_ID
Value:
0x00000000

Definition at line 97 of file app/framework/plugin/calendar-common/calendar-common.h

EMBER_AF_PLUGIN_CALENDAR_COMMON_WILDCARD_PROVIDER_ID#

#define EMBER_AF_PLUGIN_CALENDAR_COMMON_WILDCARD_PROVIDER_ID
Value:
0xFFFFFFFF

Definition at line 98 of file app/framework/plugin/calendar-common/calendar-common.h

EMBER_AF_PLUGIN_CALENDAR_COMMON_WILDCARD_ISSUER_ID#

#define EMBER_AF_PLUGIN_CALENDAR_COMMON_WILDCARD_ISSUER_ID
Value:
0xFFFFFFFF

Definition at line 99 of file app/framework/plugin/calendar-common/calendar-common.h

EMBER_AF_PLUGIN_CALENDAR_COMMON_WILDCARD_CALENDAR_TYPE#

#define EMBER_AF_PLUGIN_CALENDAR_COMMON_WILDCARD_CALENDAR_TYPE
Value:
0xFF

Definition at line 100 of file app/framework/plugin/calendar-common/calendar-common.h