65 lines
2.7 KiB
C#
65 lines
2.7 KiB
C#
using Adaptation.Shared;
|
|
using Adaptation.Shared.Properties;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace Adaptation.FileHandlers.DEP08SIASM;
|
|
|
|
public class ProcessData
|
|
{
|
|
|
|
internal static List<Tuple<int, Enum, string>> HyphenTuples => new()
|
|
{
|
|
new Tuple<int, Enum, string>(0, Hyphen.IsNaEDA, @"\EC_EDA\Staging\Traces\~\Source"),
|
|
new Tuple<int, Enum, string>(15, Hyphen.IsXToOpenInsightMetrologyViewer, @"\EC_EAFLog\TracesMES\~\Source"),
|
|
new Tuple<int, Enum, string>(-361, Hyphen.IsXToIQSSi, @"\EC_SPC_Si\Traces\~\PollPath"),
|
|
new Tuple<int, Enum, string>(362, Hyphen.IsXToOpenInsight, @"\\messa01ec.ec.local\APPS\Metrology\~\Source"),
|
|
new Tuple<int, Enum, string>(-363, Hyphen.IsXToOpenInsightMetrologyViewerAttachments, @"\EC_Characterization_Si\In Process\~\Source"),
|
|
new Tuple<int, Enum, string>(-3604, Hyphen.IsXToAPC, @"\EC_APC\Staging\Traces\~\PollPath"),
|
|
new Tuple<int, Enum, string>(-365, Hyphen.IsXToSPaCe, @"\EC_SPC_Si\Traces\~\Source"),
|
|
new Tuple<int, Enum, string>(1806, Hyphen.IsXToArchive, @"\EC_EAFLog\TracesArchive\~\Source"),
|
|
new Tuple<int, Enum, string>(367, Hyphen.IsArchive, @"\EC_Characterization_Si\Processed")
|
|
// new Tuple<int, Enum, string>(1808, Hyphen.IsDummy
|
|
};
|
|
|
|
internal static string GetLines(IFileRead fileRead, Logistics logistics, List<jpeg.Description> descriptions)
|
|
{
|
|
StringBuilder result = new();
|
|
if (fileRead is null)
|
|
{ }
|
|
if (logistics is null)
|
|
{ }
|
|
if (descriptions is null)
|
|
{ }
|
|
return result.ToString();
|
|
}
|
|
|
|
internal static async void PutOpenInsightCommonGatewayInterfaceReactorStatesStatus(IFileRead fileRead, Logistics logistics, HttpClient httpClient, List<jpeg.Description> descriptions)
|
|
{
|
|
if (fileRead is null)
|
|
{ }
|
|
HttpContent httpContent = null;
|
|
string status = descriptions[0].MID;
|
|
string reactorNumber = logistics.MesEntity.Substring(1);
|
|
string statusDateTime = logistics.DateTimeFromSequence.ToString("MM-dd-yyyy HH:mm:ss");
|
|
Uri uri = new($"{httpClient.BaseAddress.OriginalString}reactno={reactorNumber}&status={status}&statusdtm={statusDateTime}");
|
|
try
|
|
{
|
|
HttpResponseMessage httpResponseMessage = await httpClient.PutAsync(uri, httpContent);
|
|
if (httpResponseMessage.StatusCode is System.Net.HttpStatusCode.OK)
|
|
{
|
|
string content = await httpResponseMessage.Content.ReadAsStringAsync();
|
|
if (string.IsNullOrEmpty(content))
|
|
{ }
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
status = ex.Message;
|
|
if (string.IsNullOrEmpty(status))
|
|
{ }
|
|
}
|
|
}
|
|
|
|
} |