From 00a491d93733d4625ad329b2ba8237f445364b3f Mon Sep 17 00:00:00 2001 From: Mirta Date: Wed, 30 Dec 2020 16:39:52 +0200 Subject: merge --- .../ExternalBridge/PPCExternalBridgeService.cs | 36 +--------------------- 1 file changed, 1 insertion(+), 35 deletions(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/ExternalBridge/PPCExternalBridgeService.cs') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/ExternalBridge/PPCExternalBridgeService.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/ExternalBridge/PPCExternalBridgeService.cs index 99951d812..c50202e86 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/ExternalBridge/PPCExternalBridgeService.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/ExternalBridge/PPCExternalBridgeService.cs @@ -1,16 +1,12 @@ using System; using System.Collections.Generic; -using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using Tango.BL.Entities; using Tango.Core.DI; -using Tango.Core.Helpers; -using Tango.CSV; using Tango.Integration.ExternalBridge; using Tango.Integration.Operation; -using Tango.PMR.Common; using Tango.PPC.Common.Application; using Tango.PPC.Common.Connection; using Tango.PPC.Common.Messages; @@ -18,11 +14,6 @@ using Tango.Settings; namespace Tango.PPC.Common.ExternalBridge { - public class CsvEntry - { - public String MessageType { get; set; } - } - /// /// Represents the PPC external bridge service capable of exposing a remote API for communicating and controlling the machine through the PPC. /// @@ -37,36 +28,11 @@ namespace Tango.PPC.Common.ExternalBridge /// The machine provider. public PPCExternalBridgeService(IPPCApplicationManager applicationManager, IMachineProvider machineProvider) { - var csvStream = EmbeddedResourceHelper.GetEmbeddedResourceStream("Tango.PPC.Common.SafetyLevelOperations.csv"); - - List entries = CsvFile.Read(new CsvSource(csvStream)).ToList(); - - foreach (var entry in entries) - { - MessageType type; - if (Enum.TryParse(entry.MessageType, out type)) - { - ExternalBridgeService.SafetyLevelOperations.Add(type); - } - } - - applicationManager.ApplicationReady += (_, __) => + applicationManager.ApplicationReady += (_, __) => { var settings = SettingsManager.Default.GetOrCreate(); - //TODO: Configure external bridge for configure protocol enforce... MachineOperator = machineProvider.MachineOperator; Machine = machineProvider.Machine; - SignalRConfiguration.Enabled = settings.EnableExternalBridgeSignalR; - TcpTransportAdapterWriteMode = settings.TcpTransportAdapterWriteMode; - if (Environment.CommandLine.Contains("-webDebug")) - { - SignalRConfiguration.Address = "http://localhost:1111/"; //settings.DeploymentSlot.ToAddress(); - } - else - { - SignalRConfiguration.Address = settings.DeploymentSlot.ToAddress(); - } - SignalRConfiguration.Hub = settings.ExternalBridgeSignalRHub; Enabled = settings.EnableExternalBridge; }; } -- cgit v1.3.1