function pilInfrastructureVersionString = getPILVersion
%GETPILVERSION Returns version information about the PIL infrastructure
%
% Return values:
%
% pilInfrastructureVersionString: The current version of the PIL protocol /
% implementation combination
%

% The PIL infrastructure version string derives from MATLAB
% release information and is used to ensure that PIL artifacts
% are regenerated if they are out of date with respect to the
% current install environment.   This avoids the following types of potential
% incompatibilities between releases:
%
% a) Changes to the PIL s-function API (s-function-host incompatibility)
% b) Changes in the PIL protocol
% c) Changes in PIL user connectivity implementations (host-target
% incompatibility)
%
% The other way of avoiding this issue is to always
% regenerate code for the component.   For Top-Model PIL and Model
% block PIL, code generation explicitly enforces that generated code is consistent
% with the current install environment.

%   Copyright 2014-2020 The MathWorks, Inc.

matlabVer = coder.make.internal.cachedVer('matlab');

% concatenate the version with a local version offset so that we can force a
% version mismatch if desired, for example if the PIL wrapper info
% .mat file is updated
localOffset = '_15'; 
pilInfrastructureVersionString = [matlabVer.Version ' ' matlabVer.Release localOffset];
end
