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 CoppeliaSim client application. A given message queue cannot hold more than 64 messages, unread messages will be discarded. |
C/C++ synopsis
|
simChar* simGetSimulatorMessage(simInt* messageID,simInt* auxiliaryData,simInt* returnedDataSize) |
C/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/C++ return value
|
nullptr if no buffer was returned, otherwise a buffer that should be released with simReleaseBuffer
|
Lua synopsis
|
int message,int[4] auxiliaryData,int[] auxiliaryData2=sim.getSimulatorMessage() |
Lua parameters |
|
Lua return values
|
message: a simulator message (see the simulator messages) or -1 if no message is available
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
|
Python synopsis |
int message,list auxiliaryData,list auxiliaryData2=sim.getSimulatorMessage() |