%% Create BLE GAP AD Block Configuration Object Using Name-Value Pairs
% Create a configuration object for a BLE GAP AD block using name-value pairs. Set the values of AD types as 'Advertising interval' and 'Local name', advertising interval as 48, local name as 'MathWorks' and local name shortening as true. View the properties of the corresponding configuration object.

cfgGAP = bleGAPDataBlockConfig('AdvertisingDataTypes', ...
    {'Advertising interval', ...
    'Local name'});
cfgGAP.AdvertisingInterval = 48;
cfgGAP.LocalName = 'MathWorks';
cfgGAP.LocalNameShortening = true

% Copyright 2019 The MathWorks, Inc.