Fast-DDS icon indicating copy to clipboard operation
Fast-DDS copied to clipboard

TypeIntrospection example implementation [14797]

Open jparisu opened this issue 2 years ago • 4 comments

Signed-off-by: jparisu [email protected]

Implement a new "generic" Type Introspection example.

Description

This new example added in examples/C++/DDS is able to:

  • Create a DomainParticipant with a Publisher and a DataWriter with different types depending on the arguments of the process. These datatypes are different from each other. These are :
    • Created by FastDDSGen and with TypeObject information
    • Created dynamically by an xml
    • Created dynamically by DynamicTypes
  • Create a DomainParticipant that, when discover and endpoint in the topic specificed (by argument) it creats a Subscriber and a DataReader in that topic and with the data type registered dynamically. This Reader is able to decode the message and print it in stdout with the name of each variable and its value.

Contributor Checklist

  • [x] Commit messages follow the project guidelines.
  • [x] The code follows the style guidelines of this project.
  • [ ] Tests that thoroughly check the new feature have been added/Regression tests checking the bug and its fix have been added.
  • [ ] Any new/modified methods have been properly documented using Doxygen.
  • [ ] Fast DDS test suite has been run locally.
  • [x] Changes are ABI compatible.
  • [x] Changes are API compatible.
  • [ ] Documentation builds and tests pass locally.
  • [ ] New feature has been added to the versions.md file (if applicable).
  • [ ] New feature has been documented/Current behavior is correctly described in the documentation.

Reviewer Checklist

  • [ ] Check contributor checklist is correct.
  • [ ] Check CI results: changes do not issue any warning.
  • [ ] Check CI results: failing tests are unrelated with the changes.

jparisu avatar Jun 15 '22 05:06 jparisu

ToDo

  • [x] Extend for more complex types (array of structs) [it fails with SEG FAULT (as expected)]
  • [x] Support to choose whether to use TypeLookUp Service or TypeObject info
  • [ ] Improve comments in .h files
  • [x] Correctly document README and the use case
  • [ ] Convince Elbrus to merge it

jparisu avatar Jun 21 '22 13:06 jparisu

@richiprosima Please test this

jparisu avatar Jun 30 '22 15:06 jparisu

ToDo

  • [x] Extend for more complex types (array of structs) [it fails with SEG FAULT (as expected)]
  • [x] Support to choose whether to use TypeLookUp Service or TypeObject info
  • [ ] Improve comments in .h files
  • [x] Correctly document README and the use case
  • [ ] Convince Elbrus to merge it

@jparisu Elbrus team is on its way to merge this. Assigned to milestone v2.10.1 :wink:

JLBuenoLopez avatar Mar 16 '23 14:03 JLBuenoLopez

Milestone updated to v2.11.0 because the example fails with current dynamic types implementation.

JLBuenoLopez avatar Mar 21 '23 07:03 JLBuenoLopez

This example is too complex. Maybe have a separate repo for this. Closing this PR.

richiware avatar May 07 '24 08:05 richiware