RtMonitorSetTriggers
RtMonitorSetTriggers transiently sets the event types that will trigger the starting
Syntax
BOOL RtMonitorSetTriggers( const RT_MONITOR_TRIGGER_CONTROL * eventTriggers, size_t countEventTriggers, BOOL enable );
Parameters
eventTriggers
An array of RT_MONITOR_TRIGGER_CONTROL structures that will either be set or unset as monitoring triggers based on parameter enable.
countEventTriggers
The number of elements in the array.
enable
Determines whether the events are enabled or disabled as trigger events.
Return Value
Returns TRUE if successful, otherwise it returns FALSE and sets the last error value.
Remarks
Session triggers set programmatically from monitor event MF_EVENT_KIND_CUSTOM are ignored.
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_BUGCHECK_RTSS_RESERVED (Bugcheck RTSS)
- 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 (WaitForSingleObjectEx 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.
The following monitoring events are not generated in RTX64 4.3 and later versions and cannot be set as session start and/or stop triggers:
- MF_EVENT_KIND_CONTIGUOUS_MEMORY_ALLOC (Contiguous Memory Alloc)
- MF_EVENT_KIND_CONTIGUOUS_MEMORY_ALLOC_FAIL (Contiguous Memory Alloc Fail)
- MF_EVENT_KIND_CONTIGUOUS_MEMORY_SPECIFY_CACHE (Contiguous Memory Alloc Specify Cache)
- MF_EVENT_KIND_CONTIGUOUS_MEMORY_SPECIFY_CACHE_FAIL (Contiguous Memory Alloc Specify Cache Fail)
- MF_EVENT_KIND_CONTIGUOUS_MEMORY_FREE (Contiguous Memory Free)
- MF_EVENT_KIND_CONTIGUOUS_MEMORY_FAIL (Contiguous Memory Free Fail)
- MF_EVENT_KIND_LOCAL_MEMORY_EXPAND (Local Memory Expand)
- MF_EVENT_KIND_LOCAL_MEMORY_SHRINK (Local Memory Shrink)
- MF_EVENT_KIND_WINDOWS_MEMORY_ALLOC (Windows Memory Alloc)
- MF_EVENT_KIND_WINDOWS_MEMORY_ALLOC_FAIL (Windows Memory Alloc Fail)
- MF_EVENT_KIND_WINDOWS_MEMORY_FREE (Windows Memory Free)
- MF_EVENT_KIND_WINDOWS_MEMORY_FREE_FAIL (Windows Memory Free Fail)
Requirements
Minimum Supported Version |
RTX64 3.6 |
Header |
Rtapi.h |
Library | rtx_rtss.lib (RTSS), rtapi.h (Windows) |
See Also: