nRF Connect SDK API 2.8.0
|
Application Event Manager header. More...
#include <zephyr/kernel.h>
#include <zephyr/types.h>
#include <zephyr/sys/__assert.h>
#include <zephyr/logging/log.h>
#include <app_event_manager_priv.h>
Go to the source code of this file.
Macros | |
#define | APP_EVENT_ID(ename) |
Get the event ID. | |
#define | APP_EVENT_LISTENER(lname, cb_fn) |
Create an event listener object. | |
#define | APP_EVENT_SUBSCRIBE_FIRST(lname, ename) |
Subscribe a listener to an event type as first module that is being notified. | |
#define | APP_EVENT_SUBSCRIBE_EARLY(lname, ename) |
Subscribe a listener to the early notification list for an event type. | |
#define | APP_EVENT_SUBSCRIBE(lname, ename) |
Subscribe a listener to the normal notification list for an event type. | |
#define | APP_EVENT_SUBSCRIBE_FINAL(lname, ename) |
Subscribe a listener to an event type as final module that is being notified. | |
#define | APP_EVENT_TYPE_DECLARE(ename) |
Declare an event type. | |
#define | APP_EVENT_TYPE_DYNDATA_DECLARE(ename) |
Declare an event type with dynamic data size. | |
#define | APP_EVENT_TYPE_DEFINE(ename, log_fn, ev_info_struct, app_event_type_flags) |
Define an event type. | |
#define | APP_EVENT_ASSERT_ID(id) |
Verify if an event ID is valid. | |
#define | APP_EVENT_SUBMIT(event) |
Submit an event. | |
#define | APP_EVENT_MANAGER_HOOK_POSTINIT_REGISTER(hook_fn) |
Register event hook after the Application Event Manager is initialized. | |
#define | APP_EVENT_HOOK_ON_SUBMIT_REGISTER_FIRST(hook_fn) |
Register hook called on event submission. The hook would be called first. | |
#define | APP_EVENT_HOOK_ON_SUBMIT_REGISTER(hook_fn) |
Register event hook on submission. | |
#define | APP_EVENT_HOOK_ON_SUBMIT_REGISTER_LAST(hook_fn) |
Register event hook on submission. The hook would be called last. | |
#define | APP_EVENT_HOOK_PREPROCESS_REGISTER_FIRST(hook_fn) |
Register event hook on the start of event processing. The hook would be called first. | |
#define | APP_EVENT_HOOK_PREPROCESS_REGISTER(hook_fn) |
Register event hook on the start of event processing. | |
#define | APP_EVENT_HOOK_PREPROCESS_REGISTER_LAST(hook_fn) |
Register event hook on the start of event processing. The hook would be called last. | |
#define | APP_EVENT_HOOK_POSTPROCESS_REGISTER_FIRST(hook_fn) |
Register event hook on the end of event processing. The hook would be called first. | |
#define | APP_EVENT_HOOK_POSTPROCESS_REGISTER(hook_fn) |
Register event hook on the end of event processing. | |
#define | APP_EVENT_HOOK_POSTPROCESS_REGISTER_LAST(hook_fn) |
Register event hook on the end of event processing. The hook would be called last. | |
#define | APP_EVENT_MANAGER_LOG(aeh, ...) |
Log event. | |
#define | APP_EVENT_FLAGS_CREATE(...) |
Define flags for event type. | |
Typedefs | |
typedef bool(* | cb_fn) (const struct app_event_header *aeh) |
Pointer to the event handler function. | |
Enumerations | |
enum | app_event_type_flags { APP_EVENT_TYPE_FLAGS_SYSTEM_START , APP_EVENT_TYPE_FLAGS_HAS_DYNDATA = APP_EVENT_TYPE_FLAGS_SYSTEM_START , APP_EVENT_TYPE_FLAGS_USER_SETTABLE_START , APP_EVENT_TYPE_FLAGS_INIT_LOG_ENABLE , APP_EVENT_TYPE_FLAGS_COUNT , APP_EVENT_TYPE_FLAGS_USER_DEFINED_START = APP_EVENT_TYPE_FLAGS_COUNT } |
List of bits in event type flags. More... | |
Functions | |
static bool | app_event_get_type_flag (const struct event_type *et, enum app_event_type_flags flag) |
Get event type flag's value. | |
static size_t | app_event_manager_event_size (const struct app_event_header *aeh) |
Get the event size. | |
int | app_event_manager_init (void) |
Initialize the Application Event Manager. | |
void * | app_event_manager_alloc (size_t size) |
Allocate event. | |
void | app_event_manager_free (void *addr) |
Free memory occupied by the event. | |
Application Event Manager header.