Rtfwnl2SetConfiguration

Rtfwnl2SetConfiguration sets the configuration of the Network Link Layer (NL2).

Syntax

Copy
bool Rtfwnl2SetConfiguration(
    [in] RTFW_NL2_CONFIGURATION * pConfiguration,
);

Parameters

[in] pConfiguration

A pointer to an RTFW_NL2_CONFIGURATION structure that specifies the NL2 configuration. The member Size must be set to sizeof(RTFW_NL2_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

RT_ERROR_INVALID_IDEAL_PROCESSOR

Member IdealProcessor in the RTFW_NL2_CONFIGURATION structure is not valid.

RT_ERROR_INVALID_THREAD_PRIORITY

Member Priority in the RTFW_NL2_CONFIGURATION structure is not valid.

RT_ERROR_STRUCTURE_TOO_SMALL

Member Size of a structure is too small.

Remarks

The following is the best practice for using Native Library Get/Set APIs that take structures as arguments:

  1. Call the Get function.
  2. Modify the value(s) you want to change.
  3. Call the corresponding Set function.
  4. 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 NL2 is running when Rtfwnl2SetConfiguration is called, the values specified within the structure will not take effect until the NL2 is restarted.

Requirements

Minimum supported version Header Library

wRTOS 1.0 SDK

Rtfwnl2Api.h

Rtfwnl2Api.lib

See Also: