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.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint32_t | N/A | calendarId | Ver.: always |
uint32_t | N/A | providerId | Ver.: always |
Returns
uint8_t Calender index
emberAfPluginCalendarCommonEndTimeUtc#
uint32_t emberAfPluginCalendarCommonEndTimeUtc (const EmberAfCalendarStruct * calendar)
Get the calender end time (UTC).
Type | Direction | Argument Name | Description |
---|---|---|---|
const EmberAfCalendarStruct * | N/A | calendar | pointer to the calender struct Ver.: always |
Returns
uint32_t end UTC time in seconds
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint8_t | N/A | index | Ver.: always |
uint32_t | N/A | providerId | Ver.: always |
uint32_t | N/A | issuerEventId | Ver.: always |
uint32_t | N/A | issuerCalendarId | Ver.: always |
uint32_t | N/A | startTimeUtc | Ver.: always |
uint8_t | N/A | calendarType | Ver.: always |
uint8_t * | N/A | calendarName | Ver.: always |
uint8_t | N/A | numberOfSeasons | Ver.: always |
uint8_t | N/A | numberOfWeekProfiles | Ver.: always |
uint8_t | N/A | numberOfDayProfiles | Ver.: always |
Returns
bool true if success
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint32_t | N/A | providerId | Ver.: always |
uint32_t | N/A | issuerEventId | Ver.: always |
uint32_t | N/A | issuerCalendarId | Ver.: always |
uint32_t | N/A | startTimeUtc | Ver.: always |
uint8_t | N/A | calendarType | Ver.: always |
uint8_t * | N/A | calendarName | Ver.: always |
uint8_t | N/A | numberOfSeasons | Ver.: always |
uint8_t | N/A | numberOfWeekProfiles | Ver.: always |
uint8_t | N/A | numberOfDayProfiles | Ver.: always |
Returns
bool true if success
emberAfCalendarServerSetSeasonsInfo#
bool emberAfCalendarServerSetSeasonsInfo (uint8_t index, uint8_t seasonId, EmberAfDate startDate, uint8_t weekIndex)
Set calender server season info.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint8_t | N/A | index | Ver.: always |
uint8_t | N/A | seasonId | Ver.: always |
EmberAfDate | N/A | startDate | Ver.: always |
uint8_t | N/A | weekIndex | Ver.: always |
Returns
bool true if success
emberAfCalendarServerAddSeasonsInfo#
bool emberAfCalendarServerAddSeasonsInfo (uint32_t issuerCalendarId, uint8_t * seasonsEntries, uint8_t seasonsEntriesLength, uint8_t * unknownWeekIdSeasonsMask)
Add calender server season info.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint32_t | N/A | issuerCalendarId | Ver.: always |
uint8_t * | N/A | seasonsEntries | Ver.: always |
uint8_t | N/A | seasonsEntriesLength | Ver.: always |
uint8_t * | N/A | unknownWeekIdSeasonsMask | Ver.: always |
Returns
bool true if success
emberAfCalendarCommonSetDayProfInfo#
bool emberAfCalendarCommonSetDayProfInfo (uint8_t index, uint8_t dayId, uint8_t entryId, uint16_t minutesFromMidnight, uint8_t data)
Set day profile info.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint8_t | N/A | index | Ver.: always |
uint8_t | N/A | dayId | Ver.: always |
uint8_t | N/A | entryId | Ver.: always |
uint16_t | N/A | minutesFromMidnight | Ver.: always |
uint8_t | N/A | data | Ver.: always |
Returns
bool true if success
emberAfCalendarCommonAddDayProfInfo#
bool emberAfCalendarCommonAddDayProfInfo (uint32_t issuerCalendarId, uint8_t dayId, uint8_t * dayScheduleEntries, uint16_t dayScheduleEntriesLength)
Add day profile info.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint32_t | N/A | issuerCalendarId | Ver.: always |
uint8_t | N/A | dayId | Ver.: always |
uint8_t * | N/A | dayScheduleEntries | Ver.: always |
uint16_t | N/A | dayScheduleEntriesLength | Ver.: always |
Returns
bool true if success
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint8_t | N/A | index | Ver.: always |
uint8_t | N/A | weekId | Ver.: always |
uint8_t | N/A | dayIdRefMon | Ver.: always |
uint8_t | N/A | dayIdRefTue | Ver.: always |
uint8_t | N/A | dayIdRefWed | Ver.: always |
uint8_t | N/A | dayIdRefThu | Ver.: always |
uint8_t | N/A | dayIdRefFri | Ver.: always |
uint8_t | N/A | dayIdRefSat | Ver.: always |
uint8_t | N/A | dayIdRefSun | Ver.: always |
Returns
bool true if success
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint32_t | N/A | issuerCalendarId | Ver.: always |
uint8_t | N/A | weekId | Ver.: always |
uint8_t | N/A | dayIdRefMon | Ver.: always |
uint8_t | N/A | dayIdRefTue | Ver.: always |
uint8_t | N/A | dayIdRefWed | Ver.: always |
uint8_t | N/A | dayIdRefThu | Ver.: always |
uint8_t | N/A | dayIdRefFri | Ver.: always |
uint8_t | N/A | dayIdRefSat | Ver.: always |
uint8_t | N/A | dayIdRefSun | Ver.: always |
Returns
bool true if success
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint32_t | N/A | issuerCalendarId | Ver.: always |
uint8_t | N/A | totalNumberOfSpecialDays | Ver.: always |
uint8_t * | N/A | specialDaysEntries | Ver.: always |
uint16_t | N/A | specialDaysEntriesLength | Ver.: always |
uint8_t * | N/A | unknownSpecialDaysMask | Ver.: always |
Returns
bool true if success
Enumeration Documentation#
EmberAfPluginCalendarCommonFlags#
EmberAfPluginCalendarCommonFlags
Enumerator | |
---|---|
EMBER_AF_PLUGIN_CALENDAR_COMMON_FLAGS_SENT |