fix: IotSharp RPC response topic error. (#38)
This commit is contained in:
parent
bfd22acad1
commit
6cdac03ef4
@ -209,7 +209,7 @@ namespace Plugin
|
||||
|
||||
_logger.LogInformation($"{Device.DeviceName}收到RPC,{e}");
|
||||
RpcResponse rpcResponse = new()
|
||||
{ DeviceName = e.DeviceName, RequestId = e.RequestId, IsSuccess = false };
|
||||
{ DeviceName = e.DeviceName, RequestId = e.RequestId, IsSuccess = false, Method = e.Method};
|
||||
//执行写入变量RPC
|
||||
if (e.Method.ToLower() == "write")
|
||||
{
|
||||
|
@ -390,7 +390,7 @@ namespace Plugin
|
||||
await ResponseIsRpcAsync(new ISRpcResponse
|
||||
{
|
||||
DeviceId = rpcResponse.DeviceName,
|
||||
Method = "Method",
|
||||
Method = rpcResponse.Method,
|
||||
ResponseId = rpcResponse.RequestId,
|
||||
Data = JsonConvert.SerializeObject(new Dictionary<string, object>
|
||||
{
|
||||
|
@ -9,6 +9,7 @@ namespace PluginInterface
|
||||
public class RpcResponse
|
||||
{
|
||||
public string RequestId { get; set; }
|
||||
public string Method { get; set; }
|
||||
public string DeviceName { get; set; }
|
||||
public bool IsSuccess { get; set; }
|
||||
public string Description { get; set; }
|
||||
|
Loading…
Reference in New Issue
Block a user