%% Create Link Layer Advertising Channel PDU Configuration Object
% This example shows how to create a BLE link layer advertising channel PDU configuration object. It also shows how to change the default property settings by using dot notation or by overriding the default settings by using Name,Value pairs when creating the object.
% Create Object and Then Modify Properties
% Create a BLE link layer advertising channel PDU configuration object with default settings.

lladvertpdu = bleLLAdvertisingChannelPDUConfig

%
% Modify the defaults to specify a 'Advertising direct indication' PDU.

lladvertpdu.PDUType = 'Advertising direct indication'

% Override Default Property Values During Object Creation
% Create a BLE link layer advertising channel PDU configuration object, using Name,Value pairs to specify a 'Scan response' PDU using channel section algorithm 2.

lldatapdu2 = bleLLAdvertisingChannelPDUConfig('PDUType','Scan response','ChannelSelection','Algorithm2')

% Copyright 2018 The MathWorks, Inc.