simx_opmode_continuous vs simx_opmode_buffer

Typically: "How do I... ", "How can I... " questions
Post Reply
nex
Posts: 22
Joined: 07 Nov 2016, 15:48

simx_opmode_continuous vs simx_opmode_buffer

Post by nex » 02 Jan 2019, 06:49

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?

coppelia
Site Admin
Posts: 6914
Joined: 14 Dec 2012, 00:25

Re: simx_opmode_continuous vs simx_opmode_buffer

Post by coppelia » 02 Jan 2019, 14:05

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

nex
Posts: 22
Joined: 07 Nov 2016, 15:48

Re: simx_opmode_continuous vs simx_opmode_buffer

Post by nex » 03 Jan 2019, 21:24

Thanks for clarifying!

Post Reply