RtMonitorChangeState

RtMonitorChangeState transitions the status of monitoring.

NOTE: The Subsystem must be started and Monitoring must be enabled in order for this function to work.

Syntax

BOOL RtMonitorChangeState(
    RTX64_MONITOR_CONTROL_OP monitorState,
);

Parameters

monitorState

One of the following enumerators from enumeration RTX64_MONITOR_CONTROL_OP:

Constant Meaning
MONITOR_CONTROL_START

Start a monitoring session.

MONITOR_CONTROL_PAUSE Pause the collection of monitoring events during the current session without having to create a new session file.
MONITOR_CONTROL_RESUME Resume the monitoring session from a paused state.
MONITOR_CONTROL_STOP Stop the current monitoring session.

Return Value

Returns TRUE if successful, otherwise it returns FALSE and sets the last error value.

Possible error codes:

Error Code Meaning

ERROR_INVALID_PARAMETER

A value other than one of the monitoring states in RTX64_MONITOR_CONTROL_OP has been specified.

RT_ERROR_MONITORING_INVALID_STATE_TRANSITION

Monitoring cannot transition from its current state to the new state.

Remarks

Enabling monitoring with this API causes CPU and disk I/O overhead. You can eliminate this overhead by programmatically stopping or disabling monitoring with this API or with RtMonitorControl.

Requirements

Minimum Supported Version

 

RTX64 3.6

Header

Rtapi.h

Library rtx_rtss.lib (RTSS), rtapi.h (Windows)

See Also: