Contenido principal

wlanNode

WLAN node

Since R2023a

Description

Use the wlanNode object to create and configure a WLAN node. This feature also requires the Wireless Network Toolbox™ product (since R2026a).

Creation

Description

nodeObj = wlanNode creates a default WLAN node object.

example

nodeObj = wlanNode(PropertyName=Value) sets properties of the WLAN node object using one or more optional name-value arguments. You can also use this syntax to create a row vector of WLAN node objects by setting the value of the Position property.

example

Properties

expand all

Node name, specified as a character vector, string scalar, string vector, or cell array of character vectors. The default format of this value is "NodeN", where N is the node identifier specified by the ID property.

When you create a vector of wlanNode objects by specifying the Position property, you can name each node in the vector at once by specifying the Name as a string vector or a cell array of character vectors. If the length of the Name vector is greater than the number of nodes, the extra names do not apply. If the length of the Name vector is less than the number of nodes, the extra nodes get default names. When creating this object, you can configure names for multiple nodes simultaneously by setting this property as a name-value argument.

Note

Since R2026a, you can set this property only when you create the object. After creation, the property is read-only. In releases R2025b and earlier, after creating the object, you can set the value of this property for one WLAN node object at a time.

Data Types: char | string

Position in 3-D Cartesian coordinates, specified as a numeric N-by-3 matrix, where N is the number of nodes. By specifying a matrix with N greater than one, you can create a 1-by-N vector of wlanNode objects.

Specify this value in meters. This value specifies the positions of the nodes in Cartesian x-, y-, and z-coordinates. When creating this object, you can configure positions for multiple nodes simultaneously by setting this property as a name-value argument. Once you create this object, you can set this property for one wlannode object at a time.

Data Types: double

Since R2026a

This property is read-only after object creation.

MAC frame abstraction, specified as "full-mac-with-frame-abstraction" or "full-mac". Set this property to "full-mac-with-frame-abstraction" to make the MAC frame abstract. An abstract MAC frame means that the node does not generate MAC frame bits.

Before R2026a: Specify the MACFrameAbstraction property instead of MACModel. For more information, see Version History.

Note

All nodes in the network must specify the same value for this property.

Data Types: char | string

Since R2026a

This property is read-only after object creation.

Physical layer (PHY) abstraction method, specified as "abstract-phy-tgax-evaluation-methodology", "abstract-phy-tgax-mac-calibration", or "full-phy".

  • The value "abstract-phy-tgax-evaluation-methodology" corresponds to the abstraction method detailed in Appendix 1 of IEEE® 802.11™-14/0571r12 [1].

  • The value "abstract-phy-tgax-mac-calibration" corresponds to the abstraction method detailed in IEEE 802.11-14/0980r16 [2].

  • The value "full-phy" corresponds to full PHY processing.

Note that, though the referenced IEEE abstraction methodologies have been developed for the 802.11ax™ standard, WLAN Toolbox™ simulations use them for all packet formats. For more information on these abstraction methodologies, see PHY Abstraction.

Before R2026a: Specify the PHYAbstractionMethod property instead of PHYModel. For more information, see Version History.

Note

All nodes in the network must specify the same value for this property.

Data Types: char | string

Device configuration, specified as a wlanDeviceConfig object, a vector of wlanDeviceConfig objects, or a wlanMultilinkDeviceConfig object. If you want to configure one or multiple non-multilink devices (non-MLDs), specify this property as a wlanDeviceConfig object or a vector of wlanDeviceConfig objects, respectively. To specify settings for multiple devices in one node, you must set the Mode property of each object in the vector to "AP" or "mesh".

Note

You can set this property only when you create the object. After creation, the property is read-only.

Since R2026a

Node mobility model, represented as an object of a subclass of wnet.Mobility class.

Note

Only the wlanNode subclass can set the Mobility property in its constructor or methods. The addMobility object function of the wlanNode object adds a mobility model to WLAN nodes.

This property is read-only.

Node identifier, returned as an integer. This value specifies a unique identifier for the node in the simulation.

Note

If you create and store the WLAN nodes in an uninitialized matrix, the IDs that this property allocates to the nodes can be non-sequential because of the memory allocation of the object in the matrix. For more information about MATLAB memory allocation, see How MATLAB Allocates Memory.

Data Types: double

Since R2026a

This property is read-only.

Node velocity in 3-D Cartesian coordinates, represented as a three-element numeric row vector. The units are in meters per second.

Data Types: double

Object Functions

associateStationsAssociate stations with WLAN node
addTrafficSourceAdd data traffic source to WLAN node
addMeshPathAdd mesh path to WLAN node
addMobilityAdd random waypoint mobility model to WLAN node
registerEventCallbackRegister callback for event from WLAN node
updateUpdate configuration of WLAN node
statisticsStatistics of WLAN node

Examples

collapse all

This example enables you to:

  1. Create and configure a WLAN with an access point (AP) node and a station (STA) node.

  2. Add application traffic from the AP node to the STA node.

  3. Simulate the WLAN and retrieve the statistics of the AP node and the STA node.

Create a wireless network simulator.

networksimulator = wirelessNetworkSimulator.init();

Create a wlanDeviceConfig object, specifying the operating mode and beacon interval. Use this configuration to create a WLAN node and specify its name and position.

deviceCfg = wlanDeviceConfig(Mode="AP",BeaconInterval=5);
apNode = wlanNode(Name="AP",Position=[0 10 0],DeviceConfig=deviceCfg);

Create a WLAN node with the default device configuration. Confirm that the default mode is STA.

staNode = wlanNode(Name="STA",Position=[5 0 0]);

Add a random waypoint mobility model to the WLAN node with the default device configuration. Set the shape of the node's mobility area to "circle".

addMobility(staNode,BoundaryShape="circle",RefreshInterval=0.1)

Associate the STA node with the AP node using the associateStations function.

associateStations(apNode,staNode);

Create a networkTrafficOnOff (Wireless Network Toolbox) object to generate an On-Off application traffic pattern. Specify the data rate in kilobits per second and the packet size in bytes.

traffic = networkTrafficOnOff(DataRate=100,PacketSize=10);

Add application traffic from the AP node to the STA node.

addTrafficSource(apNode,traffic,DestinationNode=staNode);

Add the AP node and STA node to the wireless network simulator.

addNodes(networksimulator,{apNode,staNode});

Set the simulation time in seconds and run the simulation.

simulationTime = 0.5;
run(networksimulator,simulationTime);

Get and display the physical layer (PHY) statistics that correspond to the AP node and STA node.

apStats = statistics(apNode);
staStats = statistics(staNode);
disp(apStats.PHY)
         TransmittedPackets: 1243
    TransmittedPayloadBytes: 58779
            ReceivedPackets: 1146
       ReceivedPayloadBytes: 16044
             DroppedPackets: 0
disp(staStats.PHY)
         TransmittedPackets: 1146
    TransmittedPayloadBytes: 16044
            ReceivedPackets: 1243
       ReceivedPayloadBytes: 58779
             DroppedPackets: 0

More About

expand all

References

[1] IEEE 802.11-14/0571r12, TGax Evaluation Methodology.

[2] IEEE 802.11-14/0980r16, TGax Simulation Scenarios.

Version History

Introduced in R2023a

expand all