Log Triggers
Instead of immediately starting to log data when the StartLog function is called, a trigger can be specified. If a trigger is specified, the log data will start to be collected when the trigger is satisfied.
Triggers are specified using the LogChannelOptions class that is passed using the SetLogOption function.
Condition Trigger
To set a condition trigger, set triggerOnCondition to 1.
For each module that can collect log data, a different condition is checked. The conditions are listed in the following table.
Module |
Description |
|---|---|
CoreMotion |
If at least one data from the CoreMotionLogInput class is logged, then the trigger is satisfied when any of the following occurs. |
Log |
No trigger condition is associated with this module. |
IO |
No trigger condition is associated with this module. |
UserMemory |
No trigger condition is associated with this module. |
Platform |
For additional information, see each Platform page. |
Event Trigger
To set an event trigger, set triggerOnEvent to 1 and triggerEventID to the event ID of the event that will trigger logging.
The SetEvent function is used to set an event and retrieve its event ID.
If both a condition trigger and an event trigger are specified, the log data will start to be collected when either trigger is satisfied.