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

Rework TypeId stuff at SubscriberImpl to be dynamic modules friendly. #380

Closed
serges147 opened this issue Aug 23, 2024 · 1 comment
Closed
Assignees

Comments

@serges147
Copy link
Collaborator

Instead of relying on address of a static template variable (which is not dynamic modules friendly), switch to Nunavut generated full type name string (python code already has it), from which could generate a hash per template instantiation, and use it as type id.

@serges147 serges147 self-assigned this Aug 23, 2024
thirtytwobits pushed a commit to OpenCyphal/nunavut that referenced this issue Nov 8, 2024
1. Exposed full name of a DSDL type as...
```
struct _traits_
{
    ...
    constexpr const char* FullNameAndVersion() { return "{{ composite_type }}"; }
};
```
Needed for libcyphal's subscriber implementation (see [issue #
380](OpenCyphal-Garage/libcyphal#380))

2. Fix for issue #348 - added `#include <cassert>` for
`nunavut/support/serialization.hpp` file generation
@serges147 serges147 changed the title Rework TypeId" stuff at SubscriberImpl` to be dynamic modules friendly. Rework TypeId stuff at SubscriberImpl to be dynamic modules friendly. Nov 9, 2024
github-merge-queue bot pushed a commit that referenced this issue Nov 13, 2024
…dly (#396)

- For issue #380 reworked subscriber's message type id generation - now
Nunavut's `FullNameAndVersion` const string is in use to generate type
id (string hash). No more unsafe (dynamic modules non-friendly)
conversion of address of template static variable to `std::uintptr_t`.
Also:
- Added several `GetInfoProvider::setXxx` setters
- DSDL generated `<Type>::_traits_::ArrayCapacity::<field>` now in use
@serges147
Copy link
Collaborator Author

Resolved by PR #396

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

No branches or pull requests

1 participant