RiCGEN_ISR() has the same effect as CGEN_ISR().
The problem with generating events from interrupt service routines is that in some operating systems (such as VxWorks), you are not allowed to allocate memory, delete memory, or block on a resource (for example, lock() on a semaphore). Therefore, RiCGEN_ISR() does not allocate new events, but uses a pointer to an event that you must supply.
There are two ways to use RiCGEN_ISR():
RiCGEN_ISR(myEventPool[theNextFreeEvent]);
You must set the CG::Event::DeleteAfterConsumption property to False.
You must set the following static memory management properties under CG::Event:
The call to RiCGEN_ISR() is as follows:
RiCGEN_ISR(RiC_Create_ev());
The definition of RiCGEN_ISR() is as follows:
#define RiCGEN_ISR(INSTANCE,EVENT) RiCReactive_gen(&((INSTANCE)->ric_reactive), (RiCEvent*)EVENT, RiCTRUE)