Skip to content

taka-wang/dds-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dds-example

Vortex Lite pub-sub examples (DCPS)

// What are dds entities

Entitity is an abstract base class in DCPS, you can learn more from this slides.

// Procedures

publish side

  1. Create one (and only one) domain participant entity.
  2. Create a publisher entity
  3. Create multiple DDS topic entities
  4. Create multiple typed writer entities
  5. Publish data from specific typed writer

subscriber side

  1. Create one (and only one) domain participant entity.
  2. Create a subscriber entity
  3. Create multiple DDS topic entities
  4. Create multiple typed reader entities
  5. Receive data from specific typed reader

// File Descriptions

  • 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

// Build

Download Vortex Lite evaluation from Prismtech website, then install it.

mkdir build && cd build
cmake ..
make 
./sub2
./pub

Releases

No releases published

Packages

No packages published

Languages