diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-12-01 19:26:32 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-12-01 19:26:32 +0200 |
| commit | 68ec47fb04c19139f8e39343689201a9f089ad8c (patch) | |
| tree | e23dd24478a97faa373a2a58ae4d865882447f4d /Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging | |
| parent | 45a7a7319bbae1a2ab5cfc93d7a2507cccd8770e (diff) | |
| download | Tango-68ec47fb04c19139f8e39343689201a9f089ad8c.tar.gz Tango-68ec47fb04c19139f8e39343689201a9f089ad8c.zip | |
Implemented machine events emulation via FSE.
Added support for event 5099.
Updated event rev to 28.
Added 3 & 4 dancer types for X4.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging/DefaultEventLogger.cs | 34 | ||||
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging/IEventLogger.cs | 3 |
2 files changed, 36 insertions, 1 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging/DefaultEventLogger.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging/DefaultEventLogger.cs index e9bcd4246..ee96a77a5 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging/DefaultEventLogger.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging/DefaultEventLogger.cs @@ -17,6 +17,9 @@ using Tango.PPC.Common.Application; using Tango.PPC.Common.Authentication; using Tango.PPC.Common.Connection; using Tango.Transport; +using Tango.PPC.Common.ExternalBridge; +using Tango.PPC.Shared.Events; +using Tango.Core.DI; namespace Tango.PPC.Common.EventLogging { @@ -52,6 +55,21 @@ namespace Tango.PPC.Common.EventLogging #endregion + private IPPCExternalBridgeService _externalBridge; + [TangoInject(Mode = TangoInjectMode.WhenAvailable)] + public IPPCExternalBridgeService ExternalBridgeService + { + get { return _externalBridge; } + set + { + if (_externalBridge != value) + { + _externalBridge = value; + _externalBridge.RegisterRequestHandler(this); + } + } + } + #region Constructors /// <summary> @@ -396,5 +414,21 @@ namespace Tango.PPC.Common.EventLogging } #endregion + + #region External Bridge Handler + + [ExternalBridgeRequestHandlerMethod(typeof(PushEmulatedEventRequest), RequestHandlerLoggingMode.LogRequestNameAndContent)] + public async Task OnStartPerformanceUpdatesRequest(PushEmulatedEventRequest request, String token, ExternalBridgeReceiver receiver) + { + _machineProvider.MachineOperator.PushEmulatedEvent(request.Event, request.Timeout); + await receiver.SendGenericResponse(new PushEmulatedEventResponse(), token); + } + + public void OnReceiverDisconnected(ExternalBridgeReceiver receiver) + { + + } + + #endregion } } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging/IEventLogger.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging/IEventLogger.cs index 10560e034..81cce927d 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging/IEventLogger.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging/IEventLogger.cs @@ -5,6 +5,7 @@ using System.Text; using System.Threading.Tasks; using Tango.BL.Entities; using Tango.BL.Enumerations; +using Tango.Integration.ExternalBridge; using Tango.PMR.Diagnostics; namespace Tango.PPC.Common.EventLogging @@ -12,7 +13,7 @@ namespace Tango.PPC.Common.EventLogging /// <summary> /// Represents a database events logger. /// </summary> - public interface IEventLogger + public interface IEventLogger : IExternalBridgeRequestHandler { /// <summary> /// Occurs when a new machine event has been received. |
