Upgrade modalità simulazione
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
// See https://aka.ms/new-console-template for more information
|
||||
using MachineSim;
|
||||
using MP.MONO.Core.DTO;
|
||||
using MP.MONO.Data.Controllers;
|
||||
using Newtonsoft.Json;
|
||||
using StackExchange.Redis;
|
||||
@@ -21,6 +23,9 @@ ConnectionMultiplexer redis = ConnectionMultiplexer.Connect(redisConf);
|
||||
ISubscriber sub = redis.GetSubscriber();
|
||||
IDatabase? redisDb = redis.GetDatabase();
|
||||
|
||||
// imposto parametri simulatore
|
||||
var currSimGen = new Simulator(Directory.GetCurrentDirectory());
|
||||
|
||||
// avvio tutti i thread...
|
||||
Thread threadStatus = new Thread(simStatus);
|
||||
Thread threadAlarms = new Thread(simAlarms);
|
||||
@@ -84,7 +89,7 @@ void simParameters()
|
||||
|
||||
do
|
||||
{
|
||||
var newParams = simGen.MachineGetParameters();
|
||||
var newParams = currSimGen.MachineGetParameters();
|
||||
string rawData = JsonConvert.SerializeObject(newParams);
|
||||
saveAndSendMessage(mHash("Machine:Parameters:Current"), rawData, "parameters", rawData);
|
||||
// attesa random
|
||||
|
||||
Reference in New Issue
Block a user