Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unified DynamicData implementation for both reader and writer #4278

Merged
merged 35 commits into from Dec 5, 2023

Conversation

sonndinh
Copy link
Member

@sonndinh sonndinh commented Sep 19, 2023

The following changes are made to the DynamicData implementations:

  • DynamicDataXcdrReadImpl is used as a backing store (read-only) within DynamicDataImpl. With this change, DynamicDataImpl can be used on both reader and writer sides. This will enable support for read-modify-write use cases when a peer can read a received sample, modify the sample, and write the modified sample using a single DynamicDataImpl instance.
  • Update the get API of DynamicDataImpl so that the user can distinguish between when a member is missing (NO_DATA code is returned) and when it is present (OK code is returned) in the instance. Expandable collection types such as strings and sequences are updated to only allow it to expand one element at a time.
  • XCDR serialization code for DynamicData is rewritten to rely only on the public APIs of DynamicData -- this simplifies the code rather significantly and should work with any implementation of DynamicData. The serialization code is also moved completely out of DynamicDataImpl. This will allow changes made to it so that the same serialization code can be reused for different serialization formats in addition to XCDR.

@sonndinh sonndinh marked this pull request as ready for review November 9, 2023 04:53
dds/DCPS/XTypes/Utils.cpp Outdated Show resolved Hide resolved
iguessthislldo added a commit to iguessthislldo/OpenDDS that referenced this pull request Nov 16, 2023
This was made in response to upcoming changes to make `DynamicDataImpl`
unions work more like C++ unions in
OpenDDS#4278.
This also works around a problem in `DynamicDataAdaptor` when using
`get_complex_value` on union branches that haven't been initialized.
docs/devguide/xtypes.rst Outdated Show resolved Hide resolved
docs/devguide/xtypes.rst Outdated Show resolved Hide resolved
docs/devguide/xtypes.rst Outdated Show resolved Hide resolved
docs/devguide/xtypes.rst Outdated Show resolved Hide resolved
tests/DCPS/FilterExpression/FilterExpression.cpp Outdated Show resolved Hide resolved
tests/DCPS/FilterExpression/FilterExpression.cpp Outdated Show resolved Hide resolved
tests/DCPS/FilterExpression/FilterExpression.cpp Outdated Show resolved Hide resolved
tests/unit-tests/dds/DCPS/XTypes/DynamicDataImpl.cpp Outdated Show resolved Hide resolved
docs/devguide/xtypes.rst Outdated Show resolved Hide resolved
docs/devguide/xtypes.rst Outdated Show resolved Hide resolved
docs/news.d/dynamic-data-renovate.rst Outdated Show resolved Hide resolved
@jrw972 jrw972 merged commit d3ba55b into OpenDDS:master Dec 5, 2023
130 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants