RtfwSetMonitorEventStates
RtfwSetMonitorEventStates enables and disables RTX64 Monitoring Framework events in the Persistent Event Set.
Syntax
bool RtfwSetMonitorEventStates( const bool * pEventStates, size_t countElements );
Parameters
pEventStates
A pointer to an array containing exactly MF_EVENT_KIND_MAX elements, indexed by the enumerators from enumeration MF_EVENT_KIND. If an element is true, the corresponding monitoring event will be enabled, otherwise it will be disabled.
countElements
Specifies the number of elements in the array pointed to by parameter pEventStates. This value must be MF_EVENT_KIND_MAX.
Return Value
The function returns true if it succeeds. Otherwise, it returns false. Call GetLastError for additional error information.
Possible error codes:
Error Code | Meaning |
---|---|
ERROR_INVALID_PARAMETER |
The function was used to disable monitoring events MF_EVENT_KIND_MARKER or MF_EVENT_KIND_DATALOST, which can never be disabled |
RT_ERROR_RESTART_SUBSYSTEM | The RTX64 Subsystem needs to be restarted for a configuration change to take effect. This error only occurs when the Subsystem is running. |
Remarks
If the number of monitoring events (i.e., MF_EVENT_KIND_MAX) in the RTX64 Runtime where the application executes differs from the number of monitoring events in the RTX64 SDK where the application was built, this parameter helps this function avoid overrunning the end of the array or reading array elements that do not correspond to valid monitoring events in the Runtime. Therefore, it is essential that client code always set this parameter.
This function only applies to the Persistent Event Set. It does not apply to the Transient Event Set.
- The Persistent Event Set is the enabled/disabled state of all monitoring events that are used to configure the state of monitor events on Subsystem start.
- The Transient Event Set is the current enabled/disabled states of all monitoring events in use by the RTX64 Subsystem. At Subsystem start, the Transient Event Set is initialized to be a copy of the Persistent Event Set. The Transient Event Set can then be modified by the Monitor Utility or RTAPI calls. At Subsystem stop, the Transient Event Set is destroyed.
Use API RtMonitorControl in RTAPI.DLL to change the enabled/disabled state of events in the Transient Event Set.
Requirements
Minimum Required Version | RTX64 3.4 |
Header | RtfwAPI.h |
Library | RtfwAPI.lib |
See Also: