RtMonitorSetTriggers

RtMonitorSetTriggers transiently sets the event types that will trigger the starting or stopping of a monitoring session.

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:

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: