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
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 exist('xxsim') 0034 0035 % clear the list of connections 0036 xxsim.activeconnection = 0; 0037 xxsim.connections = []; 0038 0039 end; 0040 end 0041 %------------- END CODE --------------