OpenDDS 3.25 Highlights #4247
jrw972
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
JSON Encoding and Decoding Using TypeSupport
TypeSupport
classes now have four new members for converting samples to and from other formats calledencode_to_string
,encode_to_bytes
,decode_from_string
, anddecode_from_bytes
. The motivation for this addition was to expose the JSON conversion capability of OpenDDS to Java and the only format that is supported isOpenDDS::DCPS::JSON_DATA_REPRESENTATION
. The java/tests/vread_vwrite/VreadVwrite.java file shows how to usedecode_from_string
andencode_to_string
The tests/DCPS/Compiler/vread_vwrite/VreadVwriteTest.cpp file shows how to do a similar thing in C++.
Now, the scaffolding is in place for additional formats like (X)CDR, but these formats haven’t been implemented yet.
Equality Operators
Certain language mappings like FACE and Safety Profile generate
==
and!=
for IDL-defined types while the C++11 mapping did not. This was unfortunate since many users are migrating to the C++11 mapping and end up defining these operators manually. Now, opendds_idl supports the-Gequality
option to generate these operators in the C++11 language mapping. Hopefully, this will reduce the amount of code that users need to write and maintain and make the IDL-defined types more amenable to generic programming techniques.Configuration
This release marks the beginning of a run-time configuration overhaul. The goals are to
OpenDDS now stores configuration information in a key-value store called (unimaginatively) the ConfigStore. The ConfigStore can be accessed from the
Service_Participant
, e.g.,TheServiceParticpant->config_store()
. The ConfigStore is populated from the command line and config file, and users are free to use it directly. For example, theDCPSChunks
value in the[common]
section of the config file can be configured like thisConfiguration keys are formed by concatenating
OPENDDS
, the config file section, and the config file key with underscores. The configuration keys are normalized to "screaming snake/snail case" so you can also writeThe same thing can be accomplished via the command line, assuming your application initializes the
Service_Participant
with argumentsThe ConfigStore is only populated with arguments that begin with
-DCPS
(legacy),-Federation
(legacy), and-OpenDDS
(new). One quirk is that a configuration key on the command line must start withOpenDDS
instead ofOpendds
.Currently, the ConfigStore is used for the [common] section of the config file and options that are common to all transports.
Users can also use the ConfigStore for application-specific configuration
Building OpenDDS and Applications with CMake
OpenDDS has supported building user applications with CMake since OpenDDS 3.14. Before the 3.25 release we started working on the ability to build OpenDDS itself with CMake. That didn’t make it into the 3.25 release, but other changes to support that work did. These changes fall into two general categories; minor quality-of-life improvements and better support for TAO applications.
Probably the most important quality-of-life improvement is support for components in
find_package
. This changes what the CMake support looks for and what is required when looking for libraries and executables. It can also be used to require certain features. This was required to build OpenDDS because there needs to be a way to express that OpenDDS won’t be available when building OpenDDS, but ACE/TAO libraries are still needed. For users of the CMake support, components can be used to enforce requirements on the ACE/TAO and OpenDDS being used.Another new feature is that executable targets are exported in addition to the existing exported libraries. These were added to simplify internal use of
tao_idl
andopendds_idl
, but can be used to call any of the executables from CMake or to install them in a downstream project.The other two quality-of-life improvements are
opendds_export_header
to provide an alternative to ACE’sgenerate_export_file.pl
and thatOPENDDS_CMAKE_VERBOSE
can now log more detailed debugging info.The TAO support is probably not directly relevant to the vast majority of OpenDDS users, but it is critical to properly building all of OpenDDS. The DDS IDL that makes up the bulk of OpenDDS’s public API is implemented as IDL local interfaces and DCPSInfoRepo is a CORBA server. Before, building this would have been hard because the CMake support was written assuming an OpenDDS application was going to be built. Now the CMake support can support building a TAO application and do it without OpenDDS being built, which is required to build OpenDDS. To learn more about this, see the relevant items in the 3.25 news and the ACE/TAO-only CMake test.
Looking forward to OpenDDS 3.26, the CMake work is ongoing in PR #4203. In addition to being able to build OpenDDS with CMake, it also includes fixes for two long-standing issues with the CMake support.
The first issue is that using
opendds_target_sources
on IDL in different directories isn’t really currently possible. This will be fixed by duplicating directory structure from a base directory similar to howBASE_DIRS
works in CMake file sets.The second issue is using the
PUBLIC
orINTERFACE
scopes inopendds_target_sources
can result in errors complaining about missing generated files if the target is linked to another target. Under the hood,opendds_target_sources
is usingtarget_sources
to compile generated files. It uses the same scope asopendds_target_sources
and ifPUBLIC
orINTERFACE
is passed, then these files are inherited by other targets to compile. This does not work as intended or provide any kind of benefit, so all internal uses of target_sources will bePRIVATE
instead of the scope that was passed toopendds_target_sources
. Using scopes inopendds_target_sources
will still affect how includes are inherited and what goes in the generated interface file lists.What's Next?
For 3.26, we will continue to work on CMake support and expand the use of the ConfigStore.
Beta Was this translation helpful? Give feedback.
All reactions