mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 10:58:35 +08:00
【feat】添加tcp指令下发
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
package nodes
|
||||
|
||||
import (
|
||||
"pandax/pkg/global"
|
||||
"pandax/pkg/mqtt"
|
||||
"pandax/iothub/client/mqttclient"
|
||||
"pandax/pkg/rule_engine/message"
|
||||
)
|
||||
|
||||
@@ -30,11 +29,11 @@ func (n *rpcRespondNode) Handle(msg *message.Message) error {
|
||||
if RequestId == 0 {
|
||||
RequestId = int(msg.Metadata.GetValue("requestId").(float64))
|
||||
}
|
||||
var datas = mqtt.RpcPayload{
|
||||
var datas = mqttclient.RpcPayload{
|
||||
Method: msg.Msg.GetValue("method").(string),
|
||||
Params: msg.Msg.GetValue("params"),
|
||||
}
|
||||
rpc := &mqtt.RpcRequest{Client: global.MqttClient, RequestId: RequestId}
|
||||
rpc := &mqttclient.RpcRequest{Client: mqttclient.MqttClient, RequestId: RequestId}
|
||||
err := rpc.RespondTpc(datas)
|
||||
if err != nil {
|
||||
if failureLableNode != nil {
|
||||
|
||||
Reference in New Issue
Block a user