%% Deaggregate HT-Format A-MPDU
% Deaggregate a high-throughput-format (HT-format) A-MPDU, specified in octet form.
% Create a WLAN MAC frame configuration object, specifying the frame type, frame format, and MPDU aggregation.

cfgMAC = wlanMACFrameConfig('FrameType','QoS Data','FrameFormat','HT-Mixed','MPDUAggregation',1);

% Create an HT-format configuration object, specifying MPDU aggregation.

cfgPHY = wlanHTConfig('AggregatedMPDU',1);

% Create a random payload of eight MSDUs and use it generate an A-MPDU in octet form.

payload = repmat({randi([0 255],1,40)},1,8);
ampdu = wlanMACFrame(payload,cfgMAC,cfgPHY);

% Return the list of MPDUs by deaggregating the A-MPDU.

[mpduList,delimiterCRCFail,status] = wlanAMPDUDeaggregate(ampdu,cfgPHY,'DataFormat','octets');

% Copyright 2018 The MathWorks, Inc.