Building Controls Virtual Test Bed
sendClientError.m
Go to the documentation of this file.
1 function retVal = sendClientError(sockfd, flaWri)
2 % SENDCLIENTERROR - Sends an error flag to the BCVTB.
3 %
4 % retVal = sendClientError(sockfd, flaWri) sends flaWri
5 % to the BCVTB through the socket with file descriptor sockfd.
6 % Set flaWri to a negative value when calling this function.
7 % If successful, retVal will be zero.
8 
9 % Revision history
10 % ----------------
11 % 2009-06-26 MWetter@lbl.gov: First version.
12 
13 if (sockfd < 0 )
14  fprintf('Warning: Cannot close socket in closeIPC(%d) because argument is negative', sockfd);
15  retVal = -1;
16 elseif ~libisloaded(getBCVTBLibName())
17  fprintf('Warning: Cannot close socket in closeIPC because BCVTB library is not loaded');
18  retVal = -2;
19 else
20  retVal = calllib(getBCVTBLibName(),'sendclienterror',int16(sockfd), int16(flaWri));
21 end
function sockfd
elseif ~libisloaded(getBCVTBLibName())%bcvtb library is not loaded retVal
function sockfd will be a positive integer for the socket file descriptor In case of error
elseif(strcmp(os,'mac')) LIBBCVTB
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
fprintf([' ', 'Trying to send client error from MATLAB to the BCVTB.'])
int sendclienterror(const int *sockfd, const int *flaWri)
Writes an error flag to the socket stream.
static void XMLCALL end(void *data, const char *el)
Call back functions that will be used by the expat xml parser.
Definition: util/utilXml.c:707
function[retVal, flaRea, simTimRea, dblValRea]
function retVal