NoResponseController
This commit is contained in:
@@ -93,7 +93,7 @@ namespace MachineJob.Service
|
||||
private Dictionary<string, double>? QueryConsole(DataReturnDef dataReturnDef)
|
||||
{
|
||||
var values = dataReturnDef.ReturnValues.Datas;
|
||||
if (dataReturnDef.ReturnValues.IsSuccess)
|
||||
if (dataReturnDef.ReturnValues.IsSuccess == true)
|
||||
{
|
||||
foreach (var value in values)
|
||||
{
|
||||
@@ -135,6 +135,19 @@ namespace MachineJob.Service
|
||||
|
||||
return values.MapGetValuesToSetValues();
|
||||
}
|
||||
else if(dataReturnDef.ReturnValues.IsSuccess == null)
|
||||
{
|
||||
Random r = new Random();
|
||||
|
||||
Dictionary<string, double> ans = new Dictionary<string, double>();
|
||||
|
||||
for (int i = 0; i< 10; i++)
|
||||
{
|
||||
ans["Test" + (i+1)] = r.Next(65536) - 32768;
|
||||
}
|
||||
|
||||
return ans;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,8 @@
|
||||
"Host": "opc.tcp://localhost/test"
|
||||
},
|
||||
"Controller": {
|
||||
"WaitingListCount": "100"
|
||||
"WaitingListCount": "100",
|
||||
"NoResponse": false
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user