C API (Component Interface)
struct HandledEvent { EventHandlerFunction* handler; struct Event event; };

An event and an associated event handler function. A HandledEvent can be fired using the syntax event.handler(event.event).


EventHandlerFunction* handler
The event handler function.
struct Event event
The event.

Attached HandledEvent

A HandledEvent can be "attached" to a Port. When attached in this way, the object field of the event automatically tracks the Data object in the Port (and is NULL when the Port is not Due). This allows automatic tracking of the Data in a Port.