ManagedCodeFrameworkClientCSharp Sample
This sample demonstrates how to utilize the wRTOS Framework from C# to modify the product's configuration, including:
- How to retrieve Runtime configuration values from the real-time Subsystem (such as the HAL Timer Period and memory pool size).
- How to access product-level information, like the installed SDK and Runtime versions.
- How .NET properties map to underlying wRTOS configuration settings.
- When a .NET property is modified, the change is written directly to persistent storage. If a read-only property is modified or an invalid value is assigned, the framework throws exceptions.
Note: This sample project will not build with the Intel Compiler.
Building the Sample
Build the solution in Visual Studio (x64 Debug or Release configuration).
Running the Sample
Run ManagedCodeFrameworkClientCSharp.exe.
Note: This sample requires IntervalZero.MaxRT.wRTOS.dll to be in the same directory as the compiled binary. The default location is C:\Program Files\IntervalZero\MaxRT\wRTOS SDK\1.0\bin\IntervalZero.MaxRT.dll
Expected Results
The console prints the following:
- HAL Timer Period, in microseconds
- Minimum local memory pool size, in bytes
- wRTOS Runtime version
- wRTOS SDK version
Example Output
The HAL Timer Period is 100 microseconds.
The initial size of the Local Memory pool is 1024 bytes.
The wRTOS Runtime version is: 1.0.0
The WRTOS SDK version is: 1.0.0
--------------------------------------------------------------
If the Subsystem is active these changes will not take effect until the Subsystem has been restarted
Run this sample again to reverse changes made to the subsystem properties
Note: If the Subsystem is currently active, configuration changes will take effect only after it is restarted.
Remarks
Changes made to Subsystem properties take effect only after the Subsystem is restarted. Run this sample again to reverse changes made to the Subsystem properties.
APIs Referenced
|
wRTOS Managed Framework |