0

I've had a constraint imposed on me that my C structure names can't be published via DDS and that I instead have to use a different set of names and then somehow associate the two. It begs the question why not just change my C structure to match the actual DDS names but it is impractical since the names have to be configurable at run time.

Discarding the run-time constraint, I am wondering if there is an IDL keyword that I can use to create an alias between my structures and the desired DDS published names. There is an "alias" keyword but it is for data types.

I did a lot of google searching and had a hard time finding a definition for IDL keywords. The OMG document doesn't provide any insight to indicate this is possible (perhaps it's not).

Jordan McBain
  • 275
  • 2
  • 11
  • Looks like someone else had a very similar question: https://stackoverflow.com/questions/46150398/opendds-create-multiple-topics-from-single-idl-structure?rq=1 – Jordan McBain Apr 15 '21 at 17:19

1 Answers1

1

In DDS, data types are registered with the middleware via a 'register_type()' operation. This operation includes a parameter to specify the 'name' to associate with the registered type. This name is not required to match the name of the IDL type. [If this name is not specified, then the middleware will use the IDL type name.]

C Tucker
  • 301
  • 1
  • 8
  • In DDS you need to register a type only if it is used by a DDS Topic. DDS supports either 'structure' or 'union' types for this purpose. If a structure has members [elements?] that are also structure types, you do not need to register these 'internal' types, so the name of 'internal' struct types are essentially irrelevant. – C Tucker Apr 08 '21 at 20:07