I testing asset_trcker_v2 and want to add new custom event module. I have few doubts and queries:
1. There is event_handler function in each module as well in main fuction module. Are all the event handlers exucted ? if yes, how and when ?
2. There is log_event in each module which linked in EVENT_DEFINE .. What functionality should be implemented in log_event ? and what shpuld be implemented in event_handler funcion
3. The event_handler is linked in EVENT_LISTNER ... when event_handler is executed and when log_event is executed by the Zephyr OS ?
4. As well there are thread_fn in each module. When these threads are executed and how ?
5. As well there is a structure in each module like
struct app_msg_data {
union {
struct cloud_module_event cloud;
struct ui_module_event ui;
struct sensor_module_event sensor;
struct data_module_event data;
struct util_module_event util;
struct modem_module_event modem;
struct app_module_event app;
struct bms_module_event bms;
} module;
};
why these have been included repeatitevely in each ....module.c file ?
6. what is purpose of PROFILER ?
7. What functionality is performed by module_enqueue_msg() function ?