I have a CFE based project that uses multiple libraries, which are loaded in the startup script as a CFE_LIB rather than a CFE_APP.
Today I found that one of the library initialization routines was failing. Despite generating an Event using CFE_SendEvent on the condition, no event was reported on the console.
The issue is that library init routines are called from the main thread context, and therefore not in the context of an Executive Services task. This causes CFE_ES_GetAppId to fail - which is probably correct.
However this causes CFE_EVS to effectively drop the message on the floor, and it is entirely silent in this case.
This might be intended behavior but it caught me off guard since I got no output whatsoever. One possible fix is to just stick to CFE_ES_WriteToSysLog during library init functions but perhaps we should consider having event services actually do this, so the message at least goes somewhere visible.
I have a CFE based project that uses multiple libraries, which are loaded in the startup script as a CFE_LIB rather than a CFE_APP.
Today I found that one of the library initialization routines was failing. Despite generating an Event using CFE_SendEvent on the condition, no event was reported on the console.
The issue is that library init routines are called from the main thread context, and therefore not in the context of an Executive Services task. This causes CFE_ES_GetAppId to fail - which is probably correct.
However this causes CFE_EVS to effectively drop the message on the floor, and it is entirely silent in this case.
This might be intended behavior but it caught me off guard since I got no output whatsoever. One possible fix is to just stick to CFE_ES_WriteToSysLog during library init functions but perhaps we should consider having event services actually do this, so the message at least goes somewhere visible.