Create WLAN MAC frame configuration object
The wlanMACFrameConfig
object is a WLAN medium access control (MAC)
frame configuration object that initializes properties for an IEEE®
802.11™ MAC frame.
creates a WLAN
MAC frame configuration object, config
= wlanMACFrameConfigconfig
, with default property
values.
sets properties of config
= wlanMACFrameConfig(Name,Value
)config
using one or more
Name,Value
pair arguments.
At run time, the calling function, wlanMACFrame
,
validates object settings for properties relevant to its operation.
FrameType
— Type of MAC frame'Beacon'
(default) | 'RTS'
| 'CTS'
| 'ACK'
| 'Block Ack'
| 'Data'
| 'Null'
| 'QoS Data'
| 'QoS Null'
Type of MAC frame, specified as one of these values: 'Beacon'
,
'RTS'
, 'CTS'
, 'ACK'
,
'Block Ack'
, 'Data'
, 'Null'
,
'QoS Data'
, or 'QoS Null'
.
Data Types: char
| string
FrameFormat
— Format of MAC frame'Non-HT'
(default) | 'HT-Mixed'
| 'VHT'
| 'HE-SU'
| 'HE-EXT-SU'
Format of the MAC frame, specified as 'Non-HT'
,
'HT-Mixed'
, 'VHT'
, 'HE-SU'
,
or 'HE-EXT-SU'
, depending on the FrameType
property value.
When FrameType
is 'QoS Data'
, you can
specify any of the available options.
When FrameType
is 'QoS Null'
, you can
specify only 'Non-HT'
or 'HT-Mixed'
.
To enable this property, both of these conditions must occur.
Data Types: char
| string
ToDS
— Frame is directed to DSfalse
or 0
(default) | true
or 1
Frame is directed to a distributed system (DS), specified as a numeric or logical
1
(true
) or 0
(false
). To indicate that the frame is directed from a non-access
point (non-AP) station to a DS, set this property to 1
(true
).
Data Types: logical
FromDS
— Frame is exiting DStrue
or 1
(default) | false
or 0
Frame is exiting a DS, specified as a numeric or logical 1
(true
) or 0
(false
). To
indicate that the frame is directed from a DS to a non-AP station, set this property to
1
(true
).
Data Types: logical
Retransmission
— Retransmitted framefalse
or 0
(default) | true
or 1
Retransmitted frame, specified as a numeric or logical 1
(true
) or 0
(false
). To
indicate that the frame is a retransmission, set this property to 1
(true
).
Data Types: logical
PowerManagement
— Power management modefalse
or 0
(default) | true
or 1
Power management mode, specified as a numeric or logical 1
(true
) or 0
(false
). To
indicate that the sender is in power-saving mode, set this property to
1
(true
).
Data Types: logical
MoreData
— More data indicationfalse
or 0
(default) | true
or 1
More data indication, specified as a numeric or logical 1
(true
) or 0
(false
). To
indicate that the sender has more frames to send, set this property to
1
(true
).
Data Types: logical
ProtectedFrame
— Protected frame indicationfalse
or 0
(default) | true
or 1
Protected frame indication, specified as a numeric or logical 1
(true
) or 0
(false
). To
indicate that the frame is protected with a cryptographic encapsulation algorithm, set
this property to 1
(true
).
This property applies only when the Decoded
property is 1
(true
).
Data Types: logical
HTControlPresent
— Frame includes HT control fieldfalse
or 0
(default) | true
or 1
Frame includes the high-throughput (HT) control field, specified as a numeric or
logical 1
(true
) or 0
(false
). To indicate that the HT control field is included in the
MAC header, set this property to 1
(true
)
Data Types: logical
Duration
— Amount of time for which channel is reserved0
(default) | integer in the interval [0, 215 – 1]Amount of time, in microseconds, for which the channel is reserved after frame transmission ends, specified as an integer in the interval [0, 215 – 1].
Data Types: double
Address1
— Receiver address'FFFFFFFFFFFF'
(default) | 12-element character vector | string scalarReceiver address, specified as a 12-element character vector or a string scalar
representing a six-octet hexadecimal value. The default value,
'FFFFFFFFFFFF'
, is a broadcast address.
Data Types: char
| string
Address2
— Transmitter address'00123456789B'
(default) | 12-element character vector | string scalarTransmitter address, specified as a 12-element character vector or a string scalar representing a six-octet hexadecimal value.
Data Types: char
| string
Address3
— BSSID, DA, or SA'00123456789B'
(default) | 12-element character vector | string scalarBasic service set identifier (BSSID), destination address (DA), or source address (SA), specified as a 12-element character vector or a string scalar representing a six-octet hexadecimal value.
Data Types: char
| string
Address 4
— SA or BSSID'00123456789B'
(default) | 12-element chanracter vector | string scalarSequenceNumber
— Frame sequence number0
(default) | integer in the interval [0, 4095]Frame sequence number, specified as an integer in the interval [0, 4095].
When the MPDUAggregation
property is 1
(true
), this property represents the sequence number of the
first MAC protocol data unit (MPDU). The sequence numbers for subsequent MPDUs
increase in increments of one.
When the FrameType
property is 'Block Ack'
, this property represents the starting
sequence number.
Data Types: double
TID
— Traffic identifier representing user priority0
(default) | integer in the interval [0, 7]Traffic identifier representing user priority, specified as an integer in the interval [0, 7].
Data Types: double
AckPolicy
— Acknowledgment policy'No Ack'
(default) | 'Normal Ack/Implicit Block Ack Request'
| 'No explicit acknowledgment/PSMP Ack/HTP Ack'
| 'Block Ack'
Acknowledgment policy, specified as 'No Ack'
, 'Normal
Ack/Implicit Block Ack Request'
, 'No explicit acknowledgment/PSMP
Ack/HTP Ack'
, or 'Block Ack'
.
Data Types: string
| char
HTControl
— HT control field of MAC header'00000000'
(default) | eight-element character vector | string scalarHT control field of the MAC header, specified as an eight-element character vector
or a string scalar representing a four-octet hexadecimal value. The leftmost byte in
HTControl
must be the most significant byte.
Data Types: string
| char
MSDUAggregation
— Form A-MSDUs using MSDU aggregationfalse
or 0
(default) | true
or 1
Form aggregated MAC service data units (A-MSDUs) using MSDU aggregation, specified
as a numeric or logical 1
(true
) or
0
(false
).
When you set this property to 1
(true
), the
MAC frame returned on calling wlanMACFrameConfig
in the wlanMACFrame
function contains A-MSDUs instead of MSDUs.
To enable this property, set the FrameType
property to 'QoS Data'
.
Data Types: logical
MPDUAggregation
— Form A-MPDUs using MPDU aggregationfalse
or 0
(default) | true
or 1
Form A-MPDUs using MPDU aggregation, specified as a numeric or logical
1
(true
) or 0
(
false
). To indicate that the MAC frame initialized by
wlanMACMFrameConfig
contains A-MPDUs instead of MPDUs, set this
property to 1
(true
).
When you set the FrameType
to
'QoS Data'
and FrameFormat
to 'VHT'
, the MAC frame returned on calling
wlanMACFrameConfig
in wlanMACFrame
contains A-MPDUs instead of MPDUs.
To enable this property, these conditions must occur.
The FrameType
property must be 'QoS
Data'
.
The FrameFormat
property must be
'HT-Mixed'
.
The Decoded
property must be 0
.
Data Types: logical
AMSDUDestinationAddress
— Destination address of all A-MSDU subframes'00123456789A'
(default) | 12-element character vector | string scalarDestination address of all A-MSDU subframes, specified as a 12-element character vector or a string scalar representing a six-octet hexadecimal value.
Data Types: char
| string
AMSDUSourceAddress
— Source address of all A-MSDU subframes'00123456789B'
(default) | 12-element character vector | string scalarSource address of all A-MSDU subframes, specified as a 12-element character vector or a string scalar representing a six-octet hexadecimal value.
Data Types: char
| string
MinimumMPDUStartSpacing
— Minimum spacing between start of MPDUs0
(default) | integer in the interval [0, 7]BlockAckBitmap
— Block ack bitmapBlock ack bitmap, specified as a character vector or string scalar of octets in hexadecimal format. To indicate an eight-octet block ack bitmap, specify a 16-element character vector or string scalar. To indicate a 32-octet block ack bitmap, specify a 64-element character vector or string scalar.
Data Types: char
| string
ManagementConfig
— Management frame-body configurationwlanManagementConfig
objectManagement frame-body configuration, specified as a wlanMACManagementConfig
object. This property applies only to management
frames. This property specifies the fields and information elements (IEs) present within
the frame body of the management frame.
To enable this property, set the FrameType
property to 'Beacon'
.
Decoded
— Decoded MPDU indication0
| 1
This property is read-only.
Decoded MPDU indication, returned as a logical 1
or
0
. When the wlanMPDUDecode
function
creates this object as an output of the MPDU decoding process, this property is
1
. Otherwise, this property is 0
.
Data Types: logical
Create a wlanMACFrameConfig
object for a request to send (RTS) frame and display the properties of the object.
cfgMAC = wlanMACFrameConfig;
cfgMAC.FrameType = 'RTS';
disp(cfgMAC)
wlanMACFrameConfig with properties: FrameType: 'RTS' PowerManagement: 0 MoreData: 0 Duration: 0 Address1: 'FFFFFFFFFFFF' Address2: '00123456789B' Read-only properties: Decoded: 0
Create a wlanMACFrameConfig
object for a quality-of-service (QoS) Data frame. Disable acknowledgement and enable power-saving mode.
config = wlanMACFrameConfig('FrameType','QoS Data','AckPolicy','No Ack', ... 'PowerManagement',true);
Specify the frame sequence number and traffic identifier. Display the properties of the MAC frame configuration object.
config.SequenceNumber = 5; config.TID = 7; disp(config);
wlanMACFrameConfig with properties: FrameType: 'QoS Data' FrameFormat: 'Non-HT' ToDS: 0 FromDS: 1 Retransmission: 0 PowerManagement: 1 MoreData: 0 Duration: 0 Address1: 'FFFFFFFFFFFF' Address2: '00123456789B' Address3: '00123456789B' SequenceNumber: 5 TID: 7 AckPolicy: 'No Ack' MSDUAggregation: 0 Read-only properties: Decoded: 0
[1] IEEE Std 802.11-2016 (Revision of IEEE Std 802.11-2012). “Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications.” IEEE Standard for Information technology — Telecommunications and information exchange between systems. Local and metropolitan area networks — Specific requirements.
[2] IEEE P802.11ax™/D4.1. “Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications. Amendment 1: Enhancements for High Efficiency WLAN.” Draft Standard for Information technology — Telecommunications and information exchange between systems. Local and metropolitan area networks — Specific requirements.
You have a modified version of this example. Do you want to open this example with your edits?