function v = validateBlock(this, hC)
%

%   Copyright 2023 The MathWorks, Inc.

v = hdlvalidatestruct;

slbh = hC.SimulinkHandle;
blockInfo = getBlockInfo(this, slbh);
blockName = blockInfo.Name;

stateName = get_param(slbh, 'StateName');

% the block only supports -1 (Inherit) sample time
if blockInfo.SampleTime ~= -1
    v = hdlvalidatestruct(1, message('hdlcoder:hdlssc:validate:DSSSampleTimeUnsupported', blockName));
end

% state attributes must be empty
if ~isempty(stateName)
    v(end+1) = hdlvalidatestruct(1, message('hdlcoder:hdlssc:validate:DSSStateAttributesUnsupported', blockName));
end

end
