I am using CycloneDDS c++ build.
currently, I am able to publish and subscriber primitive data types.
.idl file contains data structure
How to send an object or publish and subscribe an object in CycloneDDS?
Edited - object = both data ("state") and code ("methods")