Commit d783890b7c21534e28ba3050adf633acaffd12df
1 parent
18c27196
review:【IoT 物联网】为 EMQX 协议添加 共享 的 Vertx
Showing
2 changed files
with
4 additions
and
1 deletions
yudao-module-iot/yudao-module-iot-gateway/src/main/java/cn/iocoder/yudao/module/iot/gateway/protocol/emqx/IotEmqxUpstreamProtocol.java
yudao-module-iot/yudao-module-iot-gateway/src/main/java/cn/iocoder/yudao/module/iot/gateway/protocol/emqx/router/IotEmqxDownstreamHandler.java
| ... | ... | @@ -79,6 +79,7 @@ public class IotEmqxDownstreamHandler { |
| 79 | 79 | // 2. 根据消息方法和回复状态,构建 topic |
| 80 | 80 | boolean isReply = IotDeviceMessageUtils.isReplyMessage(message); |
| 81 | 81 | |
| 82 | + // TODO @芋艿:看看基于 message 的 method 去反向推导; | |
| 82 | 83 | // 3. 根据消息方法类型构建对应的主题 |
| 83 | 84 | switch (methodEnum) { |
| 84 | 85 | case PROPERTY_POST: |
| ... | ... | @@ -96,6 +97,7 @@ public class IotEmqxDownstreamHandler { |
| 96 | 97 | break; |
| 97 | 98 | |
| 98 | 99 | case EVENT_POST: |
| 100 | + // TODO @haohao:不用 eventIdentifier 拼接哈,直接 data 里面,有 identifier 字段 | |
| 99 | 101 | // 事件上报:只支持回复消息(下行) |
| 100 | 102 | if (isReply) { |
| 101 | 103 | String identifier = IotDeviceMessageUtils.getIdentifier(message); |
| ... | ... | @@ -107,6 +109,7 @@ public class IotEmqxDownstreamHandler { |
| 107 | 109 | |
| 108 | 110 | case SERVICE_INVOKE: |
| 109 | 111 | // 服务调用:支持请求和回复 |
| 112 | + // TODO @haohao:不用 serviceIdentifier 拼接哈,直接 data 里面,有 identifier 字段 | |
| 110 | 113 | String serviceIdentifier = IotDeviceMessageUtils.getIdentifier(message); |
| 111 | 114 | if (StrUtil.isNotBlank(serviceIdentifier)) { |
| 112 | 115 | if (isReply) { | ... | ... |