RtMonitorSetTriggers
RtMonitorSetTriggers transiently sets the event types that will trigger the starting or stopping of a monitoring session.
Syntax
BOOL RtMonitorSetTriggers(
[in] const RT_MONITOR_TRIGGER_CONTROL * eventTriggers,
[in] size_t countEventTriggers,
[in] BOOL enable
);
Parameters
[in] eventTriggers
An array of RT_MONITOR_TRIGGER_CONTROL structures that will either be set or unset as monitoring triggers based on parameter enable.
[in] countEventTriggers
The number of elements in the array.
[in] enable
Determines whether the events are enabled or disabled as trigger events.
Return Value
If the function succeeds, it returns TRUE. If the function fails, it returns FALSE and sets the last error value.
Remarks
Session triggers cannot be set for specific custom events. Attempts to create a session trigger from monitor event MF_EVENT_KIND_CUSTOM will fail with error code RT_ERROR_CUSTOM_TRIGGER_DISALLOWED.
For operation MONITOR_CONTROL_SET_EVENT_TRIGGERS, the following kinds of monitoring events cannot be associated with triggers:
- MF_EVENT_KIND_RESERVED (Reserved)
- MF_EVENT_KIND_MARKER (Marker)
- MF_EVENT_KIND_SUBSYSTEM_STOP (Subsystem Stop)
- MF_EVENT_KIND_FAST_SEMAPHORE_ACQUIRE (Fast Semaphore Acquire)
- MF_EVENT_KIND_FAST_SEMAPHORE_RELEASE (Fast Semaphore Release)
- MF_EVENT_KIND_FAST_SEMAPHORE_RELEASE_ALL (Fast Semaphore Release All)
- MF_EVENT_KIND_WFSOEX_WAIT (RtWaitForSingleObjectEx Wait)
- MF_EVENT_KIND_WFMOEX_WAIT (WaitForMultipleObjectEx Wait)
- MF_EVENT_KIND_THREAD_SLEEP (Thread Sleep)
Attempts to associate one of the above event kinds with a trigger will cause RtMonitorSetTriggers to fail with ERROR_INVALID_PARAMETER.
Requirements
| Minimum supported version | Header | Library |
|---|---|---|
|
wRTOS 1.0 SDK |
RtApi.h |
RtApi.lib (Windows), Startup.lib (RTSS) |
See Also: