1079 lines
50 KiB
C#
1079 lines
50 KiB
C#
#region Namespace
|
|
using System;
|
|
using System.Diagnostics;
|
|
using com.itac.mes.domain;
|
|
using com.itac.oib;
|
|
using com.itac.oib.linecontrol.service;
|
|
using com.itac.oib.monitoring.service;
|
|
using com.itac.oib.boardgatekeeper.service;
|
|
using com.itac.oib.siplacesetupcenter.contracts.data;
|
|
using com.itac.oib.traceability.service;
|
|
using com.itac.oib.traceability.contracts.data;
|
|
using com.itac.oib.client.customextensions;
|
|
using com.itac.oib.siplacesetupcenter.service;
|
|
using com.itac.oib.linecontrol.contracts.data;
|
|
using com.itac.oib.displayservice.service;
|
|
using com.itac.oib.displayservice.contracts.data;
|
|
using com.itac.oib.boardgatekeeper.contracts.data;
|
|
using com.itac.mes.tools;
|
|
#endregion
|
|
|
|
namespace com.itac.mes.proxy.business
|
|
{
|
|
|
|
// Die Instanz dieser Klasse ist der Empfänger von Nachrichten der einzelnen OIB-Dienste (einzelne Endpunkte).
|
|
// diese Instanz gibt es nur einmal!!!!!!
|
|
// diese müssen an das DataInterface nach Java übertragen werden
|
|
|
|
public class OIBEventHandler : ISiplaceSetupCenterNotify, ITraceability, ISetupCenterExternalControl, IMonitoringReceiver, IDisplayServiceCallback, ILineControlReceiver, IAdapterNotify, IChangeoverManager, IBoardGateKeeper, IDekPrinterExternalControl, ILineControlMesInterceptor
|
|
{
|
|
#region Fields
|
|
|
|
private readonly MessageWriter _messageWriter; // zum Ausgeben von xml-Nachrichten
|
|
private readonly AdapterControl _adapterControl;
|
|
public string LineName { get; set; }
|
|
public OIBServiceImpl serviceImpl { get; set; }
|
|
#endregion
|
|
|
|
#region Constructor
|
|
|
|
public OIBEventHandler(AdapterControl adapterControl, MessageWriter messageWriter)
|
|
{
|
|
if (adapterControl == null) throw new ArgumentNullException("adapterControl");
|
|
if (messageWriter == null) throw new ArgumentNullException("messageWriter");
|
|
_adapterControl = adapterControl;
|
|
_messageWriter = messageWriter;
|
|
}
|
|
|
|
public OIBEventHandler()
|
|
{
|
|
// TODO: Complete member initialization
|
|
}
|
|
|
|
#endregion
|
|
|
|
// Eine neue Verbindung vom OIB-Adapter um DataInterface holen und die dann benutzen; nach der Benutzung muss diese verworfen werden
|
|
private OIBEvents GetIHapChannel(string channelName)
|
|
{
|
|
return (OIBEvents)_adapterControl.GetDataInterfaceConnection(channelName).GetTransparentProxy();
|
|
}
|
|
|
|
|
|
#region ITraceabilityOibService Member
|
|
|
|
public bool Ping()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public BoardProducedResponse boardProduced(TraceabilityData trcData)
|
|
// public string NewTraceabilityData(www.siplace.com.OIB._2012._03.Traceability.Contracts.Data.TraceabilityData trcData)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Verbose, "TraceabilityData received");
|
|
_messageWriter.output(trcData);
|
|
// gibt es einen externen Listener (JavaProcess), dann Daten an diesen weiterleiten
|
|
OIBEvents eventHandler = null;
|
|
BoardProducedResponse result = new BoardProducedResponse();
|
|
result.BoardValidationResult = 2;
|
|
result.BoardValidationReason = "rejected";
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("BoardProducedChannel");
|
|
result = eventHandler.boardProduced(trcData);
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Verbose, "External result for TraceabilityData: " + result.BoardValidationReason);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to send NewTraceabilityData to java receiver", e);
|
|
return result;
|
|
}
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
return result;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ISiplaceSetupCenterExternalControl Member
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// eingang der anfrage vom OIB, die Daten werden aufbereitet und an das DataInterface weiter gesendet;
|
|
/// dessen Antwort wiederum wird in die entsprechenden Datenstrukturen zurück gewandelt und an den OIB
|
|
/// gesendet; ist es nicht möglich das DataInterface zu erreichen wird ein negatives Ergebnis incl. einer
|
|
/// entsprechenden Meldung generiert und an den OIB zurückgesendet
|
|
/// </summary>
|
|
/// <param name="packagingUnitLocations"></param>
|
|
/// <returns></returns>
|
|
public ExternalControlResult[] getPackagingUnitControlStatus(PackagingUnitLocation[] packagingUnitLocations)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "ExternalControl GetPackagingUnitControlStatus called");
|
|
_messageWriter.output(packagingUnitLocations);
|
|
ExternalControlResult[] itacResult = null;
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("GetPackagingUnitControlStatusChannel");
|
|
itacResult = eventHandler.getPackagingUnitControlStatus(packagingUnitLocations);
|
|
_messageWriter.output(itacResult);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
itacResult = getFailureResult(packagingUnitLocations);
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "failed to process GetPackagingUnitControlStatus", e);
|
|
}
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
|
|
_messageWriter.output(itacResult);
|
|
|
|
return itacResult;
|
|
}
|
|
|
|
public ExternalControlResult[] getNewPackagingUnitData(PackagingUnitLocation[] packagingUnitLocations)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "ExternalControl GetNewPackagingUnitData called");
|
|
_messageWriter.output(packagingUnitLocations);
|
|
oib.siplacesetupcenter.contracts.data.ExternalControlResult[] itacResult = null;
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("GetNewPackagingUnitDataChannel");
|
|
itacResult = eventHandler.getNewPackagingUnitData(packagingUnitLocations);
|
|
|
|
_messageWriter.output(itacResult);
|
|
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
itacResult = getFailureResult(packagingUnitLocations);
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "failed to process GetNewPackagingUnitData", e);
|
|
}
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
_messageWriter.output(itacResult);
|
|
return itacResult;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private oib.siplacesetupcenter.contracts.data.ExternalControlResult[] getFailureResult(oib.siplacesetupcenter.contracts.data.PackagingUnitLocation[] report)
|
|
{
|
|
var itacResult = new oib.siplacesetupcenter.contracts.data.ExternalControlResult[report.Length];
|
|
for (var i = 0; i < report.Length; i++)
|
|
{
|
|
itacResult[i] = new oib.siplacesetupcenter.contracts.data.ExternalControlResult();
|
|
itacResult[i].Messages = new oib.siplacesetupcenter.contracts.data.ExternalControlResultMessage[1];
|
|
itacResult[i].Messages[0] = new oib.siplacesetupcenter.contracts.data.ExternalControlResultMessage();
|
|
itacResult[i].Messages[0].Message = "iTAC.MES.Suite DataInterface is not available!";
|
|
itacResult[i].PackagingUnit = report[i].PackagingUnit;
|
|
itacResult[i].ResultState = 2; // Status-NICHT OK
|
|
}
|
|
return itacResult;
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
#region IMonitoringReceiver Member
|
|
|
|
public void boardProcessedEventReceived(com.itac.oib.monitoring.contracts.data.BoardProcessedData args)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "received monitoring event BoardProcessedData");
|
|
_messageWriter.output(args);
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("BoardProcessedChannel");
|
|
eventHandler.boardProcessedEventReceived(args);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to push BoardProcessedData to java receiver", e);
|
|
}
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
public void startSendObject(Object sendObject)
|
|
{
|
|
if (sendObject == null) { LogHandler.log(Constants.LOGGER, TraceEventType.Information, "start push event (null) to java"); return; }
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, String.Format("start push event {0} to java", sendObject.GetType().Name));
|
|
_messageWriter.output(sendObject);
|
|
}
|
|
|
|
public void stationEventReceived(com.itac.oib.monitoring.contracts.data.StationEventComposite args)
|
|
{
|
|
startSendObject(args);
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
{
|
|
eventHandler = GetIHapChannel("StationEventChannel");
|
|
eventHandler.stationEventReceived(args);
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to push StationEvent to java receiver", e);
|
|
}
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
public void recipeChangeEventReceived(com.itac.oib.monitoring.contracts.data.RecipeChange args)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Verbose, "received unused monitoring event RecipeChange");
|
|
//messageWriter.output(args);
|
|
//if (eventHandler != null) { eventHandler.RecipeChangeEventReceived(args); }
|
|
}
|
|
|
|
public void recipeActivationChangeEvent(com.itac.oib.monitoring.contracts.data.RecipeCollection args)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Verbose, "received unused monitoring event RecipeActivation");
|
|
//messageWriter.output(args);
|
|
//if (eventHandler != null) { eventHandler.RecipeActivationChangeEvent(args); }
|
|
}
|
|
|
|
public void configurationChangedEvent(com.itac.oib.monitoring.contracts.data.Configuration args)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Verbose, "received unused monitoring event RecipeActivation");
|
|
//messageWriter.output(args);
|
|
//if (eventHandler != null) { eventHandler.ConfigurationChangedEvent(args); }
|
|
}
|
|
|
|
public void passmodeEvent(com.itac.oib.monitoring.contracts.data.PassmodeCollection args)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Verbose, "received unused monitoring event Passmode");
|
|
//messageWriter.output(args);
|
|
//if (eventHandler != null) { eventHandler.PassmodeEvent(args); }
|
|
}
|
|
|
|
public void pickupObservationEvent(com.itac.oib.monitoring.contracts.data.PickupObservationData args)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Verbose, "received unused monitoring event PickupObservation");
|
|
//messageWriter.output(args);
|
|
//if (eventHandler != null) { eventHandler.PickupObservationEvent(args); }
|
|
}
|
|
#endregion
|
|
|
|
#region ILineControlReceiver Member
|
|
|
|
|
|
public void downloadEvent(com.itac.oib.linecontrol.data.DownloadData downloadData)
|
|
{
|
|
//TODO check line name property
|
|
// if (LineName != null && !downloadData.getlineName.Equals(LineName))
|
|
// {
|
|
// LogHandler.log(Constants.LOGGER, TraceEventType.Information, "skip DownloadEvent for not configured line '" + downloadData.lineName + "'");
|
|
// return;
|
|
// }
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "receiving DownloadEvent, calling java now");
|
|
_messageWriter.output(downloadData);
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("DownloadEventChannel");
|
|
eventHandler.downloadEvent(downloadData);
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Verbose, "DownloadEvent pushed to java completed");
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Error, "pushing DownloadEvent to java failed", e);
|
|
}
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
public void onServiceDisconnect()
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Verbose, "push onServiceDisconnect");
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("DisconnectChannel");
|
|
eventHandler.onServiceDisconnect();
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Verbose, "onServiceDisconnect pushed to java completed");
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Error, "pushing onServiceDisconnect to java failed", e);
|
|
}
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
public void onServiceReconnect()
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Verbose, "push onServiceReconnect");
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("ReconnectChannel");
|
|
eventHandler.onServiceReconnect();
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Verbose, "onServiceReconnect pushed to java completed");
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Error, "pushing onServiceReconnect to java failed", e);
|
|
}
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region IAdapterNotify Member
|
|
|
|
public void MessageQueueRestartet(string queueEndpoint)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Verbose, "push MessageQueueRestartet");
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("MessageQueueRestartetChannel");
|
|
eventHandler.MessageQueueRestartet(queueEndpoint);
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Verbose, "MessageQueueRestartet push to java completed");
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Error, "pushing MessageQueueRestartet to java failed", e);
|
|
}
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
public void RegisterAdapter(int port, string ipAddress, string canonicalHostName, string hostName)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Verbose, "push RegisterAdapter");
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("RegisterChannel");
|
|
eventHandler.RegisterAdapter(port, ipAddress, canonicalHostName, hostName);
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Verbose, "RegisterAdapter push to java completed");
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Error, "pushing RegisterAdapter to java failed", e);
|
|
}
|
|
finally { _adapterControl.closeHandler(eventHandler); }
|
|
}
|
|
|
|
public void SendQueueInfo(QueueInfo queueInfo)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "sendQueueInfo");
|
|
}
|
|
|
|
public void shutdown()
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "shutting down ");
|
|
}
|
|
|
|
public void setChannelName(string channelName)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "setting channel name to '" + channelName + "'");
|
|
}
|
|
|
|
public void startup()
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "start up channel");
|
|
}
|
|
|
|
public void setVersionInfo(com.itac.mes.tools.KeyValue[] keyValueArray)
|
|
{
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("setVersionInfoChannel");
|
|
eventHandler.setVersionInfo(keyValueArray);
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Verbose, "setVersionInfo pushed to java completed");
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Error, "pushing setVersionInfo to java failed", e);
|
|
}
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
#endregion
|
|
|
|
|
|
public void lineChangeoverEvent(LineChangeoverEventArgs _request)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "receiving LineChangeoverEventArgs, calling java now");
|
|
_messageWriter.output(_request);
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("LineChangeoverEventChannel");
|
|
eventHandler.lineChangeoverEvent(_request);
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Verbose, "LineChangeoverEvent pushed to java completed");
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Error, "pushing LineChangeoverEvent to java failed", e);
|
|
}
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
#region IBoardGateKeeper Member
|
|
|
|
|
|
|
|
|
|
public BoardRequestResult virtualInkspotBoardRequest(VirtualInkspotHandlerBoardRequest boardRequestData)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "BoardGateKeeper VirtualInkspotBoardRequestLocal called");
|
|
BoardRequestResult itacResult = null;
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
_messageWriter.output(boardRequestData);
|
|
eventHandler = GetIHapChannel("VirtualInkspotBoardRequestResultChannel");
|
|
// TODO evtl doch eine eigene Klasse definieren
|
|
// if (boardRequestData.getPosition().get == null || virtInkspotBoardRequest.boardRequestData.position.machineName.Length == 0)
|
|
// {
|
|
// virtInkspotBoardRequest.boardRequestData.position.machineName = BoardGateKeeperHelper.machineName;
|
|
// }
|
|
itacResult = eventHandler.virtualInkspotBoardRequest(boardRequestData);
|
|
_messageWriter.output(itacResult);
|
|
return itacResult;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "failed to process BoardRequestResult", e);
|
|
}
|
|
finally
|
|
{
|
|
if (eventHandler != null) { eventHandler.shutdown(); }
|
|
else
|
|
{
|
|
// Keine Verbindung zum Interface möglich--> negativ quittieren
|
|
//itacResult = boardRequestResult;
|
|
// itacResult.reason = "Rejected because DataInterface was not available";
|
|
// itacResult.requestResult = "Rejected";
|
|
// alle vorhandenen Subpanels ablehnen
|
|
// if (itacResult.subPanelStates != null && itacResult.subPanelStates.Length > 0)
|
|
// {
|
|
// for (int i = 0; i < itacResult.subPanelStates.Length; i++)
|
|
// {
|
|
// itacResult.subPanelStates[i].place = false;
|
|
// itacResult.subPanelStates[i].reason = "Do not place because DataInterface was not available";
|
|
// }
|
|
// }
|
|
}
|
|
}
|
|
return itacResult;
|
|
}
|
|
|
|
#endregion
|
|
#region SetupCenter events
|
|
|
|
public void feederPlaced(oib.siplacesetupcenter.contracts.data.FeederPlacedReport report)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "received FeederPlaced");
|
|
_messageWriter.output(report);
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("FeederPlacedChannel");
|
|
eventHandler.feederPlaced(report);
|
|
}
|
|
catch (Exception ode) { LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to push FeederPlaced to java receiver", ode); }
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
public void feederRemoved(oib.siplacesetupcenter.contracts.data.FeederRemovedReport report)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "received FeederRemoved");
|
|
_messageWriter.output(report);
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("FeederRemovedChannel");
|
|
eventHandler.feederRemoved(report);
|
|
}
|
|
catch (Exception ode) { LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to push FeederRemoved to java receiver", ode); }
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
public void messagesReceived(oib.siplacesetupcenter.contracts.data.MessagesReceivedReport report)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "received MessagesReceived");
|
|
_messageWriter.output(report);
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("MessagesReceivedChannel");
|
|
eventHandler.messagesReceived(report);
|
|
}
|
|
catch (Exception ode) { LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to push MessagesReceived to java receiver", ode); }
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
public void newSetupActive(oib.siplacesetupcenter.contracts.data.NewSetupActiveReport report)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "received NewSetupActive");
|
|
_messageWriter.output(report);
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("NewSetupActiveChannel");
|
|
eventHandler.newSetupActive(report);
|
|
}
|
|
catch (Exception ode) { LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to push NewSetupActive to java receiver", ode); }
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
public void packagingQuantityChanged(oib.siplacesetupcenter.contracts.data.PackagingQuantityChangedReport report)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "received PackagingQuantityChanged");
|
|
_messageWriter.output(report);
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("PackagingQuantityChangedChannel");
|
|
eventHandler.packagingQuantityChanged(report);
|
|
}
|
|
catch (Exception ode) { LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to push PackagingQuantityChanged to java receiver", ode); }
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
public void setupChanged(oib.siplacesetupcenter.contracts.data.SetupChangedReport report)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "received SetupChanged");
|
|
_messageWriter.output(report);
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("SetupChangedChannel");
|
|
eventHandler.setupChanged(report);
|
|
}
|
|
catch (Exception ode) { LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to push SetupChanged to java receiver", ode); }
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
public void materialReordered(oib.siplacesetupcenter.contracts.data.MaterialReorderReport report)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "received MaterialReordered");
|
|
_messageWriter.output(report);
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("MaterialReorderedChannel");
|
|
eventHandler.materialReordered(report);
|
|
}
|
|
catch (Exception ode) { LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to push MaterialReordered to java receiver", ode); }
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
public void packagingUnitConsumed(oib.siplacesetupcenter.contracts.data.PackagingUnitConsumedReport report)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "received PackagingUnitConsumed");
|
|
_messageWriter.output(report);
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("PackagingUnitConsumedChannel");
|
|
eventHandler.packagingUnitConsumed(report);
|
|
}
|
|
catch (Exception ode) { LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to push PackagingUnitConsumed to java receiver", ode); }
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
public void materialMoved(oib.siplacesetupcenter.contracts.data.MaterialMovedReport report)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "received MaterialMoved");
|
|
_messageWriter.output(report);
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("MaterialMovedChannel");
|
|
eventHandler.materialMoved(report);
|
|
}
|
|
catch (Exception ode) { LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to push MaterialMoved to java receiver", ode); }
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
public void tablePlaced(oib.siplacesetupcenter.contracts.data.TablePlacedReport report)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "received TablePlaced");
|
|
_messageWriter.output(report);
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("TablePlacedChannel");
|
|
eventHandler.tablePlaced(report);
|
|
}
|
|
catch (Exception ode) { LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to push TablePlaced to java receiver", ode); }
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
public void tableRemoved(oib.siplacesetupcenter.contracts.data.TableRemovedReport report)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "received TableRemoved");
|
|
_messageWriter.output(report);
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("TableRemovedChannel");
|
|
eventHandler.tableRemoved(report);
|
|
}
|
|
catch (Exception ode) { LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to push TableRemoved to java receiver", ode); }
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
public void packagingUnitCreated(oib.siplacesetupcenter.contracts.data.PackagingUnitCreatedReport report)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "received PackagingUnitCreated");
|
|
_messageWriter.output(report);
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("PackagingUnitCreatedChannel");
|
|
eventHandler.packagingUnitCreated(report);
|
|
}
|
|
catch (Exception ode) { LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to push PackagingUnitCreated to java receiver", ode); }
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
public void packagingUnitUpdated(oib.siplacesetupcenter.contracts.data.PackagingUnitUpdatedReport report)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "received PackagingUnitUpdated");
|
|
_messageWriter.output(report);
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("PackagingUnitUpdatedChannel");
|
|
eventHandler.packagingUnitUpdated(report);
|
|
}
|
|
catch (Exception ode) { LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to push PackagingUnitUpdated to java receiver", ode); }
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
public void packagingUnitDeleted(oib.siplacesetupcenter.contracts.data.PackagingUnitDeletedReport report)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "received PackagingUnitDeleted");
|
|
_messageWriter.output(report);
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("PackagingUnitDeletedChannel");
|
|
eventHandler.packagingUnitDeleted(report);
|
|
}
|
|
catch (Exception ode) { LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to push PackagingUnitDeleted to java receiver", ode); }
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
public void lockStateChanged(oib.siplacesetupcenter.contracts.data.LockStateChangedReport report)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "received LockStateChanged");
|
|
_messageWriter.output(report);
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("LockStateChangedChannel");
|
|
eventHandler.lockStateChanged(report);
|
|
}
|
|
catch (Exception ode) { LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to push LockStateChanged to java receiver", ode); }
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
public void spliceChainSplit(oib.siplacesetupcenter.contracts.data.SpliceChainSplitReport report)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "received SpliceChainSplit");
|
|
_messageWriter.output(report);
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("SpliceChainSplitChannel");
|
|
eventHandler.spliceChainSplit(report);
|
|
}
|
|
catch (Exception ode) { LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to push SpliceChainSplit to java receiver", ode); }
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
public void printerCapabilitiesChanged(oib.siplacesetupcenter.contracts.data.PrinterCapabilitiesChangedReport report)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "received setupCenter event PrinterCapabilitiesChanged");
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("PrinterCapabilitiesChangedChannel");
|
|
eventHandler.printerCapabilitiesChanged(report);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to push printerCapabilitiesChangedReport to java receiver", e);
|
|
}
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
public void printerConsumablesUpdated(oib.siplacesetupcenter.contracts.data.PrinterConsumablesUpdatedReport report)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "received setupCenter event PrinterConsumablesUpdated");
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("PrinterConsumablesUpdatedChannel");
|
|
eventHandler.printerConsumablesUpdated(report);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to push printerConsumablesUpdated to java receiver", e);
|
|
}
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
public void printerCoverClosed(oib.siplacesetupcenter.contracts.data.PrinterCoverClosedReport report)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "received setupCenter event PrinterCoverClosedVerified");
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("PrinterCoverClosedChannel");
|
|
eventHandler.printerCoverClosed(report);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to push printerCoverClosedReport to java receiver", e);
|
|
}
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
public void printerCoverOpened(oib.siplacesetupcenter.contracts.data.PrinterCoverOpenedReport report)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "received setupCenter event PrinterCoverOpened");
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("PrinterCoverOpenedChannel");
|
|
eventHandler.printerCoverOpened(report);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to push printerCoverOpenedReport to java receiver", e);
|
|
}
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
|
|
}
|
|
|
|
public void printerMaterialVerified(oib.siplacesetupcenter.contracts.data.PrinterMaterialVerifiedReport report)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "received setupCenter event PrinterMaterialVerified");
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("PrinterMaterialVerifiedChannel");
|
|
eventHandler.printerMaterialVerified(report);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to push printerMaterialVerified to java receiver", e);
|
|
}
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
public void printerMaterialUnverified(oib.siplacesetupcenter.contracts.data.PrinterMaterialUnverifiedReport report)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "received setupCenter event PrinterMaterialUnverified");
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("PrinterMaterialUnverifiedChannel");
|
|
eventHandler.printerMaterialUnverified(report);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to push printerMaterialUnverified to java receiver", e);
|
|
}
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
public void printerToolVerified(oib.siplacesetupcenter.contracts.data.PrinterToolVerifiedReport report)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "received setupCenter event PrinterToolVerified");
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("PrinterToolVerifiedChannel");
|
|
eventHandler.printerToolVerified(report);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to push printerToolVerified to java receiver", e);
|
|
}
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
public void printerToolUnverified(oib.siplacesetupcenter.contracts.data.PrinterToolUnverifiedReport report)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "received setupCenter event ToolUnverified");
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("PrinterToolUnverifiedChannel");
|
|
eventHandler.printerToolUnverified(report);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to push printerToolUnverified to java receiver", e);
|
|
}
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
|
|
public void printerRecipeVerified(oib.siplacesetupcenter.contracts.data.PrinterRecipeVerifiedReport report)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "received setupCenter event PrinterRecipeVerified");
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("PrinterRecipeVerified");
|
|
eventHandler.printerRecipeVerified(report);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to push PrinterRecipeVerified to java receiver", e);
|
|
}
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
public Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.PingResponse Ping(Asm.As.Oib.SiplaceSetupCenter.Contracts.Data.PingRequest request)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
#endregion
|
|
#region PrinterExternalControl Interface
|
|
public VerifyPrinterMaterialResponse verifyPrinterMaterial(VerifyPrinterMaterialRequest request)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "dekPrinter VerifyPrinterMaterial called");
|
|
_messageWriter.output(request);
|
|
com.itac.oib.siplacesetupcenter.contracts.data.VerifyPrinterMaterialResponse itacResult = null;
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("VerifyPrinterMaterialChannel");
|
|
itacResult = eventHandler.verifyPrinterMaterial(request);
|
|
_messageWriter.output(itacResult);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
itacResult = getVerifyMaterialFailureResult(request);
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to process VerifyPrinterMaterialRequest", e);
|
|
}
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
_messageWriter.output(itacResult);
|
|
return itacResult;
|
|
}
|
|
|
|
private VerifyPrinterMaterialResponse getVerifyMaterialFailureResult(VerifyPrinterMaterialRequest request)
|
|
{
|
|
VerifyPrinterMaterialResponse result = new VerifyPrinterMaterialResponse();
|
|
return result;
|
|
}
|
|
|
|
public VerifyPrinterToolResponse verifyPrinterTool(VerifyPrinterToolRequest request)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "dekPrinter VerifyPrinterTool called");
|
|
_messageWriter.output(request);
|
|
com.itac.oib.siplacesetupcenter.contracts.data.VerifyPrinterToolResponse itacResult = null;
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("VerifyPrinterToolChannel");
|
|
itacResult = eventHandler.verifyPrinterTool(request);
|
|
_messageWriter.output(itacResult);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
itacResult = getVerifyToolFailureResult(request);
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to process VerifyPrinterToolRequest", e);
|
|
}
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
_messageWriter.output(itacResult);
|
|
return itacResult;
|
|
}
|
|
|
|
private VerifyPrinterToolResponse getVerifyToolFailureResult(VerifyPrinterToolRequest request)
|
|
{
|
|
VerifyPrinterToolResponse result = new VerifyPrinterToolResponse();
|
|
return result;
|
|
}
|
|
|
|
public bool ping()
|
|
{
|
|
// TODO: remove from interface
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
|
|
private MesVerificationResult getFailureResult(Exception e)
|
|
{
|
|
MesVerificationResult result = new MesVerificationResult();
|
|
result.VerificationResult = 2; // 0=OK, 1=Rejected, 2=Error
|
|
result.Reason = e.Message;
|
|
return result;
|
|
}
|
|
|
|
public MesVerificationResult verifyRecipeActivationOnDekPrinter(VerifyRecipeActivationOnDekPrinterRequest request)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "dekPrinter verifyRecipeActivationOnDekPrinter called");
|
|
_messageWriter.output(request);
|
|
com.itac.oib.linecontrol.contracts.data.MesVerificationResult itacResult = null;
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("VerifyRecipeActivationOnDekPrinterChannel");
|
|
itacResult = eventHandler.verifyRecipeActivationOnDekPrinter(request);
|
|
_messageWriter.output(itacResult);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
itacResult = getFailureResult(e);
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to process VerifyRecipeActivationOnDekPrinterRequest", e);
|
|
}
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
_messageWriter.output(itacResult);
|
|
return itacResult;
|
|
}
|
|
|
|
public MesVerificationResult verifyRecipeDownload(VerifyRecipeDownloadRequest request)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "dekPrinter verifyRecipeDownload called");
|
|
_messageWriter.output(request);
|
|
com.itac.oib.linecontrol.contracts.data.MesVerificationResult itacResult = null;
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("VerifyRecipeDownloadChannel");
|
|
itacResult = eventHandler.verifyRecipeDownload(request);
|
|
_messageWriter.output(itacResult);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
itacResult = getFailureResult(e);
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to process VerifyRecipeDownloadRequest", e);
|
|
}
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
_messageWriter.output(itacResult);
|
|
return itacResult;
|
|
}
|
|
|
|
public MesVerificationResult verifyStartAutoProgramDownload(VerifyRecipeForAutoProgramDownloadRequest request)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "dekPrinter verifyStartAutoProgramDownload called");
|
|
_messageWriter.output(request);
|
|
com.itac.oib.linecontrol.contracts.data.MesVerificationResult itacResult = null;
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("VerifyRecipeForAutoProgramDownloadRequestChannel");
|
|
itacResult = eventHandler.verifyStartAutoProgramDownload(request);
|
|
_messageWriter.output(itacResult);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
itacResult = getFailureResult(e);
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to process VerifyRecipeForAutoProgramDownloadRequest", e);
|
|
}
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
_messageWriter.output(itacResult);
|
|
return itacResult;
|
|
}
|
|
|
|
public MesVerificationResult verifyRecipeForAutoProgramDownload(VerifyRecipeForAutoProgramDownloadRequest request)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "dekPrinter verifyRecipeForAutoProgramDownload called");
|
|
_messageWriter.output(request);
|
|
com.itac.oib.linecontrol.contracts.data.MesVerificationResult itacResult = null;
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("VerifyRecipeForAutoProgramDownloadRequestChannel");
|
|
itacResult = eventHandler.verifyRecipeForAutoProgramDownload(request);
|
|
_messageWriter.output(itacResult);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
itacResult = getFailureResult(e);
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to process VerifyRecipeForAutoProgramDownloadRequest", e);
|
|
}
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
_messageWriter.output(itacResult);
|
|
return itacResult;
|
|
}
|
|
|
|
public MesVerificationResult verifyPcbForAutoProgramDownload(VerifyPcbForAutoProgramDownloadRequest request)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "dekPrinter verifyPcbForAutoProgramDownload called");
|
|
_messageWriter.output(request);
|
|
com.itac.oib.linecontrol.contracts.data.MesVerificationResult itacResult = null;
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("VerifyPcbForAutoProgramDownloadRequestChannel");
|
|
itacResult = eventHandler.verifyPcbForAutoProgramDownload(request);
|
|
_messageWriter.output(itacResult);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
itacResult = getFailureResult(e);
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to process VerifyPcbForAutoProgramDownloadRequest", e);
|
|
}
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
_messageWriter.output(itacResult);
|
|
return itacResult;
|
|
}
|
|
|
|
public void confirmationReceivedEvent(ConfirmationReceivedRequest confirmationReceivedRequest)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "received displayService event confirmationReceivedEvent");
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("confirmationReceivedEvent");
|
|
eventHandler.confirmationReceivedEvent(confirmationReceivedRequest);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to push serviceConnectedEvent to java receiver", e);
|
|
}
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
public void serviceConnectedEvent(string strServiceEndpoint, string strComment)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "received displayService event serviceConnectedEvent");
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("serviceConnectedEvent");
|
|
eventHandler.serviceConnectedEvent(strServiceEndpoint, strComment);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to push serviceConnectedEvent to java receiver", e);
|
|
}
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
public void serviceUnreachableEvent(string strServiceEndpoint, string strComment)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Information, "received displayService event serviceUnreachableEvent");
|
|
OIBEvents eventHandler = null;
|
|
try
|
|
{
|
|
eventHandler = GetIHapChannel("serviceUnreachableEvent");
|
|
eventHandler.serviceUnreachableEvent(strServiceEndpoint, strComment);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
LogHandler.log(Constants.LOGGER, TraceEventType.Error, "failed to push serviceUnreachableEvent to java receiver", e);
|
|
}
|
|
finally { if (eventHandler != null) { eventHandler.shutdown(); } }
|
|
}
|
|
|
|
#endregion
|
|
|
|
|
|
}
|
|
}
|