xxsimDisconnect

PURPOSE ^

xxsimDisconnect - Disconnects from 20-sim .

SYNOPSIS ^

function retval = xxsimDisconnect()

DESCRIPTION ^

 xxsimDisconnect - Disconnects from 20-sim .

 Syntax: 
   retval = xxsimDisconnect()

 Inputs:
   takes no arguments.
 
 Outputs:
   returns true after disconnecting successfully, false otherwise.

 Examples:
    retval = xxsimDisconnect();
        Disconnects from 20-sim. Returns true upon successful disconnection, and false otherwise.

 See also: xxsimConnect

 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 retval = xxsimDisconnect()
0002 % xxsimDisconnect - Disconnects from 20-sim .
0003 %
0004 % Syntax:
0005 %   retval = xxsimDisconnect()
0006 %
0007 % Inputs:
0008 %   takes no arguments.
0009 %
0010 % Outputs:
0011 %   returns true after disconnecting successfully, false otherwise.
0012 %
0013 % Examples:
0014 %    retval = xxsimDisconnect();
0015 %        Disconnects from 20-sim. Returns true upon successful disconnection, and false otherwise.
0016 %
0017 % See also: xxsimConnect
0018 %
0019 % Author: Controllab Products B.V.
0020 % email: info@controllab.nl
0021 % Website: http://www.controllab.nl
0022 % November 2015
0023 
0024 %------------- BEGIN CODE --------------
0025     if(nargin>0)
0026         error('Too many input arguments: xxsimDisconnect does not expect any input arguments.');
0027     end
0028     retval = xrldisconnect();
0029     
0030     global xxsim;
0031 
0032     % and do some housekeeping
0033     if ~isempty(xxsim)
0034         % clear the list of connections
0035         xxsim.activeconnection = 0;
0036         xxsim.connections = [];
0037     end
0038 end
0039 %------------- END CODE --------------

Generated on Thu 25-Apr-2024 10:30:24