xxsimQueryImplementations

PURPOSE ^

xxsimQueryImplementations - Returns a list of submodels names with multiple implementation and their active implementation.

SYNOPSIS ^

function [result, implementations] = xxsimQueryImplementations()

DESCRIPTION ^

 xxsimQueryImplementations - Returns a list of submodels names with multiple implementation and their active implementation.

 Syntax: 
   [result, implementations] = xxsimQueryImplementations()

 Inputs:
    takes no arguments.

 Outputs:
   result  = returns true if the model contains one or more submodels with multiple implementations.
   implementations = struct array with following fields for each element:
           name: the name of the submodel.
           implementation: the active implementation of this submodel.
           implementations: string array with the names of the available implementations for this submodel.

 Examples:
    [result, implementations] = xxsimQueryImplementations()
        The result is true if at least one submodel is found with multiple implementations, false otherwise.
        The implementations result contains a structured array with fields in each struct about the name of
        the submodel, the name of the active implementation, and all possible implementations.

 See also: xxsimSetImplementations

 Author: Controllab Products B.V.
 email: info@controllab.nl
 Website: http://www.controllab.nl
 November 2015

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [result, implementations] = xxsimQueryImplementations()
0002 % xxsimQueryImplementations - Returns a list of submodels names with multiple implementation and their active implementation.
0003 %
0004 % Syntax:
0005 %   [result, implementations] = xxsimQueryImplementations()
0006 %
0007 % Inputs:
0008 %    takes no arguments.
0009 %
0010 % Outputs:
0011 %   result  = returns true if the model contains one or more submodels with multiple implementations.
0012 %   implementations = struct array with following fields for each element:
0013 %           name: the name of the submodel.
0014 %           implementation: the active implementation of this submodel.
0015 %           implementations: string array with the names of the available implementations for this submodel.
0016 %
0017 % Examples:
0018 %    [result, implementations] = xxsimQueryImplementations()
0019 %        The result is true if at least one submodel is found with multiple implementations, false otherwise.
0020 %        The implementations result contains a structured array with fields in each struct about the name of
0021 %        the submodel, the name of the active implementation, and all possible implementations.
0022 %
0023 % See also: xxsimSetImplementations
0024 %
0025 % Author: Controllab Products B.V.
0026 % email: info@controllab.nl
0027 % Website: http://www.controllab.nl
0028 % November 2015
0029 
0030 %------------- BEGIN CODE --------------
0031 
0032     if(nargin>0)
0033         error('Too many input arguments: xxsimQueryImplementations does not expect any input arguments.');
0034     end;
0035 
0036     global xxsim;
0037     xxsimVerbose = 0;
0038     if exist('xxsim')
0039         xxsimVerbose = xxsim.verbose;
0040     end
0041 
0042     % do the actual invoke
0043     implementations = xrlinvoke('xxsim.model.queryImplementations');
0044     
0045     if size(implementations) == 0 
0046         result = false;
0047     else
0048         result = true;
0049     end;
0050 end
0051 %------------- END CODE --------------

Generated on Sun 10-Dec-2017 19:24:51