The _gen method
queues events sent to the reactive object.
_gen works
in the following way:
- First, it sets the
destination for the event by
calling the setDestination method.
- Next, it calls the queue method to queue
the event in the OMThread event queue assigned to
this OMReactive instance.
Signaturevirtual OMBoolean _gen (OMEvent *event,
OMBoolean genFromISR = FALSE);
Parametersevent
Specifies a pointer to the event to
be sent to the reactive object.
genFromISR
Indicates whether the event is from
an operating system interrupt service request (ISR). If it is, it
requires special treatment.
ReturnsThe
method returns one of the following Boolean values:
- TRUE - The event was successfully
queued.
- FALSE - The event
was not queued.
Notes- The event consumption is asynchronous. _gen causes
the event to be inserted into an OMThread event queue.
The reactive object does not have to respond to the event
immediately.
- The genFromISR flag
supports RTOSes
(for example, VxWorks) that have restrictions on resource usage (for
example no memory allocation or waiting on semaphores) during an ISR.
- To extend framework customization, the _gen method
was set to virtual.