Commit d15c03476bb72b448488fff52fb8ef0cade7f014
Merge branch 'fix/tcp-device-send-command' into 'main_dev'
fix: 修复tcp服务命令下发 See merge request yunteng/thingskit-scada!121
Showing
1 changed file
with
5 additions
and
1 deletions
... | ... | @@ -16440,7 +16440,7 @@ class HandleDataInteraction { |
16440 | 16440 | /** |
16441 | 16441 | * @type {command: string , commandType: string, service: string, wary: string, tcpCommand: string} |
16442 | 16442 | */ |
16443 | - let { command, way, service, callType } = content | |
16443 | + let { command, way, service, callType, transportType } = content | |
16444 | 16444 | const identifier = content?.identifier |
16445 | 16445 | |
16446 | 16446 | let params |
... | ... | @@ -16459,6 +16459,10 @@ class HandleDataInteraction { |
16459 | 16459 | params = await getTCPCommand(value, dataSource) |
16460 | 16460 | } |
16461 | 16461 | |
16462 | + if (transportType == 'TCP' && content?.commandType == '1') { | |
16463 | + params = value.replaceAll(/\s/g, '').toUpperCase() | |
16464 | + } | |
16465 | + | |
16462 | 16466 | if (!params) return |
16463 | 16467 | |
16464 | 16468 | if (service) { | ... | ... |