The eth32_event structure holds all of the information about an event that has fired. It is included in the arguments to your event handler function (see the Event Handler section).
public struct eth32_event { int id; int type; int port; int bit; int prev_value; int value; int direction; } eth32_event;
id - The user-assigned event ID that you gave this event when enabling it.
type - Event type, as defined by the Eth32EventType enumerator constants Digital, Analog, CounterRollover CounterThreshold, and Heartbeat.
port - For digital events, this specifies the port number the event occurred on. For analog events, it specifies the event bank number (0 or 1), and for counter events, it specifies which counter the event occurred on.
bit - For a digital bit event, this specifies the bit number that changed. For an analog event, it specifies the analog channel, and for a digital port event, this will be -1.
prev_value - The old value of the bit, port, or analog channel (as appropriate) before the event fired.
value - The new value of the bit, port, or analog channel that caused the event to fire. In the case of counter events, this indicates the number of times the event occurred since the last time this event was fired (almost always 1).
direction - Indicates whether the new value of the bit, port, or channel is greater or less than the previous value. It is 1 for greater than or -1 for less than.