Regular API function

simTubeOpen

Description Opens a tube for communication within V-REP. A tube is similar to a bidirectional communication pipe. Messages written on one side can be read on the other side in the same order as they were written. Tubes opened via a script will automatically close upon simulation end. A scene switch will close all communication tubes and tube handles will not be valid anymore. See also simTubeClose, simTubeWrite, simTubeRead, simTubeStatus, simSendData and simReceiveData.
C synopsis simInt simTubeOpen(simInt dataHeader,const simChar* dataName,simInt readBufferSize,simBool notUsedButKeepFalse)
C parameters
dataHeader: number indicating who "designed" the communication message. Always use the same header (because only you will know the meaning of the message) and stick to it. The best is to use the serial number of your V-REP copy (check the "Help" menu, in the "About" item for the serial number). Otherwise, you risk collision with other developer's messages which might use the same header as yours.
dataName: name indicating the type of message. A tube will only be able to connect if its two sides have the same dataHeader and dataName
readBufferSize: the number of data packets that can be stored in the input buffer of this side of the tube
notUsedButKeepFalse: not used. Keep to false.
C return value
-1 if operation was not successful, otherwise the tube handle.
Lua synopsis number tubeHandle=simTubeOpen(number dataHeader,string dataName,number readBufferSize)
Lua parameters
Same as C-function
Lua return values
Same as C-function

All regular API functions on one page