classdef getSimulinkMapping< handle
% autosar.api.getSimulinkMapping API class.
%
% MAPPINGOBJ = autosar.api.getSimulinkMapping(MDLNAME) creates an object
% MAPPINGOBJ that can be used to query and set the Simulink mapping of
% Simulink model MDLNAME
% getSimulinkMapping methods:
%    getDataTransfer   - get the mapping information for a Simulink data transfer line
%    getFunction       - get the mapping information for a Simulink entry-point function
%    getInport         - get the mapping information for a Simulink inport
%    getOutport        - get the mapping information for a Simulink outport
%    getFunctionCaller - get the mapping information for a Simulink function caller block
%    getSignal         - get the mapping information for a Simulink block signal
%    getState          - get the mapping information for a Simulink block state
%    getDataStore      - get the mapping information for a Simulink Data Store Memory Block
%    getParameter      - get the mapping information for a Simulink model workspace parameter
%    mapDataTransfer   - map a Simulink data transfer line
%    mapFunction       - map a Simulink entry-point function
%    mapInport         - map an inport
%    mapOutport        - map an outport
%    mapFunctionCaller - map a function caller
%    mapSignal         - map a Simulink block signal
%    mapState          - map a Simulink block state
%    mapDataStore      - map a Simulink DSM Block
%    mapParameter      - map a Simulink model workspace parameter
%    addSignal         - add Simulink block signal to mapping
%    removeSignal      - remove Simulink block signal from mapping
%    getInternalDataPackaging   - get the default packaging for internal data
%    setInternalDataPackaging   - set the default packaging for internal data
%    getDataDefaults   - get the default mapping for a model element
%    setDataDefaults   - set the default mapping for a model element
%    getClassName        - get the adaptive C++ class name
%    setClassName        - set the adaptive C++ class name
%    getClassNamespace   - get the adaptive C++ namespace enclosing the generated model class
%    setClassNamespace   - set the adaptive C++ namespace enclosing the generated model class
%    find              - find returns an array of objects to uniquely identify modeling elements of a given category
%
% See also autosar.api.syncModel autosar.api.create autosar.api.getAUTOSARProperties

 
%   Copyright 2012-2023 The MathWorks, Inc.

    methods
        function out=getSimulinkMapping
            % NOTE, when updating the interface of this function (including
            % optional arguments and their possible values), also update the
            % corresponding JSON file for tab completion located in
            % matlabroot/toolbox/coder/autosar/resources/functionSignatures.json and add
            % relevant testing in
            % matlabroot/test/toolbox/rtw/targets/AUTOSAR/API/TabCompletion
            % this will help ensure keeping tab completion up to date
        end

        function out=addSignal(~) %#ok<STOUT>
            % ADDSIGNAL(THIS, PORTHANDLE)
            % adds Simulink signal specified on block output port
            % PORTHANDLE to mapping.
            %
            %   PortHandle Handle of a block output port, where signal or
            %              testpoint is specified
            %
            % Examples:
            %
            % Add Simulink signal originating from block RelOpt, port 1
            %
            % mappingObj = autosar.api.getSimulinkMapping('autosar_swc_counter');
            % addSignal(mappingObj, PortHandle);
            %
            % PortHandle can be obtained form block as follows:
            % PortHandles = get_param('autosar_swc_counter/RelOpt', 'PortHandles');
            % PortHandle = PortHandles.Outport;
            % See also removeSignal
        end

        function out=addSynthesizedDataStore(~) %#ok<STOUT>
            % ADDSYNTHESIZEDDATASTORE(THIS, SIGNALNAME)
            % Adds a code mapping for a local data store resolved to a
            % Simulink.Signal object in the model workspace
            %
            % signalName specifies the name of the Simulink.Signal object
            % could be a char array, a string, a string array
            % (e.g. 'Sig1', "Sig1", ["Sig1", "Sig2"])
            %
            % Examples:
            %
            % Open model 'autosar_swc_counter'
            % Add a model workspace signal object named 'Sig1'
            % (optional) Add a data store read or write that resolves to 'Sig1'
            % Then do:
            % mappingObj = autosar.api.getSimulinkMapping('autosar_swc_counter');
            % mappingObj.addSynthesizedDataStore('Sig1');
            %
            % See also removeSynthesizedDataStore
        end

        function out=find(~) %#ok<STOUT>
            % FIND returns an array of handles, paths or names, depending
            % on the category, to uniquely identify modeling elements of a given category.
            % FIND(THIS, CATEGORY)
            %
            %   category   Category of modeling element.
            %              - Valid categories for data are Inports, Outports, Signals,
            %              States, ModelParameters, ModelParameterArguments and DataStores.
            %              - Valid categories for functions are Functions
            %              - FunctionCallers
            %              - DataTransfers.
            % Example:
            % Find all and signals for model autosar_swc and map
            % the signals.
            %
            % mapObj = autosar.api.getSimulinkMapping('autosar_swc');
            % signals = mapObj.find("Signals")
            % for i = 1:numel(signals)
            %     mapObj.mapSignal(signals(i),"ArTypedPerInstanceMemory")
            % end
        end

        function out=getClassName(~) %#ok<STOUT>
            % GETCLASSNAME(THIS)
            % gets the class name for the adaptive model class
            %
            % If an empty value is returned by this method, the
            % generated adaptive model class name is the model name.
            %
            % Example:
            % Get the class name
            %
            % mappingObj = autosar.api.getSimulinkMapping('autosar_LaneGuidance');
            % AdaptiveClassName = mappingObj.getClassName();
        end

        function out=getClassNamespace(~) %#ok<STOUT>
            % GETCLASSNAMESPACE(THIS)
            % gets the enclosing class namespace of the adaptive model class
            %
            % Example:
            %
            % get the class name
            % mappingObj = autosar.api.getSimulinkMapping('autosar_LaneGuidance');
            % AdaptiveClassName = mappingObj.getClassNamespace();
        end

        function out=getDataDefaults(~) %#ok<STOUT>
            % DATADEFAULTVALUE = GETDATADEFAULTS(THIS, MODELINGELEMENTTYPE, MAPPEDTO) returns the
            % value of mapping property for the specified modeling element.
            %
            %   modelingElementType The element in the model. The only supported element is
            %                       'InportsOutports'.
            %
            %   mappedTo   Mapping property for the element. The only supported property is
            %              'EndToEndProtectionMethod'.
            %
            % The returned dataDefaultValue can be 'ProtectionWrapper',
            % 'TransformerError' or 'TransformerErrorWrapper'
            %
            % Example:
            % Get the end-to-end (E2E) protection method.
            %
            %     mappingObj = autosar.api.getSimulinkMapping(modelName);
            %     dataDefaultValue = mappingObj.getDataDefaults('InportsOutports');
            %
            % See also setDataDefaults
        end

        function out=getDataStore(~) %#ok<STOUT>
            % VALUE = GETDATASTORE(THIS, OBJECT)
            % is the DSM mapping of Simulink block OBJECT.
            %
            % VALUE = GETDATASTORE(THIS, OBJECT, PROPERTY)
            % is the value for PROPERTY inside data store mapping of owner block
            % OBJ.
            %
            %   Object     Name or handle of a block
            %   Property   The AUTOSAR properties associated with the
            %              ArtypedPerInstanceMemory ,StaticMemory or Persistency
            %              For example: ShortName, IsVolatile,
            %              Qualifier, SwAddrMethod, SwCalibrationAccess,
            %              DisplayFormat etc.
            %              For "Persistency" allowed properties are Port and
            %              DataElement
            %
            % Examples:
            % Get data store mapping for DSM block of model
            % autosar_bsw_sensor1.
            %
            % mappingObj = autosar.api.getSimulinkMapping('autosar_bsw_sensor1');
            % getDataStore(mappingObj, blockHandle);
            %
            % Alternatively use block name as follows:
            % getDataStore(mappingObj, 'autosar_bsw_sensor1/Data Store Memory');
            %
            % Get AUTOSAR SHORT-NAME of DSM mapping for DSM block of model
            % autosar_bsw_sensor1.
            %
            % mappingObj = autosar.api.getSimulinkMapping('autosar_bsw_sensor1');
            % getDataStore(mappingObj, 'autosar_bsw_sensor1/Data Store Memory', 'ShortName');
        end

        function out=getDataTransfer(~) %#ok<STOUT>
            % [ARIRVNAME, ARDATAACCESSMODE] = GETDATATRANSFER(THIS, SLDATATRANSFERNAME) are
            % the corresponding AUTOSAR InterRunnableVariable ARIRVNAME and
            % DataAccessMode ARDATAACCESSMODE values mapped to the Simulink data
            % transfer line SLDATATRANSFERNAME
            %
            % See also mapDataTransfer
        end

        function out=getFunction(~) %#ok<STOUT>
            % ARRUNNABLENAME = GETFUNCTION(THIS, SLENTRYPOINTFUNCTION) is the AUTOSAR
            % Runnable name ARRUNNABLENAME mapped to the SLENTRYPOINTFUNCTION
            % that uniquely identifies a Simulink entry-point function.
            %
            %    slEntryPointFunction   Simulink entry-point function for which
            %                           to return AUTOSAR mapping information.
            %                           The valid entry-point functions are:
            %                           - 'Initialize': Initialize function
            %                           - 'Reset:slIdentifier': Reset function where slIdentifier
            %                             is name of the reset function in model
            %                           - 'Terminate': Terminate function
            %                           - 'Periodic': Single-tasking periodic function
            %                           - 'Periodic:slIdentifier': Periodic function (implicit task)
            %                             where slIdentifier is the corresponding period annotation,
            %                             as displayed in the Timing Legend. For example, 'Periodic:D1'.
            %                           - 'Partition:slIdentifier': Partition function (explicit task)
            %                             where slIdentifier is the partition name, as displayed
            %                             in the Schedule Editor. For example, 'Partition:P1'
            %                           - 'ExportedFunction:slIdentifier': Exported function where
            %                             slIdentifier is the name of the Inport block that drives the
            %                             control port of the function-call subsystem.
            %                           - 'SimulinkFunction:slIdentifier': Simulink function where
            %                             slIdentifier is the name of a global Simulink function
            %                             in the model.
            %
            % Examples:
            % Get the name of the AUTOSAR runnable mapped to the
            % initialize Simulink entry-point function for model autosar_swc
            %
            % mapping = autosar.api.getSimulinkMapping('autosar_swc');
            % arRunnableName = getFunction(mapping, 'Initialize');
            %
            % Get the name of the AUTOSAR runnable mapped to the periodic
            % function with period 2 (corresponding to the period annotation D2)
            % for model autosar_swc
            %
            % mapping = autosar.api.getSimulinkMapping('autosar_swc');
            % arRunnableName = getFunction(mapping, 'Periodic:D2');
            %
            % See also mapFunction
        end

        function out=getFunctionCaller(~) %#ok<STOUT>
            % [ARPORTNAME, AROPERATIONNAME, TIMEOUT] = GETFUNCTIONCALLER(THIS,
            % SLFCNNAME) are the corresponding AUTOSAR Client
            % port ARPORTNAME, Operation AROPERATIONNAME values
            % mapped to Simulink function caller SLFCNNAME.
            % For Adaptive AUTOSAR, we also return the TIMEOUT value for this
            % method call
            %
            % See also mapFunctionCaller
        end

        function out=getInport(~) %#ok<STOUT>
            % [ARPORTNAME, ARDATAELEMENTNAME, ARDATAACCESSMODE] = GETINPORT(THIS,
            % SLPORTNAME) are the corresponding AUTOSAR Receiver (or
            % SenderReceiver) port ARPORTNAME, DataElement ARDATAELEMENTNAME and
            % DataAccessMode ARDATAACCESSMODE values mapped to Simulink Inport
            % SLPORTNAME, SLPORTNAME should be the one given by the
            % function get_param(block, 'Name') to ensure no errors
            %
            % See also mapInport
        end

        function out=getInternalDataPackaging(~) %#ok<STOUT>
            % GETINTERNALDATAPACKAGING(THIS)
            % fetches the default packaging for internal data
            %
            % Example:
            % mappingObj = autosar.api.getSimulinkMapping('autosar_swc_counter');
            % internalDataDefaultSetting = mappingObj.getInternalDataPackaging();
            %
            % checkout AUTOSAR_Blockset license
        end

        function out=getOutport(~) %#ok<STOUT>
            % [ARPORTNAME, ARDATAELEMENTNAME, ARDATAACCESSMODE] = GETOUTPORT(THIS,
            % SLPORTNAME) are the corresponding AUTOSAR Sender (or
            % SenderReceiver) port ARPORTNAME, DataElement ARDATAELEMENTNAME and
            % DataAccessMode ARDATAACCESSMODE values mapped to Simulink Outport
            % SLPORTNAME, SLPORTNAME should be the one given by the
            % function get_param(block, 'Name') to ensure no errors
            %
            % See also mapOutport
        end

        function out=getParameter(~) %#ok<STOUT>
            % VALUE = GETPARAMETER(THIS, SLPARAM)
            % is the parameter mapping of Simulink model workspace parameter
            % SLPARAM.
            %
            % VALUE = GETPARAMETER(THIS, SLPARAM, PROPERTY)
            % is the value for PROPERTY inside parameter mapping of Simulink
            % model workspace parameter SLPARAM.
            %
            %   SLParam    Name of model workspace parameter.
            %   Property   The AUTOSAR properties associated with the
            %              SharedParameter, PerInstanceParameter, or ConstantMemory.
            %              For example: IsConst, IsVolatile,
            %              Qualifier, SwAddrMethod, SwCalibrationAccess,
            %              DisplayFormat etc.
            %
            % Examples:
            % Get Simulink parameter mapping for model workspace parameter
            % RESET of model autosar_swc_counter.
            %
            % mappingObj = autosar.api.getSimulinkMapping('autosar_swc_counter');
            % Value = getParameter(mappingObj, 'RESET');
            %
            % Get AUTOSAR property SwCalibrationAccess of Simulink parameter mapping
            % for model workspace parameter RESET of model autosar_swc_counter.
            % mappingObj = autosar.api.getSimulinkMapping('autosar_swc_counter');
            % Value = getParameter(mappingObj, 'RESET', 'SwCalibrationAccess');
        end

        function out=getSignal(~) %#ok<STOUT>
            % VALUE = GETSIGNAL(THIS, PORTHANDLE)
            % is the signal mapping of Simulink block output port PORTHANDLE.
            %
            % VALUE = GETSIGNAL(THIS, PORTHANDLE, PROPERTY)
            % is the value for PROPERTY inside signal mapping of Simulink
            % block output port PORTHANDLE.
            %
            %   PortHandle Handle of a block output port, where signal or
            %              testpoint is specified
            %   Property   The AUTOSAR properties associated with the
            %              ArtypedPerInstanceMemory or StaticMemory. For
            %              example: ShortName, IsVolatile,
            %              Qualifier, SwAddrMethod, SwCalibrationAccess,
            %              DisplayFormat etc.
            %
            % Examples:
            % Get Simulink signal mapping for outport of block RelOpt,
            % port 1 of model autosar_swc_counter.
            %
            % mappingObj = autosar.api.getSimulinkMapping('autosar_swc_counter');
            % Value = getSignal(mappingObj, PortHandle);
            %
            % PortHandle can be obtained form block as follows:
            % PortHandles = get_param('autosar_swc_counter/RelOpt', 'PortHandles');
            % PortHandle = PortHandles.Outport;
            %
            % Get AUTOSAR property ShortName of Simulink signal mapping
            % for outport of block RelOpt, port 1 for model autosar_swc_counter.
            % mappingObj = autosar.api.getSimulinkMapping('autosar_swc_counter');
            % Value = getSignal(mappingObj, PortHandle, 'ShortName');
        end

        function out=getState(~) %#ok<STOUT>
            % VALUE = GETSTATE(THIS, OBJECT)
            % is the state mapping of Simulink block OBJECT.
            %
            % VALUE = GETSTATE(THIS, OBJECT, STATENAME)
            % is the state mapping of owner block OBJECT with state STATENAME.
            % STATENAME is needed for blocks with multiple states. In case
            % STATENAME is empty then mapping of first state is returned.
            %
            % VALUE = GETSTATE(THIS, OBJECT, STATENAME, PROPERTY)
            % is the value for PROPERTY inside state mapping of owner block
            % OBJ. STATENAME is needed for blocks with multiple states. In
            % case STATENAME is empty then mapping of first state is returned.
            %
            %   Object     Name or handle of a block
            %   StateName  Name of state. Should be passed empty except
            %              block with multiple states.
            %   Property   The AUTOSAR properties associated with the
            %              ArtypedPerInstanceMemory or StaticMemory. For
            %              example: ShortName, IsVolatile,
            %              Qualifier, SwAddrMethod, SwCalibrationAccess,
            %              DisplayFormat etc.
            %
            % Examples:
            % Get state mapping for state of unit state block X of model
            % autosar_swc_counter.
            %
            % mappingObj = autosar.api.getSimulinkMapping('autosar_swc_counter');
            % getState(mappingObj, blockHandle);
            %
            % Alternatively use block name as follows:
            % getState(mappingObj, 'autosar_swc_counter/X');
            %
            % Get AUTOSAR SHORT-NAME of state mapping for state of unit
            % state block X of model autosar_swc_counter.
            %
            % mappingObj = autosar.api.getSimulinkMapping('autosar_swc_counter');
            % getState(mappingObj, 'autosar_swc_counter/X', '', 'ShortName');
        end

        function out=getSynthesizedDataStore(~) %#ok<STOUT>
            % VALUE = GETSYNTHESIZEDDATASTORE(THIS, SIGNALNAME)
            % is the synthesized data store mapping of Simulink model
            % workspace signal object signalName
            % e.g. VALUE could be Auto, StaticMemory or ArTypedPerInstanceMemory
            %
            % VALUE = GETDATASTORE(THIS, SIGNALNAME, PROPERTY)
            % is the value for PROPERTY inside the synthesized data store mapping of model workspace signal object
            % signalName
            %
            %   signalName Name of the model workspace signal object
            %
            %   Property   The AUTOSAR properties associated with the
            %              ArTypedPerInstanceMemory ,StaticMemory or Persistency
            %              For example: ShortName, IsVolatile,
            %              Qualifier, SwAddrMethod, SwCalibrationAccess,
            %              DisplayFormat etc.
            %
            % Example:
            % Get the mapping of synthesized data store 'Sig1' in autosar_swc_counter
            % (assume 'Sig1' has been added using addSynthesizedDataStore)
            %
            % slmap = autosar.api.getSimulinkMapping('autosar_swc_counter')
            % slmap.getSynthesizedDataStore('Sig1')
            % The output could be either: Auto, StaticMemory or ArTypedPerInstanceMemory
            %
            % Get the 'ShortName' property of synthesized data store 'Sig1' in autosar_swc_counter
            % slmap.getSynthesizedDataStore('Sig1', 'ShortName')
        end

        function out=mapDataStore(~) %#ok<STOUT>
            % MAPDATASTORE(THIS, OBJECT, VARIABLEROLE, 'PARAMETER1', VALUE1, 'PARAMETER2',VALUE2,...)
            % maps Simulink DSM block with path SLBLOCKPATH to
            % value VARIABLEROLE.
            %
            %   Object     Name or handle of a block
            %   VariableRole Auto, ArtypedPerInstanceMemory, or StaticMemory
            %   varargin   The AUTOSAR properties (key,value) to be
            %              specified only when value of VariableRole is
            %              ArtypedPerInstanceMemory or StaticMemory or Persistency
            %
            % Examples:
            % Maps Simulink DSM block to AUTOSAR ArTypedPerInstanceMemory.
            %
            % mappingObj = autosar.api.getSimulinkMapping('autosar_bsw_sensor1');
            % mapDataStore(mappingObj, blockH, 'ArTypedPerInstanceMemory');
            %
            % Alternatively use block name as follows:
            % mapDataStore(mappingObj, 'autosar_bsw_sensor1/Data Store Memory', ...
            %   'ArTypedPerInstanceMemory');
            %
            % Maps Simulink DSM block to AUTOSAR StaticMemory with
            % ShortName DSM_A.
            %
            % mappingObj = autosar.api.getSimulinkMapping('autosar_bsw_sensor1');
            % mapDataStore(mappingObj, blockHandle,  'StaticMemory',...
            %   'ShortName', 'DSM_A');
            %
            % Maps Simulink DSM block 'Data Store Memory' to Adaptive AUTOSAR
            % Persistency
            %
            % mappingObj = autosar.api.getSimulinkMapping('autosar_LaneGuidance');
            % mapDataStore(mappingObj, blockHandle,  'Persistency',...
            %   'Port', 'PerPRPort', 'DataElement','Key1');
            %
            % See also getDataStore
        end

        function out=mapDataTransfer(~) %#ok<STOUT>
            % MAPDATATRANSFER(THIS, SLDATATRANSFERNAME, ARIRVNAME, ARDATAACCESSMODE) maps
            % Simulink data transfer line SLDATATRANSFERNAME to
            % InterRunnableVariable ARIRVNAME. DataAccessMODE ARDATAACCESSMODE
            % can be one of 'Implicit', 'Explicit'
            %
            % See also getDataTransfer
        end

        function out=mapFunction(~) %#ok<STOUT>
            % MAPFUNCTION(THIS, SLENTRYPOINTFUNCTION, ARRUNNABLENAME, 'PARAMETER1', VALUE1, 'PARAMETER2',VALUE2,...)
            % maps the SLENTRYPOINTFUNCTION that uniquely identifies a Simulink entry-point
            % function to AUTOSAR Runnable ARRUNNABLENAME.
            %
            %    slEntryPointFunction   Simulink entry-point function for which
            %                           to return AUTOSAR mapping information.
            %                           The valid entry-point functions are:
            %                           - 'Initialize': Initialize function
            %                           - 'Reset:slIdentifier': Reset function where slIdentifier
            %                             is name of the reset function in model
            %                           - 'Terminate': Terminate function
            %                           - 'Periodic': Single-tasking periodic function
            %                           - 'Periodic:slIdentifier': Periodic function (implicit task)
            %                             where slIdentifier is the corresponding period annotation,
            %                             as displayed in the Timing Legend. For example, 'Periodic:D1'.
            %                           - 'Partition:slIdentifier': Partition function (explicit task)
            %                             where slIdentifier is the partition name, as displayed
            %                             in the Schedule Editor. For example, 'Partition:P1'
            %                           - 'ExportedFunction:slIdentifier': Exported function where
            %                             slIdentifier is the name of the Inport block that drives the
            %                             control port of the function-call subsystem.
            %                           - 'SimulinkFunction:slIdentifier': Simulink function where
            %                             slIdentifier is the name of a global Simulink function
            %                             in the model.
            %
            %
            %   arRunnableName  Name of the AUTOSAR Runnable
            %
            %   varargin        Param-Values pairs to specify SwAddrMethod or
            %                   SwAddrMethodForInternalData for the AUTOSAR runnable.
            %
            % Example:
            % Map AUTOSAR runnable named 'Runnable_Init' to the initialize
            % Simulink entry-point function for model 'autosar_swc'.
            %
            % mapping = autosar.api.getSimulinkMapping('autosar_swc');
            % mapFunction(mapping, 'Initialize', 'Runnable_Init');
            %
            % Map AUTOSAR runnable named 'Runnable_2s' to the periodic
            % function with period 2 (corresponding to the period annotation D2)
            % for model autosar_swc
            %
            % mapping = autosar.api.getSimulinkMapping('autosar_swc');
            % mapFunction(mapping, 'Periodic:D2', 'Runnable_2s');
            %
            % See also getFunction
        end

        function out=mapFunctionCaller(~) %#ok<STOUT>
            % MAPFUNCTIONCALLER(THIS, SLFCNNAME, ARPORTNAME, AROPERATIONNAME, TIMEOUT)
            % maps Simulink Function caller SLFCNNAME to Operation AROPERATIONNAME
            % of AUTOSAR Client port ARPORTNAME.
            % For Adaptive AUTOSAR models, you can also specify a timeout value
            %
            % See also getFunctionCaller
        end

        function out=mapInport(~) %#ok<STOUT>
            % MAPINPORT(THIS, SLPORTNAME, ARPORTNAME, ARDATAELEMENTNAME, ARDATAACCESSMODE)
            % maps Simulink Inport SLPORTNAME to DataElement ARDATAELEMENTNAME
            % of AUTOSAR Receiver (or SenderReceiver) port
            % ARPORTNAME. SLPORTNAME should be the one given by the
            % function get_param(block, 'Name') to ensure no errors
            % DataAccessMode ARDATAACCESSMODESTR can be one of
            % 'ImplicitReceive', 'ExplicitReceive', 'ExplicitReceiveByVal',
            % 'QueuedExplicitReceive', 'ErrorStatus', 'IsUpdated',
            % 'EndToEndRead'.
            %
            % See also getInport
        end

        function out=mapOutport(~) %#ok<STOUT>
            % MAPOUTPORT(THIS, SLPORTNAME, ARPORTNAME, ARDATAELEMENTNAME, ARDATAACCESSMODE)
            % maps Simulink Outport SLPORTNAME to DataElement ARDATAELEMENTNAME
            % of AUTOSAR Sender (or SenderReceiver) port
            % ARPORTNAME. SLPORTNAME should be the one given by the
            % function get_param(block, 'Name') to ensure no errors
            % DataAccessMode ARDATAACCESSMODESTR can be one of
            % 'ImplicitSend', 'ImplicitSendByRef', 'ExplicitSend',
            % 'EndToEndWrite'.
            %
            % See also getOutport
        end

        function out=mapParameter(~) %#ok<STOUT>
            % MAPPARAMETER(THIS, SLPARAM, PARAMETERROLE, 'PARAMETER1', VALUE1, 'PARAMETER2', VALUE2,...)
            % maps Simulink model workspace parameter SLPARAM to value
            % PARAMETERROLE.
            %
            %   SLParam    Name of model workspace parameter.
            %   ParameterRole Auto, SharedParameter, or ConstantMemory.
            %   varargin   The AUTOSAR properties (key,value) to be
            %              specified only when value of ParameterRole is
            %              SharedParameter, PerInstanceParameter, or ConstantMemory.
            %
            % Examples:
            % Maps model workspace parameter RESET to AUTOSAR SharedParameter.
            %
            % mappingObj = autosar.api.getSimulinkMapping('autosar_swc_counter');
            % mapParameter(mappingObj, 'RESET', 'SharedParameter');
            %
            % Maps model workspace parameter RESET to AUTOSAR ConstantMemory
            % with read only calibration access.
            %
            % mappingObj = autosar.api.getSimulinkMapping('autosar_swc_counter');
            % mapParameter(mappingObj, 'RESET', 'ConstantMemory', 'SwCalibrationAccess', ...
            %       'ReadOnly');
            %
            % See also getParameter
        end

        function out=mapSignal(~) %#ok<STOUT>
            % MAPSIGNAL(THIS, PORTHANDLE, VARIABLEROLE, 'PARAMETER1', VALUE1, 'PARAMETER2',VALUE2,...)
            % maps Simulink signal specified on block output port
            % PORTHANDLE value VARIABLEROLE.
            %
            %   PortHandle Handle of a block output port, where signal or
            %              testpoint is specified
            %   VariableRole Auto, ArtypedPerInstanceMemory, or StaticMemory
            %   varargin   The AUTOSAR properties (key,value) to be
            %              specified only when value of VariableRole is
            %              ArtypedPerInstanceMemory or StaticMemory.
            %
            % Examples:
            % Maps Simulink signal originating from block RelOpt, port 1 to
            % AUTOSAR ArTypedPerInstanceMemory.
            %
            % mappingObj = autosar.api.getSimulinkMapping('autosar_swc_counter');
            % mapSignal(mappingObj, PortHandle, 'ArTypedPerInstanceMemory');
            %
            % PortHandle can be obtained form block as follows:
            % PortHandles = get_param('autosar_swc_counter/RelOpt', 'PortHandles');
            % PortHandle = PortHandles.Outport;
            %
            % Maps Simulink signal originating from block RelOpt, port 1 to
            % AUTOSAR StaticMemory with ShortName SigMem.
            %
            % mappingObj = autosar.api.getSimulinkMapping('autosar_swc_counter');
            % mapSignal(mappingObj, PortHandle, 'StaticMemory', 'ShortName', ...
            %       'SigMem');
            %
            % See also getSignal
        end

        function out=mapState(~) %#ok<STOUT>
            % MAPSTATE(THIS, OBJECT, STATENAME, VARIABLEROLE, 'PARAMETER1', VALUE1, 'PARAMETER2',VALUE2,...)
            % maps Simulink state of owner block with path SLBLOCKPATH to
            % value VARIABLEROLE.
            %
            %   Object     Name or handle of a block
            %   StateName  The name of state. Should be passed empty except
            %              block with multiple states.
            %   VariableRole Auto, ArtypedPerInstanceMemory, or StaticMemory
            %   varargin   The AUTOSAR properties (key,value) to be
            %              specified only when value of VariableRole is
            %              ArtypedPerInstanceMemory or StaticMemory.
            %
            % Examples:
            % Maps Simulink state of owner block X to AUTOSAR
            % ArTypedPerInstanceMemory.
            %
            % mappingObj = autosar.api.getSimulinkMapping('autosar_swc_counter');
            % mapState(mappingObj, blockH, '', 'ArTypedPerInstanceMemory');
            %
            % Alternatively use block name as follows:
            % mapState(mappingObj, 'autosar_swc_counter/X', '', 'ArTypedPerInstanceMemory');
            %
            % Maps Simulink state of owner block X to AUTOSAR
            % StaticMemory with ShortName StateX.
            %
            % mappingObj = autosar.api.getSimulinkMapping('autosar_swc_counter');
            % mapState(mappingObj, blockHandle, '', 'StaticMemory',...
            %   'ShortName', 'StateX');
            %
            % See also getState
        end

        function out=mapSynthesizedDataStore(~) %#ok<STOUT>
            % MAPSYNTHESIZEDDATASTORE(THIS, SIGNALNAME, VARIABLEROLE, 'PARAMETER1', VALUE1, 'PARAMETER2',VALUE2,...)
            % maps synthesized data store signalName to value VARIABLEROLE and
            % set the parameter to the value
            %
            %   signalName     Name of a model workspace signal object
            %   VariableRole   Auto, ArtypedPerInstanceMemory, or StaticMemory
            %   varargin       The AUTOSAR properties (key,value) to be
            %                  specified only when value of VariableRole is
            %                  ArTypedPerInstanceMemory or StaticMemory or Persistency
            %
            % Examples:
            %   Assume model autosar_swc_counter has a synthesized data store 'Sig1'
            %
            %   Set the MappedTo of 'Sig1' to ArTypedPerInstanceMemory
            %   slmap = autosar.api.getSimulinkMapping('autosar_swc_counter')
            %   slmap.mapSynthesizedDataStore('Sig1', 'ArTypedPerInstanceMemory')
            %
            %   Set the 'ShortName' of 'Sig1' to 'S1'
            %   slmap.mapSynthesizedDataStore('Sig1', 'StaticMemory', 'ShortName', 'S1')
        end

        function out=removeSignal(~) %#ok<STOUT>
            % REMOVESIGNAL(THIS, PORTHANDLE)
            % removes Simulink signal specified on block output port
            % PORTHANDLE from mapping.
            %
            %   PortHandle Handle of a block output port, where signal or
            %              testpoint is specified
            %
            % Examples:
            % Remove Simulink signal originating from block RelOpt, port 1
            %
            % mappingObj = autosar.api.getSimulinkMapping('autosar_swc_counter');
            % removeSignal(mappingObj, PortHandle);
            %
            % PortHandle can be obtained form block as follows:
            % PortHandles = get_param('autosar_swc_counter/RelOpt', 'PortHandles');
            % PortHandle = PortHandles.Outport;
            % See also addSignal
        end

        function out=removeSynthesizedDataStore(~) %#ok<STOUT>
            % REMOVESYNTHESIZEDDATASTORE removes model data store from mapping
            % REMOVESYNTHESIZEDDATASTORE(THIS, SIGNALNAME)
            %
            % removes the code mapping for a Data Store Read or Write resolved to a
            % Simulink.Signal object in the model workspace
            %
            % signalName specifies the name of the Simulink.Signal object
            %
            % Examples:
            %
            % mappingObj = autosar.api.getSimulinkMapping('autosar_swc_counter');
            %
            % Create a synthesized data store which resolves to a model
            % workspace signal object 'Sig1' using addSynthesizedDataStore
            %
            % mappingObj.removeSynthesizedDataStore('Sig1');
            %
            % See also addSynthesizedDataStore
        end

        function out=setClassName(~) %#ok<STOUT>
            % SETCLASSNAME(THIS, VALUE)
            % sets the class name for the adaptive model class
            %
            % If VALUE is an empty string, the generated adaptive model class name
            % is the model name.
            %
            % Examples:
            % Set the class name to 'laneGuidance'
            %
            % mappingObj = autosar.api.getSimulinkMapping('autosar_LaneGuidance');
            % mappingObj.setClassName('laneGuidance');
            %
            % Set the class name such that the generated name is the model name
            %
            % mappingObj = autosar.api.getSimulinkMapping('autosar_LaneGuidance');
            % mappingObj.setClassName('');
        end

        function out=setClassNamespace(~) %#ok<STOUT>
            % SETCLASSNAMESPACE(THIS, VALUE)
            % sets the enclosing class namespace of the adaptive model class
            %
            % Example:
            % Set the class namespace
            %
            % mappingObj = autosar.api.getSimulinkMapping('autosar_LaneGuidance');
            % mappingObj.setClassNamespace('swc');
        end

        function out=setDataDefaults(~) %#ok<STOUT>
            % SETDATADEFAULTS(THIS, MODELINGELEMENTTYPE, MAPPEDTO, VARARGIN) sets the
            % default mapping property for the corresponding modeling element.
            %
            %   modelingElementType  The model element to be mapped. The only supported element
            %                        is 'InportsOutports'.
            %
            %   mappedTo     Mapping property for the modeling element. The only supported property
            %                is 'EndToEndProtectionMethod'.
            %
            %   varargin     Parameter to specify the property end-to-end (E2E) protection method.
            %                Supported values are 'ProtectionWrapper',
            %                'TransformerError' or 'TransformerErrorWrapper'
            %
            % Only the first value of varargin is used as the EndToEndProtectionMethod.
            %
            % Example:
            % Sets the E2E protection method to 'TransformerError'.
            %
            %     mappingObj = autosar.api.getSimulinkMapping(modelName);
            %     mappingObj.setDataDefaults('InportsOutports', 'EndToEndProtectionMethod', 'TransformerError');
            %
            % See also getDataDefaults
        end

        function out=setInternalDataPackaging(~) %#ok<STOUT>
            % SETINTERNALDATAPACKAGING(THIS, VALUE)
            % set default packaging for internal data
            % Example:
            %
            % reset internal data default packaging
            % mappingObj = autosar.api.getSimulinkMapping('autosar_swc_counter');
            % mappingObj.setInternalDataPackaging('Default');
            %
            % set default internal data packaging to PrivateGlobal
            % mappingObj = autosar.api.getSimulinkMapping('autosar_swc_counter');
            % mappingObj.setInternalDataPackaging('PrivateGlobal');
            % checkout AUTOSAR_Blockset license
        end

    end
end
