Building Controls Virtual Test Bed
establishClientSocket.m File Reference

Go to the source code of this file.

Functions

id gov: (id getBCVTBLibName)
 
if ~libisloaded (BCVTBLIB) loadlibrary(BCVTBLIB ='Error. Failed to load BCVTB library.'
 
 throw (ME)
 
end Establish the socket
connection if 
and (libisloaded(BCVTBLIB),(status==1)) sockfd
 
else disp ('Could not load library establishClientSocket.m')
 

Variables

function sockfd
 
function sockfd will be a
positive integer for the
socket file descriptor In case
of 
error
 
if bcvtb
 
 ME
 
 status = -1
 

Function Documentation

end Establish the socket connection if and ( libisloaded(BCVTBLIB ,
(status==1)   
)
else disp ( 'Could not load library establishClientSocket.m'  )
id gov: ( id  getBCVTBLibName)
virtual
throw ( ME  )
end if ~libisloaded ( BCVTBLIB  ) ='Error. Failed to load BCVTB library.'

Variable Documentation

if bcvtb

Definition at line 22 of file establishClientSocket.m.

function sockfd will be a positive integer for the socket file descriptor In case of error

Definition at line 1 of file establishClientSocket.m.

ME
Initial value:
= MException('BCVTB:ConnectError', ...
msg)

Definition at line 26 of file establishClientSocket.m.

sockfd
Initial value:
= establishClientSocket(socketConfigurationFile)
% ESTABLISHCLIENTSOCKET - Establishes the client connection to the socket
%
% sockfd = establishClientSocket('socket.cfg') connect MATLAB to
% the BCVTB. This function will read the file socket.cfg to get
% information for how to connect to the BCVTB.
%
function sockfd
function described below The Simulink Library Browser needs to know which libraries in your Blockset it should and what names to give them To provide this information
Definition: slblocks.m:1
function if the BCVTB library can be loaded and if sockfd is not a negative then this function sends signal to the socket If sending a message to the socket was successful
Definition: processError.m:1
function[retVal, flaRea, simTimRea, dblValRea]

Definition at line 1 of file establishClientSocket.m.

Referenced by closeBSDSocket(), establishclientsocket(), exchangeDoublesWithBSDSocket(), and main().

else status = -1

Definition at line 29 of file establishClientSocket.m.

Referenced by first().