classdef CommandData < rtw.pil.NonCodeInfoData
%COMMANDDATA - XIL data to be transferred between host and target.
%              Currently processed by static (rather than generated) code 
%              on the target.

%   Copyright 2010-2024 The MathWorks, Inc.

     properties(Constant)        
        IsProtocolData=true;
    end

    properties (SetAccess = 'private', GetAccess = 'private')
        Name;
    end
    
    methods
        function this = CommandData(name, dtype, dimensions, mf0ModelInstance)
            % call superclass constructor            
            this@rtw.pil.NonCodeInfoData(dtype, dimensions, mf0ModelInstance);
            % support the concept of a name
            this.Name = name; 
        end      
        
        function val = isProtocolData(~)
            val = true;
        end
        
        function name = getName(this)
           name = this.Name; 
        end                                
                
        function targetBaseTypeIdentifier = getTargetBaseTypeIdentifier(this, ~) %#ok<INUSD,STOUT>
            assert(false, 'Should never call getTargetBaseTypeIdentifier for CommandData');
        end
        
        function writePILIODataTableEntry(this, ~, writer, targetInterface) %#ok<INUSD>
            assert(false, 'Should never call writePILIODataTableEntry for CommandData');
        end
        
        function string = getString(this, silPILWrapperUtils) %#ok<INUSD>
            string = ['CommandData: ' this.Name];
        end
    end       
end
