classdef (Hidden = true) TargetApplicationFramework < rtw.connectivity.Component
%TARGETAPPLICATIONFRAMEWORK provides a BUILDINFO for use with a BUILDER
%
%   You must make a subclass of TARGETLAUNCHER. This subclass must add any
%   required driver files to the BUILDINFO object. For example, these driver
%   files may include device drivers for communication with a host machine.
%
%   This is an undocumented class. Its methods and properties are likely to
%   change without warning from one release to the next.

%   Copyright 2007-2020 The MathWorks, Inc.

    properties (Access = 'private')
        % default values for the CS Rx and Tx buffer sizes on the target.
        % The TX buffer is used to concatenate small data writes into 
        % chunks of reasonable size for transmission while the RX buffer is
        % used by the CS to receive packets of data from the host.
        % Note that for SIL, we use much larger buffers. These are set in 
        % HostDemoApplicationFramework.
        TargetRecvBufferSizeBytes = 128;
        TargetSendBufferSizeBytes = 128;
    end
    
    % private properties
    properties(SetAccess = 'private', GetAccess = 'private')
        buildInfo;        
    end

    % constructor
    methods
        function this = TargetApplicationFramework(componentArgs)
            narginchk(1, 1);
            % call super class constructor                             
            this@rtw.connectivity.Component(componentArgs);
            % create a default BuildInfo object
            this.buildInfo = RTW.BuildInfo;
        end
    end

    % methods can't be overridden
    methods (Sealed = true)
        function buildInfo = getBuildInfo(this)
            narginchk(1, 1);
            buildInfo = this.buildInfo;
        end
    end
    
    methods (Sealed = true, Hidden, Access = 'public')
            
        function val = getTargetRecvBufferSizeBytes(this)
            val = this.TargetRecvBufferSizeBytes;
        end
        
        function val = getTargetSendBufferSizeBytes(this)
            val = this.TargetSendBufferSizeBytes;
        end
        
        function setTargetRecvBufferSizeBytes(this, val)
            this.TargetRecvBufferSizeBytes = val;
        end
        
        function setTargetSendBufferSizeBytes(this, val)
            this.TargetSendBufferSizeBytes = val;
        end        
    end
end
