Regular API function

simTubeStatus

Description Checks the status of a communication tube previously opened with simTubeOpen.
C synopsis simInt simTubeStatus(simInt tubeHandle,simInt* readPacketsCount,simInt* writePacketsCount)
C parameters
tubeHandle: the handle of the tube that was returned by the simTubeOpen function.
readPacketsCount: pointer to an integer that will indicate the number of packets waiting to be read. Can be NULL
writePacketsCount: pointer to an integer that will indicate the number of packets waiting to be read on the other side of the tube. Can be NULL
C return value
-1 if operation was not successful, 0 if the tube is not connected, 1 if the tube is connected
Lua synopsis number status,number readPacketsCount,number writePacketsCount=simTubeStatus(number tubeHandle)
Lua parameters
Same as C-function
Lua return values
status: nil if operation was not successful, otherwise 0 if the tube is not connected, 1 if the tube is connected
readPacketsCount: nil if operation was not successful, otherwise the number of packets waiting to be read
writePacketsCount: nil if operation was not successful, otherwise the number of packets waiting to be read on the other side of the tube

All regular API functions on one page