Overview
Events allow a specific action to automatically execute when a condition is satisfied.
Up to maxEvents events may be defined at any time.
The following figure shows the parts that comprise an event.

Event ID
The Event ID is an identification number that uniquely identifies an event.
For detailed specifications, see ID Numbers.
Event Input
The event input is represented by the EventInput class.
This defines the condition that will trigger the event. One of several classes that inherit EventInput is used (the EventInput class cannot be directly instantiated). Each class is defined in a separate module, and contains several types of conditions.
These classes are shown in the following figure.

A description of each class and the input types defined in that class are listed below.
Core Motion Inputs - Defines event conditions that trigger the event based on the axis motion. Parameters are specified with the CoreMotionEventInput class.
Event Inputs - Defines event conditions that trigger the event based on other events. Parameters are specified with the EventApiEventInput class.
I/O Inputs - Defines event conditions that trigger the event based on I/O states. Parameters are specified with the IoEventInput class.
User Memory Inputs - Defines event conditions that trigger the event based on user memory states. Parameters are specified with the UserMemoryEventInput class.
Event Output
The event output is represented by the EventOutput class.
This defines the action to execute when the event triggers. One of several classes that inherit EventOutput is used (the EventOutput class cannot directly be instantiated). Each class is defined in a separate module, and contains several types of actions.
These classes are shown in the following figure.

A description of each class and the output types defined in that class are listed below.
Core Motion Outputs - Defines event actions that execute axis motion or trigger the flight recorder. Parameters are specified with the CoreMotionEventOutput class.
Event Outputs - Defines event actions that enables other events. Parameters are specified with the EventApiEventOutput class.
API Buffer Outputs - Defines event actions that execute the API buffer. Parameters are specified with the ApiBufferEventOutput class.
I/O Outputs - Defines event actions that set the I/O outputs. Parameters are specified with the IoEventOutput class.
User Memory Outputs - Defines event actions that set the user memory. Parameters are specified with the UserMemoryEventOutput class.
Event Option
Event options are specified using the EventOption class.
This class is optional and may be omitted when defining the event, in which case the event will be defined with all options disabled.
Note that if the event is defined without setting the enable option, the event will not trigger until it is enabled with the EnableEvent function.
After defining the above values, the event can be registered with the SetEvent function.