Regular API function

simGetSimulatorMessage

Description Retrieves and removes the next message in the C/C++ or Lua message queues. Use this in a while-loop until all messages have been extracted. While the C/C++ interface has one single message queue, each Lua script has its own message queue. The C/C++ version of this function should only be called from the V-REP client application. A given message queue cannot hold more than 64 messages, unread messages will be discarded.
C synopsis simChar* simGetSimulatorMessage(simInt* messageID,simInt* auxiliaryData,simInt* returnedDataSize)
C parameters
messageID: a simulator message (see the simulator messages) or -1 if no message is available or in case of an error
auxiliaryData: table of 4 integers that can describe the returned message in more details
returnedDataSize: size of the returned buffer
C return value
NULL if no buffer was returned, otherwise a buffer that should be released with simReleaseBuffer
Lua synopsis number message,table_4 auxiliaryData,table auxiliaryData2=simGetSimulatorMessage()
Lua parameters
None
Lua return values
message: a simulator message (see the simulator messages) or -1 if no message is available or in case of an error
auxiliaryData: table of 4 numbers that can describe the returned message in more details
auxiliaryData2: optional table of n numbers that hold more data related to the message

All regular API functions on one page