Skip to content

feat(protocol): 官方协议支持设备模块Topic#26

Open
zhou-hao wants to merge 1 commit into
use-principalfrom
feat/device-module
Open

feat(protocol): 官方协议支持设备模块Topic#26
zhou-hao wants to merge 1 commit into
use-principalfrom
feat/device-module

Conversation

@zhou-hao
Copy link
Copy Markdown
Member

变更目的

为设备增加“模块”能力:模块归属于父设备,不作为子设备或独立物类型;支持模块编码、模块 Thing、模块级物模型、模块属性/事件存储查询,以及标准/官方协议模块 Topic。

设计边界

  • 设备模块不是子设备,不参与独立认证、会话、在线、固件、子设备拓扑或独立权限。
  • 模块物模型只继承父设备/产品 metadata 中 modules[moduleCode] 对应模块物模型。
  • 模块操作走 ThingModuleMessage / DeviceModuleMessage
  • 模块属性/事件使用独立 row-shaped 表;column mode 下也回退到模块 row-shaped 表。
  • 模块日志不单独建表,复用父设备日志。
  • 事件值内部字段搜索 / JSONB 深度索引不是本次交付范围。
  • 未改造协议包不自动支持模块消息。

验证

已在 detached clean worktrees 中仅应用设备模块 patch 并执行 PR 包级门禁:

bash .ai/device-module-release/run-pr-package-gates.sh

结果:

OK: device module PR package gates passed on detached clean worktrees.
SUMMARY audit_mode=worktree-diff actual_diff_files=68 extra_files=0
OK: all diff files are within device module release file list.

覆盖:core/supports、device-manager、things-component、timescaledb Testcontainers、标准协议、官方协议、manifest、patch apply、自检与 diff 边界审计。

关联 PR

该能力为多仓库联动发布,请按依赖顺序合并:

  1. jetlinks-core
  2. jetlinks-supports
  3. jetlinks-components
  4. device-manager
  5. jetlinks-protocols
  6. jetlinks-official-protocol
  7. jetlinks-ultimate 发布材料

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.

1 participant