Modules#
EmberAfCalendarDayScheduleEntryStruct
EmberAfCalendarSpecialDayStruct
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#
Gets the calender by calender ID.
Get the calender end time (UTC).
Sets the calender info.
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.
Set calender server season info.
Add calender server season info.
Set day profile info.
Add day profile info.
Set calender server week profile info.
Add calender server week profile.
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#
Variables#
Macros#
API Documentation#
emberAfPluginCalendarCommonGetCalendarById#
uint8_t emberAfPluginCalendarCommonGetCalendarById (uint32_t calendarId, uint32_t providerId)
Gets the calender by calender ID.
N/A | calendarId | Ver.: always |
N/A | providerId | Ver.: always |
Returns
uint8_t Calender index
159
of file app/framework/plugin/calendar-common/calendar-common.h
emberAfPluginCalendarCommonEndTimeUtc#
uint32_t emberAfPluginCalendarCommonEndTimeUtc (const EmberAfCalendarStruct * calendar)
Get the calender end time (UTC).
N/A | calendar | pointer to the calender struct Ver.: always |
Returns
uint32_t end UTC time in seconds
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.
N/A | index | Ver.: always |
N/A | providerId | Ver.: always |
N/A | issuerEventId | Ver.: always |
N/A | issuerCalendarId | Ver.: always |
N/A | startTimeUtc | Ver.: always |
N/A | calendarType | Ver.: always |
N/A | calendarName | Ver.: always |
N/A | numberOfSeasons | Ver.: always |
N/A | numberOfWeekProfiles | Ver.: always |
N/A | numberOfDayProfiles | Ver.: always |
Returns
bool true if success
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.
N/A | providerId | Ver.: always |
N/A | issuerEventId | Ver.: always |
N/A | issuerCalendarId | Ver.: always |
N/A | startTimeUtc | Ver.: always |
N/A | calendarType | Ver.: always |
N/A | calendarName | Ver.: always |
N/A | numberOfSeasons | Ver.: always |
N/A | numberOfWeekProfiles | Ver.: always |
N/A | numberOfDayProfiles | Ver.: always |
Returns
bool true if success
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.
N/A | index | Ver.: always |
N/A | seasonId | Ver.: always |
N/A | startDate | Ver.: always |
N/A | weekIndex | Ver.: always |
Returns
bool true if success
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.
N/A | issuerCalendarId | Ver.: always |
N/A | seasonsEntries | Ver.: always |
N/A | seasonsEntriesLength | Ver.: always |
N/A | unknownWeekIdSeasonsMask | Ver.: always |
Returns
bool true if success
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.
N/A | index | Ver.: always |
N/A | dayId | Ver.: always |
N/A | entryId | Ver.: always |
N/A | minutesFromMidnight | Ver.: always |
N/A | data | Ver.: always |
Returns
bool true if success
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.
N/A | issuerCalendarId | Ver.: always |
N/A | dayId | Ver.: always |
N/A | dayScheduleEntries | Ver.: always |
N/A | dayScheduleEntriesLength | Ver.: always |
Returns
bool true if success
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.
N/A | index | Ver.: always |
N/A | weekId | Ver.: always |
N/A | dayIdRefMon | Ver.: always |
N/A | dayIdRefTue | Ver.: always |
N/A | dayIdRefWed | Ver.: always |
N/A | dayIdRefThu | Ver.: always |
N/A | dayIdRefFri | Ver.: always |
N/A | dayIdRefSat | Ver.: always |
N/A | dayIdRefSun | Ver.: always |
Returns
bool true if success
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.
N/A | issuerCalendarId | Ver.: always |
N/A | weekId | Ver.: always |
N/A | dayIdRefMon | Ver.: always |
N/A | dayIdRefTue | Ver.: always |
N/A | dayIdRefWed | Ver.: always |
N/A | dayIdRefThu | Ver.: always |
N/A | dayIdRefFri | Ver.: always |
N/A | dayIdRefSat | Ver.: always |
N/A | dayIdRefSun | Ver.: always |
Returns
bool true if success
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.
N/A | issuerCalendarId | Ver.: always |
N/A | totalNumberOfSpecialDays | Ver.: always |
N/A | specialDaysEntries | Ver.: always |
N/A | specialDaysEntriesLength | Ver.: always |
N/A | unknownSpecialDaysMask | Ver.: always |
Returns
bool true if success
350
of file app/framework/plugin/calendar-common/calendar-common.h
Enumeration Documentation#
EmberAfPluginCalendarCommonFlags#
EmberAfPluginCalendarCommonFlags
Enumerator | |
---|---|
EMBER_AF_PLUGIN_CALENDAR_COMMON_FLAGS_SENT |
103
of file app/framework/plugin/calendar-common/calendar-common.h
Variable Documentation#
calendars#
EmberAfCalendarStruct calendars[]
137
of file app/framework/plugin/calendar-common/calendar-common.h
Macro Definition Documentation#
fieldLength#
#define fieldLengthValue:
(field)
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_ENTRYValue:
0xFFFF
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_IDValue:
0xFF
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_LENGTHValue:
12
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_INDEXValue:
0xFF
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_INDEXValue:
(0)
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_INDEXValue:
(6)
83
of file app/framework/plugin/calendar-common/calendar-common.h
EMBER_AF_DAYS_IN_THE_WEEK#
#define EMBER_AF_DAYS_IN_THE_WEEKValue:
(7)
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_IDValue:
0xFFFFFFFF
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_IDValue:
0x00000000
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_IDValue:
0xFFFFFFFF
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_IDValue:
0xFFFFFFFF
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_TYPEValue:
0xFF
100
of file app/framework/plugin/calendar-common/calendar-common.h