Subsystem Class
This class provides configuration and control operations for the wRTOS monitoring framework. It is important to understand the distinction between the Persistent Event Set and the Transitent Event Set. This class allows clients to configure two sets of enabled/disabled monitoring events:
-- The Persistent Event Set
-- The Transient Event Set
The Persistent Event Set is the set of enabled/disabled monitoring events persisted in the Registry. This set is configured using wRTOS Settings. Each time the wRTOS Subsystem starts, the Persistent Event Set becomes the set of enabled monitoring events. The Transient Event Set only exists when monitoring is enabled. When the Transient Event Set exists, it controls which monitoring events are enabled/disabled. At the time monitoring is enabled, the Transient Event Set is initialized from the Persistent Event Set. The Transient Event Set is modified using wRTOS Monitor. Changes to the Transient Event Set do not affect the Persistent Event Set. When monitoring is disabled, the Transient Event Set is destroyed. The following APIs in this class provide a bool parameter to control whether the API operates on the Transient Event Set or the Persistent Event Set:
MF_EVENT_KIND[] GetMonitorEvents(bool persistant)
MF_EVENT_KIND[] DisableMonitorEvents(MF_EVENT_KIND monitorEvent, bool persistent)
MF_EVENT_KIND[] DisableMonitorEvents(bool persistent)
MF_EVENT_KIND[] DisableMonitorEvents(MF_EVENT_KIND[] monitorEventList, bool persistent)
MF_EVENT_KIND[] EnableMonitorEvents(MF_EVENT_KIND monitorEvent, bool persistent)
MF_EVENT_KIND[] EnableMonitorEvents(bool persistent)
MF_EVENT_KIND[] EnableMonitorEvents(MF_EVENT_KIND[] monitorEventList, bool persistent)
If the bool parameter in each of the above APIs is set to true, the API operates on the Persistent Event Set, otherwise the API operates on the Transient Event Set. If monitoring is not enabled (i.e., the Transient Event Set does not exist) and these APIs are commanded to operate on the Transient Event Set, these APIs throw an exception.
Inheritance Hierarchy
System.Object
IntervalZero.MaxRT.wRTOS.wRTOSObject
IntervalZero.MaxRT.wRTOS.Monitor.Subsystem
Namespace:
IntervalZero.MaxRT.wRTOS.Monitor
Assembly:
IntervalZero.MaxRT.wRTOS (in IntervalZero.MaxRT.wRTOS.dll) Version: 1.0.0.0 (File version: 1.0.1)
Syntax
public class Subsystem : wRTOSObject, IMonitorSubsystem
The Subsystem class exposes the following members.
Constructors
|
|
Name | Description |
|---|---|---|
|
|
Initializes a new instance of the Subsystem class. |
Properties
| Name | Description | |
|---|---|---|
|
|
If this property is true, the monitoring framework will automatically be enabled when the subysstem starts. Monitoring must be enabled before it can be started. |
|
|
|
If this property is set to false, when the size of the current session folder reaches the size limit specified by property LogSizeMax, the monitoring framework will stop writing monitoring event data to the current monitoring session. If this is set to true, when the size of the current session folder reaches the size limit specified by property LogSizeMax, the monitoring framework will rotate log files within the session folder, deleting the oldest file. |
|
|
|
If this property is true and property AutoEnable is also set to true, the monitoring framework will automatically be started when the Subsystem starts. Monitoring must be enabled before it can be started. |
|
|
|
True if the object has been disposed, false otherwise. (Inherited from wRTOSObject.) |
|
|
|
This property specifies the folder under which monitoring session folders are created. If this property is set, it must specify an existing folder. If the wRTOS Runtime is not installed, this property returns %PUBLIC%\Documents, where %PUBLIC% is expanded to the value of environment variable PUBLIC. |
|
|
|
This is the size limit (in MB) for how much disk space a single monitoring session folder can occupy. If this property is set to 0, monitoring events are not written to disk. If this property is changed, the Subsystem must be restarted for the change to take effect. |
|
|
|
This is the size limit, in megabytes, for all session folders under folder |
|
|
|
This property specifies the the size (in megabytes) of the internal buffer used to transport monitoring events from real-time cores to Windows cores. If this property is changed, the Subsystem must be restarted for the change to take effect. If you encounter Data Lost events, you may want to increase the size of this buffer. This property cannnot be set to a value that is greater than three-quarters of the amount of RAM. |
|
|
|
Returns the current state of the monitoring framework. |
Methods
| Name | Description | |
|---|---|---|
|
|
This method deletes all monitoring sessions. This should only be used when the monitoring framework is not enabled. |
|
|
|
Deletes the specified monitoring session folder and all the files and folders it contains. |
|
|
|
Disables the monitoring framework. |
|
|
|
Disables all events, either in the Persistent Event Set or the Transitent Event Set (depending on the value of parameter persistent). If set to true, the events will be disabled in the Persistent Event Set, and the change will not take affect until monitoring is next enabled, otherwise the events will be disabled in the Transient Event Set. Return Value Type: |
|
|
|
This method disables the event specified by parameter monitorEvent, either in the Persistent Event Set or the Transitent Event Set (depending on the value of parameter persistent). |
|
|
|
Disables the specified monitoring events, either in the Persistent Event Set or the Transient Event Set, depending on the value of parameter persistent. |
|
|
|
Dispose method. (Inherited from wRTOSObject.) |
|
|
|
Enables the monitoring framework. Monitoring must be enabled before it can be started. |
|
|
|
Enables all events, either in the Persistent Event Set or the Transitent Event Set (depending on the value of parameter persistent). If set to true, the events will be enabled in the Persistent Event Set, and the change will not take affect until monitoring is next enabled, otherwise the events will be enabled in the Transient Event Set. Return Value Type: |
|
|
|
This method enables the event specified by parameter monitorEvent, either in the Persistent Event Set or the Transitent Event Set (depending on the value of parameter persistent). |
|
|
|
Enables the specified monitoring events, either in the Persistent Event Set or the Transient Event Set, depending on the value of parameter persistent. |
|
|
|
Finalize |
Finalizer. (Inherited from wRTOSObject.) |
|
|
Retrieves the persistent or transient value of the number of events to save in a monitor session. |
|
|
|
Returns an array specifying which monitoring events are currently enabled. This array contains zero elements if no events are enabled. |
|
|
|
Retrieves the persistent or transient value of the number of pre-start-trigger events to save in a monitor session. Pre-start-trigger events are events that occur before the event that triggers the start of a monitoring session. |
|
|
|
This method returns the currently configured triggers for all kinds of events. Each element of the returned array corresponds to one enumerator in enumeration MF_EVENT_KIND. This method is thread-safe and executes atomically across all processes with respect to all other trigger-related methods. |
|
|
|
This method returns an array containing the triggers for the first 100 custom event kind values (0 to 99) for event kind MF_EVENT_KIND_CUSTOM. The returned array is exactly 100 elements long. If the Subsystem is not started, this method throws an exception of type wRTOSException. This method can be called when monitoring is stopped or started. This method is thread-safe and executes atomically across all processes with respect to all other trigger-related methods. |
|
|
|
Called when a property is changed (Inherited from wRTOSObject.) |
|
|
|
This method pauses the current monitoring session. When in a Paused state, events are not collected. Use Resume to resume a monitoring session that has been paused. |
|
|
|
Resets all monitoring-related configuration properties to their default values. |
|
|
|
This method resets all triggers for all kinds of events. If the Subsystem is not started, this method throws an exception of type Exception containing an explanatory error message. This method can be called when monitoring is stopped or started. It takes effect immediately. If any of the specified triggers are already reset, they remain reset. Triggers do not persist after the wRTOS Subsystem stops. If persistence is desired, it is the client's responsibility to save trigger state before the Subsystem stops and to restore it when the Subsystem starts. This method is thread-safe and executes atomically across all processes with respect to all other trigger-related methods. |
|
|
|
Resets property [!:AutoEnabled] to its default value (false). |
|
|
|
Resets property AutoRotateLogFiles to its default value (true). |
|
|
|
Resets property AutoStart to it's default value (false). |
|
|
|
ResetEnabledComponents |
This method resets the monitor event generation enabled status for all product components to the default setting. By default, all product components have monitor event generation enabled. This affects the persistent configuration only, not the transient configuration. |
|
|
Resets the Persistent Event Set to the default combination of enabled/disabled events (see Subsystem for details about the Persistent and Transient Event Sets). This change will take effect the next time monitoring is enabled. |
|
|
|
Resets property LogFolder to its default value (%PROGRAMDATA%\IntervalZero\Monitor). |
|
|
|
Resets property LogSizeMax to it default value (200 MB). |
|
|
|
Resets the persistent value of the number of events to save in a monitor session. |
|
|
|
Resets property MaximumFolderSize to its default value. |
|
|
|
Resets property MTBSize to its default value (200 MB). |
|
|
|
Resets the persistent value of the number of pre-start-trigger events to save in a monitor session. |
|
|
|
This method resets the specified triggers so that they do not happen for certain kinds of events. Each element of array triggers specifies the triggers to reset for the kind of event specified by the enumerator in enumeration Monitor.MF_EVENT_KIND that corresponds to the index in the array. Array triggers must contain exacly MF_EVENT_KIND.MF_EVENT_KIND_MAX elements, otherwise an exception of type wRTOSExcpetion is thrown. The triggers that are reset correspond to the bits that are set in each element of this array. If the Subsystem is not started, this method throws an exception of type Exception containing an explanatory error message. This method can be called when monitoring is stopped or started. It takes effect immediately. If any of the specified triggers are already reset, they remain reset. Triggers do not persist after the wRTOS Subsystem stops. If persistence is desired, it is the client's responsibility to save trigger state before the Subsystem stops and to restore it when the Subsystem starts. This method is thread-safe and executes atomically across all processes with respect to all other trigger-related methods. |
|
|
|
This method resets the specified triggers so that they do not happen for the specified kind of event (eventKind). Parameter triggers contains one or more of the flag enumerators from enumeration TriggerKinds specifying the triggers to be reset for this kind of event. If the Subsystem is not started, this method throws an exception of type Exception containing an explanatory error message. This method can be called when monitoring is stopped or started. It takes effect immediately. If any of the specified triggers are already reset, they remain reset. Triggers do not persist after the wRTOS Subsystem stops. If persistence is desired, it is the client's responsibility to save trigger state before the Subsystem stops and to restore it when the Subsystem starts. This method is thread-safe and executes atomically across all processes with respect to all other trigger-related methods. |
|
|
|
This method resets triggers for custom event kinds for event kind MF_EVENT_KIND_CUSTOM. Parameter customEventKindTriggers specifies the triggers to reset for the first 100 custom event kind values (0 to 99). This array must be exactly 100 elements long, otherwise an exception of type wRTOSException is thrown. If the Subsystem is not started, this method throws an exception of type Exception. This method can be called when monitoring is stopped or started. It takes effect immediately. If any of the specified triggers are already reset, they remain reset. Triggers do not persist after the wRTOS Subsystem stops. If persistence is desired, it is the client's responsibility to save trigger state before the Subsystem stops and to restore it when the Subsystem starts. This method is thread-safe and executes atomically across all processes with respect to all other trigger-related methods. |
|
|
|
This method resumes the monitoring framework from a Paused state. When a monitoring session is resumed, it continues recording events in the current session. It does not create a new session in which to record events. |
|
|
|
Sets the transient value of the number of events to save in a monitor session. |
|
|
|
Sets the transient value of the number of pre-start-trigger events to save in a monitor session. Pre-start-trigger events are events that occur before the event that triggers the start of a monitoring session. |
|
|
|
This method sets the specified triggers to happen when certain kinds of events are generated. Each element of array triggers specifies the triggers to set for the kind of event specified by the enumerator in enumeration Monitor.MF_EVENT_KIND that corresponds to the index in the array. Array triggers must contain exacly MF_EVENT_KIND.MF_EVENT_KIND_MAX elements, otherwise an exception of type wRTOSException is thrown. The triggers to be set correspond to the bits that are set in each element of this array. If the Subsystem is not started, this throws method an exception of type Exception containing an explanatory error message. This method can be called when monitoring is stopped or started. It takes effect immediately. If any of the specified triggers are already set, they remain set. These flag enumerators can be mixed with each other using bitwise operators. The following kinds of monitoring events cannot have triggers set on them. Attempting to do so will cause an exception of type Exception to be thrown:
Triggers do not persist after the wRTOS Subsystem stops. If persistence is desired, it is the client's responsibility to save trigger state before the Subsystem stops and to restore it when the Subsystem starts. This method is thread-safe and executes atomically across all processes with respect to all other trigger-related methods. IMPORTANT: This method only accumulates new triggers. It never resets a trigger. Thus, if a given kind of event has trigger X set, and this method is called to set only trigger Y for that kind of event, then that kind of event ends up with both trigger X and Y set. |
|
|
|
This method sets the specified triggers to happen when the specified kind of event (parameter eventKind) is generated. Parameter triggers contains one or more of the flag enumerators from enumeration TriggerKinds specifying the triggers to be set for this kind of event. If the Subsystem is not started, this method throws an exception of type Exception containing an explanatory error message. This method can be called when monitoring is stopped or started. It takes effect immediately. If any of the specified triggers are already set, they remain set. These flag enumerators can be mixed with each other using bitwise operators. The following kinds of monitoring events cannot have triggers set on them. Attempting to do so will cause an exception of type Exception to be thrown:
Triggers do not persist after the wRTOS Subsystem stops. If persistence is desired, it is the client's responsibility to save trigger state before the Subsystem stops and to restore it when the Subsystem starts. This method is thread-safe and executes atomically across all processes with respect to all other trigger-related methods. IMPORTANT: This method only accumulates new triggers. It never resets a trigger. Thus, if a given kind of event has trigger X set, and this method is called to set only trigger Y for that kind of event, then that kind of event ends up with both trigger X and Y set. |
|
|
|
This method sets triggers for custom event kinds for event kind MF_EVENT_KIND_CUSTOM. Parameter customEventKindTriggers specifies the triggers to be set for the first 100 custom event kind values (0 to 99). This array must be exactly 1000 elements long, otherwise an exception of type wRTOSException is thrown. If the Subsystem is not started, this method throws an exception of type Exception. This method can be called when monitoring is stopped or started. It takes effect immediately. If any of the specified triggers are already set, they remain set. Triggers do not persist after the wRTOS Subsystem stops. If persistence is desired, it is the client's responsibility to save trigger state before the Subsystem stops and to restore it when the Subsystem starts. This method is thread-safe and executes atomically across all processes with respect to all other trigger-related methods. IMPORTANT: This method only accumulates new triggers. It never resets a trigger. Thus, if a given custom event kind has trigger X set, and this method is called to set only trigger Y for that custom event kind, then that custom event kind ends up with both trigger X and Y set. |
|
|
|
Starts the monitoring framework. Monitoring must be enabled (see method Enable) before it can be started. |
|
|
|
Stops the monitoring framework. |
Events
|
|
Name | Description |
|---|---|---|
|
|
Event Fired when a property value is changed (Inherited from wRTOSObject.) |
See Also: