I adding an Event to Asset_Tracker_V2. I have created bms_module_evnet.h and bms_event.c files in events folder and bms_module.c. I have defined inclusion of these files in corresponding CMakeLists.TXT files. I added the BMS related states, enumerated parameters etc in app_module_event.c and app_module_event.h file also. I have added code of bms part in app_event_handler function of main.c.
I wrote code to :
1. sent BMS Events in response to (IS_EVENT(msg, app, APP_EVT_START)), (IS_EVENT(msg, app, APP_EVT_CONFIG_GET)) , (IS_EVENT(msg, app, APP_EVT_DATA_GET)) Events generated by app_module. When, I run the program and observe the various Events. The APP_EVT_START event by event_manager is generated at initial stage. In response to it various other modules like UI, DATA, CLOUD, MODEM etc submit their events, but BMS event is not seen, while I have written the code to respond to APP_EVT_START event in on_state_init() function.
What may be the reason ? 1. BMS_THREAD not initialized 2. module_get_next_msg(&self, &msg); function not getting any messages 3. In the on_state_init() function, Event is not detected or Event is not submitted. So, please explain me how to add an event.
The major files, where I have added BMS code are in attachment. At last, the log file created by LTE_LINK_MONITOR is attached.





