Page 1 of 1

simx_opmode_continuous vs simx_opmode_buffer

Posted: 02 Jan 2019, 06:49
by nex
Hello,

The bubbleRobClient never uses simx_opmode_buffer, even though it starts streaming with
simx_opmode_continuous /simx_opmode_streaming.

https://github.com/CoppeliaRobotics/bub ... Client.cpp

Is there any advantage in using simx_opmode_buffer after starting streaming with simx_opmode_streaming, or will it have the same effect to use simx_opmode_streaming in subsequent calls?

I assume that using simx_opmode_streaming in subsequent calls might incur a tiny overhead, where it checks if streaming of the command is already active and then switches to simx_opmode_buffer automatically. It might also have to resend a command, whereas buffer mode just checks the local client buffer. Otherwise, how would the bubbleRobClient.cpp work?

Are there any advantages in using simx_opmode_buffer in subsequent calls?

Re: simx_opmode_continuous vs simx_opmode_buffer

Posted: 02 Jan 2019, 14:05
by coppelia
Hello,

yes, the example is not very elegant, and one should have used simx_opmode_buffer in subsequent calls.

simx_opmode_streaming actually sends a command to V-REP and then uses simx_opmode_buffer to check if a reply is already there (from a previous call).
It is like you say, always using simx_opmode_streaming adds a little overhead.

Cheers

Re: simx_opmode_continuous vs simx_opmode_buffer

Posted: 03 Jan 2019, 21:24
by nex
Thanks for clarifying!