signal r for omni
This commit is contained in:
@@ -18,6 +18,7 @@ namespace OmniPlus
|
||||
|
||||
private readonly ConcurrentDictionary<int, OmniPlusConnection> connections;
|
||||
private readonly ConcurrentDictionary<int, OmniPlusMeter> meters;
|
||||
private readonly SignalRConnection signalRConnection;
|
||||
private readonly OmniPlusDatabase database;
|
||||
private readonly OmniPlusType omniType;
|
||||
|
||||
@@ -25,10 +26,11 @@ namespace OmniPlus
|
||||
private string variant;
|
||||
private BackgroundWorker background;
|
||||
|
||||
public OmniPlusConnectionsPool(string dbConnectionString)
|
||||
public OmniPlusConnectionsPool(string dbConnectionString, string signalRURL)
|
||||
{
|
||||
this.connections = new ConcurrentDictionary<int, OmniPlusConnection>();
|
||||
this.meters = new ConcurrentDictionary<int, OmniPlusMeter>();
|
||||
this.signalRConnection = new SignalRConnection(signalRURL);
|
||||
this.database = new OmniPlusDatabase(dbConnectionString);
|
||||
this.omniType = new OmniPlusType();
|
||||
|
||||
@@ -67,6 +69,8 @@ namespace OmniPlus
|
||||
|
||||
public void InitializeInspection(params string[] portNames)
|
||||
{
|
||||
this.signalRConnection.Connect();
|
||||
|
||||
OmniPlusConnection connection;
|
||||
OmniPlusMeter meter;
|
||||
int position = 1;
|
||||
@@ -126,7 +130,8 @@ namespace OmniPlus
|
||||
|
||||
foreach (var point in this.omniType.TestPoints)
|
||||
{
|
||||
// TODO: this.SetM3(point.VolumeM3H);
|
||||
// TODO: 600 = 10min * 60sec - change for production.
|
||||
this.signalRConnection.SetQAndWaitUntilReached(point.VolumeM3H, 600);
|
||||
|
||||
tasks = new Task[connectionsCount];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user