eProsima / Micro-XRCE-DDS-Client

Micro XRCE-DDS Client repository. Looking for commercial support? Contact info@eprosima.com
Apache License 2.0
132 stars 82 forks source link

SHM feature On NuttX #306

Open PierrePeng opened 2 years ago

PierrePeng commented 2 years ago

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!

pablogs9 commented 2 years ago
  • 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.

PierrePeng commented 2 years ago

@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?

pablogs9 commented 2 years ago

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