%% Create L2CAP Frame Configuration Object
% This example shows how to create a BLE logical link control and adaptation protocol (L2CAP) frame 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 L2CAP frame configuration object with default settings.

l2capframe = bleL2CAPFrameConfig 

% Modify the defaults setting the channel identifier to '0004' to specify an ATT channel.

l2capframe.ChannelIdentifier = '0004'

% Override Default Property Values During Object Creation
% Create a BLE L2CAP frame configuration object, using Name,Value pairs to specify a 'Command reject' signaling channel command with the reject reason 'Invalid CID in request'.

l2capframe = bleL2CAPFrameConfig ('CommandType','Command reject','CommandRejectReason','Invalid CID in request')

% Copyright 2018 The MathWorks, Inc.