Put
OpenInsightCommonGatewayInterfaceReactorStatesStatus
This commit is contained in:
@ -10,6 +10,7 @@ using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Reflection;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
@ -23,11 +24,11 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
private readonly bool _IsXToAPC;
|
||||
private readonly bool _IsXToIQSSi;
|
||||
private readonly string _MemoryPath;
|
||||
private readonly HttpClient _HttpClient;
|
||||
private readonly bool _IsXToOpenInsight;
|
||||
private readonly bool _IsXToOpenInsightMetrologyViewer;
|
||||
private readonly Dictionary<string, string> _CellNames;
|
||||
private readonly bool _IsXToOpenInsightMetrologyViewerAttachments;
|
||||
private readonly string _OpenInsightCommonGatewayInterfaceContacts;
|
||||
|
||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, useCyclicalForDescription, isEAFHosted)
|
||||
@ -49,9 +50,14 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
_MemoryPath = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "Path.Memory");
|
||||
_IsXToOpenInsightMetrologyViewerAttachments = _Hyphens == (int)Hyphen.IsXToOpenInsightMetrologyViewerAttachments;
|
||||
ModelObjectParameterDefinition[] cellInstanceCollection = GetProperties(cellInstanceConnectionName, modelObjectParameters, "CellInstance.", ".Path");
|
||||
_OpenInsightCommonGatewayInterfaceContacts = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "OpenInsight.CommonGatewayInterface.Contacts");
|
||||
foreach (ModelObjectParameterDefinition modelObjectParameterDefinition in cellInstanceCollection)
|
||||
_CellNames.Add(modelObjectParameterDefinition.Name.Split('.')[1], modelObjectParameterDefinition.Value);
|
||||
if (_IsXToOpenInsight)
|
||||
{
|
||||
_HttpClient = new();
|
||||
string openInsightCommonGatewayInterfaceReactorStatesStatus = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "OpenInsight.CommonGatewayInterface.ReactorStates.Status");
|
||||
_HttpClient.BaseAddress = new(openInsightCommonGatewayInterfaceReactorStatesStatus);
|
||||
}
|
||||
}
|
||||
|
||||
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception) => Move(extractResults, exception);
|
||||
@ -202,8 +208,10 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
throw new Exception($"Only {nameof(_IsXToOpenInsight)} is codded!");
|
||||
else if (_IsXToOpenInsight)
|
||||
{
|
||||
if (_HttpClient is null)
|
||||
throw new Exception($"{nameof(_HttpClient)} is null!");
|
||||
if (!isDummyRun && _IsEAFHosted)
|
||||
ProcessData.PostOpenInsightCommonGatewayInterfaceContacts(this, _Logistics, _OpenInsightCommonGatewayInterfaceContacts, dateTime, logisticsSequenceMemoryDirectory, descriptions);
|
||||
ProcessData.PutOpenInsightCommonGatewayInterfaceReactorStatesStatus(this, _Logistics, _HttpClient, descriptions);
|
||||
}
|
||||
else
|
||||
throw new Exception();
|
||||
|
Reference in New Issue
Block a user