Micro-XRCE-DDS-Client icon indicating copy to clipboard operation
Micro-XRCE-DDS-Client copied to clipboard

SHM feature On NuttX

Open PierrePeng opened this issue 2 years ago • 3 comments

Hi,

I am confused about the share memory feature On Nuttx.

  1. Can I publish a topic from program A and receive it both from program B and program C?
  2. Should I create sessions/streams/entities/publishers/subscribers for each topic that I want to publish/subscribe to in a single program?

Thanks!

PierrePeng avatar Dec 18 '21 06:12 PierrePeng

  • Can I publish a topic from program A and receive it both from program B and program C?

Yes if those programs share the same memory and address space. SHM in XRCE is implemented as a naive approach that does not take into account process memory protection.

  • Should I create sessions/streams/entities/publishers/subscribers for each topic that I want to publish/subscribe to in a single program?

One session can have multiple streams, and those streams and the session can handle multiple pubs, subs, and topics.

pablogs9 avatar Dec 20 '21 06:12 pablogs9

@pablogs9 Thanks for your reply!

One session can have multiple streams, and those streams and the session can handle multiple pubs, subs, and topics.

Are there any tutorials or examples about that?

PierrePeng avatar Dec 22 '21 02:12 PierrePeng

You have all the available examples here: https://github.com/eProsima/Micro-XRCE-DDS-Client/tree/master/examples

pablogs9 avatar Dec 22 '21 07:12 pablogs9