Main Content

update

Update configuration of WLAN node

Since R2023a

Download Required: To use update, first download the Communications Toolbox Wireless Network Simulation Library add-on.

Description

example

update(nodeObj,Name=Value) updates the configuration of the WLAN node, nodeObj, according to the name-value arguments you specify.

example

update(nodeObj,deviceID,Name=Value) updates the configuration for a specific device in a non-multilink device (MLD) node or a particular link in a device within an MLD node.

For a non-MLD node, deviceID is a scalar representing the device ID. The deviceID argument is specified as the array index in the DeviceConfig property of the nodeObj input. If you do not specify the deviceID input, the default value is 1.

For an MLD node, deviceID is a vector. The first element in the vector specifies the device ID. The second element in the vector specifies the link ID which is the array index in the LinkConfig property corresponding to the DeviceConfig property of the nodeObj input. If you do not specify the deviceID input, the default value is [1 1].

Examples

collapse all

Check if the Communications Toolbox™ Wireless Network Simulation Library support package is installed. If the support package is not installed, MATLAB® returns an error with a link to download and install the support package.

wirelessnetworkSupportPackageCheck;

Create two WLAN device configuration objects, setting the Mode property of both devices to "mesh" and the BandAndChannel property of the first device to [2.4 14]. Display the CWMin property of the second device.

cfg1 = wlanDeviceConfig(Mode="mesh",BandAndChannel=[2.4 14]);
cfg2 = wlanDeviceConfig(Mode="mesh");
disp(cfg2.CWMin)
    15    15     7     3

Create a WLAN node object containing the two devices.

deviceCfg = [cfg1 cfg2];
nodeObj = wlanNode(DeviceConfig=deviceCfg);

Use the update object function to specify a new value for the CWMin property of the second device. Display the new value.

deviceID = 2;
update(nodeObj,deviceID,CWMin=[30 30 14 6])
disp(nodeObj.DeviceConfig(2).CWMin)
    30    30    14     6

Input Arguments

collapse all

WLAN node, specified as a wlanNode object. The function updates the configuration of this node.

Device ID, specified as a positive integer. Specify this argument to update the configuration of a single device in a node that contains multiple devices. In this case, the DeviceConfig property of the node is a vector of wlanDeviceConfig objects. To update the configuration of the device that corresponds to the i-th entry of this vector, specify this argument as i.

Data Types: single | double

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: CWMin=[18 3 7 5] specifies that:

  • The Best Effort access category has a contention window with a minimum range of 18.

  • The Background access category has a contention window with a minimum range of 3.

  • The Video access category has a contention window with a minimum range of 7.

  • The Voice access category has a contention window with a minimum range of 5.

Minimum range of contention window for the four access categories (ACs), specified as a vector of four integers in the range [1, 1023]. The four entries are the minimum ranges for the Best Effort, Background, Video, and Voice ACs, respectively.

Data Types: single | double

Maximum range of contention window for the four ACs, specified as a vector of four integers in the range [1, 1023]. The four entries are the maximum ranges for the Best Effort, Background, Video, and Voice ACs, respectively.

Data Types: single | double

Arbitrary interframe space values for the four access categories, specified as a vector of four integers in the range [1, 15]. The entries of the vector represent the AIFS values, in slots, for the Best Effort, Background, Video, and Voice ACs, respectively. You can set the AIFS value for an AC to 1 only if the Mode is "AP".

Data Types: single | double

Version History

Introduced in R2023a

See Also

Objects