Vortex Lite pub-sub examples (DCPS)
Entitity is an abstract base class in DCPS, you can learn more from this slides.
- Create one (and only one) domain participant entity.
- Create a publisher entity
- Create multiple DDS topic entities
- Create multiple typed writer entities
- Publish data from specific typed writer
- Create one (and only one) domain participant entity.
- Create a subscriber entity
- Create multiple DDS topic entities
- Create multiple typed reader entities
- Receive data from specific typed reader
- mb.idl : sample IDL with two DDS topics
- pub.c : publish voltage sample every 100 ms
- pub2.c : publish led sample every 100 ms
- sub1.c : subscribe voltage topic with listener (async)
- sub2.c : subscribe voltage topic with waitset (blocking)
- sub3.c : subscribe voltage topic with waitset (blocking) and thread pool
- sub4.c : subscribe voltage topic with waitset (blocking) and lock-free thread pool
- sub5.c : subscribe voltage and led topics with waitset (blocking) and thread pool
Download Vortex Lite evaluation from Prismtech website, then install it.
mkdir build && cd build
cmake ..
make
./sub2
./pub