RtfwrlySetConfiguration
RtfwrlySetConfiguration sets the Network Relay configuration.
Syntax
bool RtfwrlySetConfiguration(
[in] RTFW_RLY_CONFIGURATION * pConfiguration,
);
Parameters
[in] pConfiguration
A pointer to an RTFW_RLY_CONFIGURATION structure that specifies the Network Relay configuration. The member Size must be set to sizeof(RTFW_RLY_CONFIGURATION), otherwise this API fails and sets the last error value to RT_ERROR_STRUCTURE_TOO_SMALL.
Return Value
If the function succeeds, it returns TRUE. If the function fails, it returns FALSE. Call GetLastError to obtain an error code.
Possible error codes:
| Error code | Meaning |
|---|---|
|
RTRLY_ERROR_RESTART_NEEDED |
A parameter value was changed while the Network Relay was running. Restart the Network Relay to apply the new value. |
Remarks
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.
- Check error returns to see if a component needs to be restarted.
The values passed in by the Set function will be saved (persistent).
If the Network Relay component is running when RtfwrlySetConfiguration is called, the function will return TRUE and set the last error to RTRLY_ERROR_RESTART_NEEDED. The values specified within the structure will not take effect until the Network Relay component is restarted.
Requirements
| Minimum supported version | Header | Library |
|---|---|---|
|
wRTOS 1.0 SDK |
RtfwrlyApi.h |
RtfwrlyApi.lib |
See Also: