A tagged union representing either a system or user-defined notification. More...
#include <Notification.h>
Public Member Functions | |
Notification () | |
Default constructor initializes to a system notification of None. | |
Notification (SystemNotification s) | |
Construct a Notification with a specific system notification type. | |
Notification (uint8_t userCode) | |
Construct a Notification with a user-defined code. | |
uint8_t | code () const |
Get the notification code. | |
Public Attributes | ||
NotificationKind | kind | |
union { | ||
SystemNotification system | ||
uint8_t user_code | ||
}; | ||
Definition at line 38 of file Notification.h.
|
inline |
Use the other constructors to specify a system or user notification.
Definition at line 50 of file Notification.h.
|
inline |
|
inline |
userCode | The user-defined notification code. |
Definition at line 64 of file Notification.h.
|
inline |
If it's a system notification, returns the system code. If it's a user notification, returns the user-defined code.
Definition at line 73 of file Notification.h.
References kind, System, system, and user_code.
Referenced by FrameworkTask::notify(), FrameworkTask::notifyFromISR(), EventManager::postNotification(), TimerService::scheduleDailyAt(), TimerService::scheduleDuration(), TimerService::scheduleEvery(), and FrameworkTask::waitFor().
union { ... } Notification |
NotificationKind Notification::kind |
Definition at line 39 of file Notification.h.
Referenced by code(), Event::isSystem(), Event::isUser(), App::onEvent(), FrameworkManager::onEvent(), and FrameworkTask::waitForAny().
SystemNotification Notification::system |
Definition at line 42 of file Notification.h.
Referenced by code(), App::onEvent(), FrameworkManager::onEvent(), Event::systemCode(), and FrameworkTask::waitForAny().
uint8_t Notification::user_code |
Definition at line 43 of file Notification.h.
Referenced by code(), App::onEvent(), and Event::userCode().