Conversation
|
@codex review |
|
To use Codex here, create a Codex account and connect to github. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 67d8314954
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return false; | ||
| } | ||
|
|
||
| bytes = Bytes::shallow_copy(payload.data, payload.length); |
There was a problem hiding this comment.
Own incoming CDR bytes before deserialize returns
When receiving any native CDR sample, this stores a non-owning view of SerializedPayload_t::data in the loaned Bytes sample. The serialized payload is owned by Fast DDS and its lifetime is only guaranteed during TopicDataType::deserialize; returning the application-data loan later does not retain that payload. Fast DDS can therefore recycle or overwrite the buffer before process_message() invokes the subscriber/client/server callback, causing corrupted data or use-after-free behavior. Deep-copy the payload here or retain an owning payload object for the complete sample lifetime.
Useful? React with 👍 / 👎.
Port the reviewed changes from PR #11 onto the dev branch.
Summary / 概述
为 VLink 增加端到端的原生 DDS CDR 支持,使 Fast DDS IDL、ROS 2 消息及原生 DDS 类型可以直接接入 VLink,并支持发现、监控、录制和回放。
主要改动:
SchemaType::kCdr,同步支持 C++、C API、Python API 和相关构建宏。该改动使 VLink 能够直接与原生 DDS/ROS 2 数据类型互操作,并在工具链中完整保留 CDR 类型及序列化信息。
Type of change / 变更类型
Related issues / 关联 Issue
N/A
How was this tested? / 如何测试
本分支补充或更新了以下测试覆盖:
实际执行结果(提交前请替换为真实结果):
tools/format.shtools/check.shChecklist / 检查项
tools/format.shandtools/check.shpass / 通过格式化与检查门禁ENABLE_TEST_WARN=ON) / 无新增编译告警