classdef InputFcn
% SLSIM.INPUTFCN is used to store an simulation callback for input values for a specified source.
%
%   iFcn = slsim.InputFcn(FCN, NAMEVALUEARGS)
%   creates an SLSIM.INPUTFCN which specifies that the function handle FCN should be invoked
%   to provide input values for the signal source identified by NAMEVALUEARGS.
%   The function handle FCN is expected to have the following signature:
%       ret = FCN(id, time)
%       id   : identifier of signal source which derives from slsim.SignalSource
%       time : simulation time at which the input value is needed
%       ret  : return value which is used as the signal value for the signal source 
%              corresponding to id.
%
%   The signal source is specfied using name value pairs NAMEVALUEARGS, where names are a subset of
%   the properties of SLSIM.SIGNALSOURCE or its derived classes
%
% Example:
%   % Create a function to handle external inputs
%{   function val = my_process_inputs_fcn(id, time)
%       % return the input value based on time and port identifier
%       % for example:
%       assert (id.Port == '1') 
%       val = sin(time);
%   end
%}
%   % Associate the callback with inport 1 of model
%   iFcn = slsim.InputFcn(@my_process_inputs_fcn, Port='1');
%
%   See also SLSIM.OUTPUTFCN

 
% Copyright 2021 The MathWorks, Inc.

    methods
        function out=InputFcn
        end

    end
    properties
        % SLSIM.INPUTFCN.DATA
        %
        % See also SLSIM.INPUTFCN
        Data;

        % SLSIM.INPUTFCN.FCN
        %   Specify a MATLAB function handle to produce signal values for a signal source for
        % See also SLSIM.INPUTFCN
        Fcn;

    end
end
