From a9f89b923417ee3d4de8c3bbf883cfd03a5e1a3b Mon Sep 17 00:00:00 2001 From: Dmitry Alexeev Date: Sat, 14 Sep 2024 14:06:47 +0300 Subject: [PATCH] CB24FW-191: Add event handling flags Signed-off-by: Dmitry Alexeev --- include/app_event_manager.h | 9 +++++++++ subsys/app_event_manager/app_event_manager_priv.h | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/include/app_event_manager.h b/include/app_event_manager.h index 58b675c492..85996a6cb5 100644 --- a/include/app_event_manager.h +++ b/include/app_event_manager.h @@ -48,6 +48,8 @@ enum app_event_type_flags { * Flag set internally by Application Event Manager. */ APP_EVENT_TYPE_FLAGS_HAS_DYNDATA = APP_EVENT_TYPE_FLAGS_SYSTEM_START, + /** message can be forwarded using Inter-MCU Link.*/ + APP_EVENT_TYPE_FLAGS_DO_NOT_FORWARD, /** marks beginning of flags set by user.*/ APP_EVENT_TYPE_FLAGS_USER_SETTABLE_START, /** enables event logging from the application start. @@ -61,6 +63,13 @@ enum app_event_type_flags { APP_EVENT_TYPE_FLAGS_USER_DEFINED_START = APP_EVENT_TYPE_FLAGS_COUNT, }; +/** + * @brief List of bits in event handling flags. + */ +enum app_event_handling_flags { + APP_EVENT_HANDLING_DO_NOT_FORWARD, +}; + /** @brief Get event type flag's value. * * @param flag Selected event type flag. diff --git a/subsys/app_event_manager/app_event_manager_priv.h b/subsys/app_event_manager/app_event_manager_priv.h index 31485ed0e6..c29861a85e 100644 --- a/subsys/app_event_manager/app_event_manager_priv.h +++ b/subsys/app_event_manager/app_event_manager_priv.h @@ -132,6 +132,7 @@ extern "C" { ""); \ if (event != NULL) { \ event->header.type_id = _EVENT_ID(ename); \ + event->header.eh_flags = 0; \ } \ return event; \ } @@ -228,6 +229,9 @@ struct app_event_header { /** Linked list node used to chain events. */ sys_snode_t node; + /** Array of flags specific for event handling.*/ + uint8_t eh_flags; + /** Pointer to the event type object. */ const struct event_type *type_id; };