Building Controls Virtual Test Bed
closeIPC.m
Go to the documentation of this file.
1 function retVal = closeIPC(sockfd)
2 % CLOSEIPC - Closes the interprocess communication
3 %
4 % status = closeIPC(sockfd) closes the socket
5 % connection with file descriptor sockfd.
6 % If successful, retVal will be zero.
7 
8 % Revision history
9 % ----------------
10 % 2009-09-20 Metter@lbl.gov: Removed warning if bcvtb library is not loaded.
11 % 2009-06-26 MWetter@lbl.gov: First version, based on code of
12 % Charles Corbin, UC Boulder
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  % bcvtb library is not loaded
18  retVal = -2;
19 else
20  retVal = calllib(getBCVTBLibName(),'closeipc',int16(sockfd));
21 end
function sockfd
elseif ~libisloaded(getBCVTBLibName())%bcvtb library is not loaded retVal
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
function retVal
Definition: closeIPC.m:1
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