%% Create GAP Data Block Configuration Object
% This example shows how to create a BLE GAP data block 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 GAP data block configuration object with default settings.

gapDataBlk = bleGAPDataBlockConfig  

% Modify the defaults to specify for an advertising data block for 'Flags' and 'Tx power level' advertising data types.

gapDataBlk.AdvertisingDataTypes = {'Flags'; 'Tx power level'}
gapDataBlk.AdvertisingDataTypes

% Overide Default Property Values During Object Creation
% Create a BLE GAP data block configuration object, using Name,Value pairs to specify 'Advertising interval' and 'Local name' advertising data types.

gapDataBlk = bleGAPDataBlockConfig  ('AdvertisingDataTypes', {'Advertising interval', 'Local name'})
gapDataBlk.AdvertisingDataTypes

% Copyright 2018 The MathWorks, Inc.