%% Create BLE LL Data Channel PDU Configuration Object for Control PDU
% Create two unique BLE LL data channel PDU configuration objects for a control PDU of type 'Channel map indication' and 'Version indication' using name-value pairs.
% Create a BLE LL control PDU payload configuration object, 'cfgControl', for a control PDU with opcode 'Channel map indication'. View the applicable properties corresponding to the specified opcode.

cfgControl = bleLLControlPDUConfig('Opcode','Channel map indication')

% Create a BLE LL data channel configuration object by specifying the values of 'LLID' as 'Control' and 'ControlConfig' as 'cfgControl'. View the properties of 'cfgLLData'.

 cfgLLData = bleLLDataChannelPDUConfig('LLID','Control', ...
    'ControlConfig',cfgControl)

% Create another BLE LL data channel configuration object, 'cfgControl' for a control PDU, this time specifying the opcode as 'Version indication'. View the applicable properties of 'cfgControl' corresponding to the specified opcode.

cfgControl.Opcode = 'Version indication';
cfgControl.SubVersionNumber = '008E'

% Create a BLE LL data channel configuration object, 'cfgLLData', by specifying the values of 'ControlConfig' as 'cfgControl' and view the applicable properties.

cfgLLData.ControlConfig = cfgControl

% Copyright 2019 The MathWorks, Inc.