function helperBLEVisualizeHRPFrame(serviceDiscRespMsg, chrsticDescRespMsg, ...
    chrsticDescDiscRespMsg, enableNotificRespMsg, heartRateMeasurement)
%helperBLEVisualizeHRPFrame Visualize the Heart Rate Profile (HRP) frames
%exchanged in HRP Example
%
%   See also helperBLEPlotHRPFrames

%   Copyright 2018 The MathWorks, Inc.

% Clear all the persistent variables in helperBLEPlotHRPFrames function
clear helperBLEPlotHRPFrames

% Update GUI
helperBLEPlotHRPFrames(0, 'Service discovery');
helperBLEPlotHRPFrames(1, 'Service discovery request()');
helperBLEPlotHRPFrames(2, serviceDiscRespMsg);
helperBLEPlotHRPFrames(0, 'Characteristic discovery');
helperBLEPlotHRPFrames(3, 'Characteristic discovery request()');
helperBLEPlotHRPFrames(4, chrsticDescRespMsg);
helperBLEPlotHRPFrames(0, 'Characteristic descriptor discovery');
helperBLEPlotHRPFrames(5, 'Characteristic descriptor discovery request()');
helperBLEPlotHRPFrames(6, chrsticDescDiscRespMsg);
helperBLEPlotHRPFrames(0, 'Subscribing for notifications');
helperBLEPlotHRPFrames(7, 'Enable notifications request (''Heart rate measurement'')');
helperBLEPlotHRPFrames(8, enableNotificRespMsg);
helperBLEPlotHRPFrames(0, '          Notifying');
helperBLEPlotHRPFrames(9, ['Notify heart rate measurement(' num2str(heartRateMeasurement) ')']);
helperBLEPlotHRPFrames(10, num2str(heartRateMeasurement));

% Clear all the persistent variables in helperBLEPlotHRPFrames function
clear helperBLEPlotHRPFrames
end