RtfwSetSubsystemConfiguration
RtfwSetSubsystemConfiguration modifies the core wRTOS Subsystem configuration parameters. See structure RTFW_SUBSYSTEM_CONFIGURATION. Other subsystem configuration parameters can be modified using other functions in this library.
Syntax
bool RtfwSetSubsystemConfiguration(
[in] const RTFW_SUBSYSTEM_CONFIGURATION * pSubsystemConfiguration,
[out] DWORD * pWarning
);
Parameters
[in] pSubsystemConfiguration
A pointer to an RTFW_SUBSYSTEM_CONFIGURATION structure containing members related to the core Subsystem configuration. The member Size must be set to sizeof(RTFW_SUBSYSTEM_CONFIGURATION), otherwise this function fails and sets the last error value to RT_ERROR_STRUCTURE_TOO_SMALL.
[out] pWarning
A pointer to a value that is set to a non-zero warning code if a warning results from a successful call to this API. If this API fails, this value is undefined.
When the Subsystem is not running when this function succeeds, and the values of member TickInterval (in structure RTFW_TCPIP_CONFIGURATION) or member WatchdogTimeout (in structure RTFW_WATCHDOG_CONFIGURATION) were modified as described in structure RTFW_SUBSYSTEM_CONFIGURATION, warning code RT_WARNING_TIMER_VALUES_ROUNDED is returned.
See preprocessor macros RT_WARNING_... in header file RtErrorCodes.h for other possible warning codes.
Return Value
If the function succeeds, it returns TRUE. If the function fails, it returns FALSE and sets the last error value.
Possible error codes:
| Error code | Meaning |
|---|---|
|
ERROR_ACCESS_DENIED |
The caller did not have Administrator privileges when this API was used to modify the value of member StartMode in structure RTFW_SUBSYSTEM_CONFIGURATION. |
|
RT_ERROR_DEFAULTTIMEQUANTUM_INVALID |
DefaultTimeQuantum is not the value RTFW_DISABLE_TIME_QUANTUM and is not an integer multiple of member HALTimerPeriod in structure RTFW_SUBSYSTEM_CONFIGURATION. |
|
RT_ERROR_HALTIMER_INVALID |
Either the HAL timer period is out of range, or the default time quantum is not a multiple of the HAL timer period. |
|
RT_ERROR_RESTART_SUBSYSTEM |
The Subsystem was running when this function succeeded. RtfwRestartRequired will report that the wRTOS Subsystem must be restarted. The wRTOS Subsystem must be restarted for the changes to take effect. |
|
RT_ERROR_STRUCTURE_TOO_SMALL |
The member Size in structure RTFW_SUBSYSTEM_CONFIGURATION is too small. |
|
RT_ERROR_SUBSYSTEM_CONFIG_MBAMODE_NOT_AVAILABLE |
The system is not able to use Intel® Memory Bandwidth Technology (MBA) mode for performance differentiation among RTSS threads. |
|
RT_ERROR_SUBSYSTEM_CONFIG_CATMODE_NOT_AVAILABLE |
The system is not able to use Intel® Cache Allocation Technology (CAT) mode for performance differentiation among RTSS threads. |
|
RT_ERROR_SUBSYSTEM_CONFIG_RDTSTATE_NOT_AVAILABLE |
The system is not able to use Intel® Resource Director Technology (RDT). |
|
RT_WARNING_TIMER_VALUES_ROUNDED |
Returned when the Subsystem is not running when this function succeeds, and the values of member TickInterval in structure RTFW_TCPIP_CONFIGURATION) or member WatchdogTimeout in structure RTFW_WATCHDOG_CONFIGURATION were modified as described in structure RTFW_SUBSYSTEM_CONFIGURATION. |
Remarks
RtfwSetSubsystemConfiguration must be run with Administrator privileges. The function will fail otherwise.
The following is the best practice for using Native Library Get/Set APIs that take structures as arguments:
- Call the Get function.
- Modify the value(s) you want to change.
- Call the corresponding Set function.
The values passed in by the Set function will be saved (persistent).
A new Default Time Quantum must be less than or equal to UINT32_MAX (0xFFFFFFFF), which is the maximum valid Default Time Quantum value.
Requirements
| Minimum supported version | Header | Library |
|---|---|---|
|
wRTOS 1.0 SDK |
RtfwApi.h |
RtfwApi.lib |
See Also:
- RTFW_NETWORK_CONFIGURATION
- RTFW_SUBSYSTEM_CONFIGURATION
- RTFW_WATCHDOG_CONFIGURATION
- RtfwGetSubsystemConfiguration