aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common/ExternalBridge
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/ExternalBridge')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/ExternalBridge/PPCExternalBridgeService.cs36
1 files changed, 1 insertions, 35 deletions
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; }
- }
-
/// <summary>
/// Represents the PPC external bridge service capable of exposing a remote API for communicating and controlling the machine through the PPC.
/// </summary>
@@ -37,36 +28,11 @@ namespace Tango.PPC.Common.ExternalBridge
/// <param name="machineProvider">The machine provider.</param>
public PPCExternalBridgeService(IPPCApplicationManager applicationManager, IMachineProvider machineProvider)
{
- var csvStream = EmbeddedResourceHelper.GetEmbeddedResourceStream("Tango.PPC.Common.SafetyLevelOperations.csv");
-
- List<CsvEntry> entries = CsvFile.Read<CsvEntry>(new CsvSource(csvStream)).ToList();
-
- foreach (var entry in entries)
- {
- MessageType type;
- if (Enum.TryParse<MessageType>(entry.MessageType, out type))
- {
- ExternalBridgeService.SafetyLevelOperations.Add(type);
- }
- }
-
- applicationManager.ApplicationReady += (_, __) =>
+ applicationManager.ApplicationReady += (_, __) =>
{
var settings = SettingsManager.Default.GetOrCreate<PPCSettings>();
- //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;
};
}