RtMonitorSetTriggers

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

Syntax

Copy
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:

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: