wlanPSDULength
Description
returns PSDULength
= wlanPSDULength(cfgPHY
,unit
,value
)PSDULength
, the physical layer conformance procedure (PLCP)
service data unit (PSDU) length, in octets from the given value
and the
physical layer configuration cfgPHY
. The value
can
be in terms of PLCP protocol data unit (PPDU) transmission time or number of data symbols,
specified by the unit
input argument.
Examples
Generate Non-HT Waveform with Specified Transmission Time
Create a wlanNonHTConfig
object, 'cfgPHY'
, and specify the transmission time, 'txTime'
, in microseconds.
cfgPHY = wlanNonHTConfig; txTime = 300;
Calculate the PSDU length in octets.
psduLength = wlanPSDULength(cfgPHY,'TxTime',txTime)
psduLength = 207
Set the number of bytes carried in the user payload for the configuration object, 'cfgPHY'
to this PSDU length. Create a random PSDU, 'psdu'
, using the calculated PSDU length.
cfgPHY.PSDULength = psduLength; data = randi([0 1],psduLength*8,1);
Generate a non-HT waveform using 'cfgPHY'
and 'data'
.
waveform = wlanWaveformGenerator(data,cfgPHY);
Generate HT Waveform with Specified Number of Data Symbols
Create a wlanHTConfig
object, 'cfgPHY'
, and specify the number of data symbols, 'numDataSymbols'
.
cfgPHY = wlanNonHTConfig; numDataSymbols = 200;
Calculate the PSDU length in octets.
psduLength = wlanPSDULength(cfgPHY,'NumDataSymbols',numDataSymbols)
psduLength = 597
Set the number of bytes carried in the user payload for the configuration object, 'cfgPHY'
, to this PSDU length. Create a random PSDU, 'psdu'
, with the calculated PSDU length.
cfgPHY.PSDULength = psduLength; data = randi([0 1],psduLength*8,1);
Generate a non-HT waveform using 'cfgPHY'
and 'data'
.
waveform = wlanWaveformGenerator(data,cfgPHY);
Input Arguments
cfgPHY
— PHY format configuration
wlanHESUConfig
object | wlanVHTConfig
object | wlanHTConfig
object | wlanNonHTConfig
object
PHY format configuration, specified as a wlanHESUConfig
,
wlanVHTConfig
, wlanHTConfig
, or wlanNonHTConfig
object. This object defines a PHY format configuration and
its applicable properties.
unit
— Units of argument value
'TxTime'
| 'NumDataSymbols'
Units of argument value
, specified as
'TxTime'
or 'NumDataSymbols'
. This value
indicates the units of value
from which the PSDU length is
calculated.
Data Types: char
| string
value
— Value from which PSDU length is calculated
numeric scalar
Value from which PSDU length is calculated, specified as a numeric scalar. Input
argument unit
specifies the unit of value
.
This table describes how the function interprets value
based on
unit
.
unit
Value | value
Description |
'TxTime' | Scalar number specifying PPDU transmission time in microseconds |
'NumDataSymbols' | Scalar number specifying the number of symbols in the
'Data' field of PPDU |
Data Types: double
Output Arguments
PSDULength
— Length of PSDU
numeric scalar
Length of PSDU, in octets, returned as a numeric scalar. This value returns the
maximum PSDU length that fits into the specified value of 'TxTime'
or
'NumDataSymbols'
.
Data Types: double
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Version History
Introduced in R2019b
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)