Skip to content

Remapping#54

Merged
pavel-kirienko merged 3 commits into
mainfrom
dev
Apr 9, 2026
Merged

Remapping#54
pavel-kirienko merged 3 commits into
mainfrom
dev

Conversation

@pavel-kirienko
Copy link
Copy Markdown
Member

Closes #23

@pavel-kirienko pavel-kirienko self-assigned this Apr 9, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a name remapping mechanism to the Cyphal “cy” node, wiring it into name resolution and providing configuration via a simple from=to string format. This is integrated into the public API/docs, examples, and test suite.

Changes:

  • Implemented cy_remap() / cy_remap_parse() and applied remap rules during cy_resolve()/cy_name_resolve().
  • Extended cy_name_resolve() to accept an optional WKV remap table and updated tests accordingly.
  • Added new integration tests for remapping, updated examples to read CYPHAL_NAMESPACE/CYPHAL_REMAP, and documented remapping in the README.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
cy/cy.c Adds remap storage to cy_t, implements remap APIs, and applies remap in name resolution.
cy/cy.h Documents remapping and changes cy_name_resolve() signature to accept a remap table.
tests/src/test_api_remap.cpp New integration tests for remap insertion/overwrite, parsing, pin behavior, OOM rollback, and destroy cleanup.
tests/src/test_api_name.cpp Updates call sites for the new cy_name_resolve(remap, ...) signature and adds unit-style remap tests using WKV directly.
tests/CMakeLists.txt Adds the new remap test target to the API test matrix.
README.md Documents the remapping feature and environment-variable based configuration convention.
examples/example_time_pub.c Reads namespace/remap from environment and applies cy_remap_parse().
examples/example_streaming_server.c Reads namespace/remap from environment and applies cy_remap_parse().
examples/example_streaming_client.c Reads namespace/remap from environment and applies cy_remap_parse().
examples/example_file_server.c Reads namespace/remap from environment and applies cy_remap_parse().
examples/example_file_client.c Reads namespace/remap from environment and applies cy_remap_parse().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cy/cy.c
Comment thread cy/cy.h
Comment thread cy/cy.c
Comment thread tests/src/test_api_remap.cpp
@pavel-kirienko pavel-kirienko merged commit 818ad30 into main Apr 9, 2026
12 checks passed
@pavel-kirienko pavel-kirienko deleted the dev branch April 9, 2026 23:00
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.

Add name remapping API

2 participants