xxsimGetVersion

PURPOSE ^

xxsimGetVersion - get the 20-sim version.

SYNOPSIS ^

function retval = xxsimGetVersion()

DESCRIPTION ^

 xxsimGetVersion - get the 20-sim version. 

 Syntax: 
   retval = xxsimGetVersion()

 Outputs: 
   retval = returns a structure with fields major, minor, patch, and build.
 
 Examples:
   retval = xxsimGetVersion()
   
     - retval now contains the version numbers of 20-sim.
     - the output is returned in a structure array form. 
       e.g
         retval.major   : the major number for the 20-sim version used.
         retval.minor   : the minor number for the 20-sim version used.
         retval.patch     : the patch number for the 20-sim version used.
         retval.build     : the build number for the 20-sim version used. 

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function retval = xxsimGetVersion()
0002 % xxsimGetVersion - get the 20-sim version.
0003 %
0004 % Syntax:
0005 %   retval = xxsimGetVersion()
0006 %
0007 % Outputs:
0008 %   retval = returns a structure with fields major, minor, patch, and build.
0009 %
0010 % Examples:
0011 %   retval = xxsimGetVersion()
0012 %
0013 %     - retval now contains the version numbers of 20-sim.
0014 %     - the output is returned in a structure array form.
0015 %       e.g
0016 %         retval.major   : the major number for the 20-sim version used.
0017 %         retval.minor   : the minor number for the 20-sim version used.
0018 %         retval.patch     : the patch number for the 20-sim version used.
0019 %         retval.build     : the build number for the 20-sim version used.
0020 %
0021 % Author: Controllab Products B.V.
0022 % email: info@controllab.nl
0023 % Website: http://www.controllab.nl
0024 % December 2016
0025 
0026 %------------- BEGIN CODE --------------
0027 % Obtain the version information from 20-sim.
0028 response = xrlinvoke('xxsim.getVersion');
0029 
0030 % Obtain the string version of the 20-sim version information.
0031 versionString = response.version;
0032 
0033 % Obtain the version numbers as strings.
0034 versionNumbers = strsplit(versionString,'.');
0035 
0036 % Set the major version number.
0037 retval.major = str2num(versionNumbers(1){1,1});
0038 
0039 % Set the minor version number.
0040 retval.minor = str2num(versionNumbers(2){1,1});
0041 
0042 % Set the patch version number.
0043 retval.patch = str2num(versionNumbers(3){1,1});
0044 
0045 % Set the build version number.
0046 retval.build = str2num(versionNumbers(4){1,1});

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