events
This section describes methods for working with unit events in the session.
Workflows
The events methods support the following workflows.
Retrieve historical events
To retrieve events for one unit within a specified period:
- Use events/load to load events into the session.
- Use events/get to retrieve the loaded events.
- Use events/unload before loading events for another period.
Receive event updates
To monitor events from configured units in real time:
- Use events/update_units to add units to the session and configure event detectors.
- Use events/check_updates to receive event updates since the previous call.
Alternatively, set the evt_flags parameter in events/update_units to include event updates in the session when unit data is returned, without calling events/check_updates.