aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeReceiver.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeReceiver.cs')
-rw-r--r--Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeReceiver.cs20
1 files changed, 12 insertions, 8 deletions
diff --git a/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeReceiver.cs b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeReceiver.cs
index fc00bd18e..2ca1b08f2 100644
--- a/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeReceiver.cs
+++ b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeReceiver.cs
@@ -202,7 +202,7 @@ namespace Tango.Integration.ExternalBridge
{
if (IsLoggedIn)
{
- await SendRequest<ExternalBridgeLogoutRequest, ExternalBridgeLogoutResponse>(new ExternalBridgeLogoutRequest(), TimeSpan.FromSeconds(3));
+ await SendRequest<ExternalBridgeLogoutRequest, ExternalBridgeLogoutResponse>(new ExternalBridgeLogoutRequest(), new TransportRequestConfig() { Timeout = TimeSpan.FromSeconds(3), ShouldLog = true });
}
}
catch (Exception ex)
@@ -265,7 +265,7 @@ namespace Tango.Integration.ExternalBridge
(reason) =>
{
//Decline
- SendResponse<ExternalBridgeLoginResponse>(new ExternalBridgeLoginResponse(), container.Token, false, ErrorCode.GeneralError, reason);
+ SendResponse<ExternalBridgeLoginResponse>(new ExternalBridgeLoginResponse(), container.Token, new TransportResponseConfig() { ErrorCode = ErrorCode.GeneralError, ErrorMessage = reason });
Disconnect().GetAwaiter().GetResult();
});
@@ -325,6 +325,10 @@ namespace Tango.Integration.ExternalBridge
{
SendResponse((ex as ResponseErrorException).Container);
}
+ else if (ex is ContinuousResponseAbortedException)
+ {
+ SendResponse((ex as ContinuousResponseAbortedException).Container);
+ }
}
});
}
@@ -372,7 +376,7 @@ namespace Tango.Integration.ExternalBridge
if (_diagnosticsToken != null)
{
RequiresDiagnostics = false;
- SendResponse<StartDiagnosticsResponse>(new StartDiagnosticsResponse(), _diagnosticsToken, true);
+ SendResponse<StartDiagnosticsResponse>(new StartDiagnosticsResponse(), _diagnosticsToken, new TransportResponseConfig() { Completed = true });
_diagnosticsToken = null;
SendResponse<StopDiagnosticsResponse>(new StopDiagnosticsResponse(), container.Token);
}
@@ -390,7 +394,7 @@ namespace Tango.Integration.ExternalBridge
if (_debugLogsToken != null)
{
RequiresDebugLogs = false;
- SendResponse<StartDebugLogResponse>(new StartDebugLogResponse(), _debugLogsToken, true);
+ SendResponse<StartDebugLogResponse>(new StartDebugLogResponse(), _debugLogsToken, new TransportResponseConfig() { Completed = true });
_debugLogsToken = null;
SendResponse<StopDebugLogResponse>(new StopDebugLogResponse(), container.Token);
}
@@ -408,7 +412,7 @@ namespace Tango.Integration.ExternalBridge
if (_eventsToken != null)
{
RequiresEventsNotification = false;
- SendResponse<StartEventsNotificationResponse>(new StartEventsNotificationResponse(), _eventsToken, true);
+ SendResponse<StartEventsNotificationResponse>(new StartEventsNotificationResponse(), _eventsToken, new TransportResponseConfig() { Completed = true });
_eventsToken = null;
SendResponse<StopEventsNotificationResponse>(new StopEventsNotificationResponse(), container.Token);
}
@@ -426,7 +430,7 @@ namespace Tango.Integration.ExternalBridge
if (_machineStatusToken != null)
{
RequiresMachineStatusUpdate = false;
- SendResponse<StartMachineStatusUpdateResponse>(new StartMachineStatusUpdateResponse(), _machineStatusToken, true);
+ SendResponse<StartMachineStatusUpdateResponse>(new StartMachineStatusUpdateResponse(), _machineStatusToken, new TransportResponseConfig() { Completed = true });
_machineStatusToken = null;
SendResponse<StopMachineStatusUpdateResponse>(new StopMachineStatusUpdateResponse(), container.Token);
}
@@ -444,7 +448,7 @@ namespace Tango.Integration.ExternalBridge
if (_applicationLogsToken != null)
{
RequiresApplicationLogs = false;
- SendResponse<StartApplicationLogsResponse>(new StartApplicationLogsResponse(), _applicationLogsToken, true);
+ SendResponse<StartApplicationLogsResponse>(new StartApplicationLogsResponse(), _applicationLogsToken, new TransportResponseConfig() { Completed = true });
_applicationLogsToken = null;
SendResponse<StopApplicationLogsResponse>(new StopApplicationLogsResponse(), container.Token);
}
@@ -468,7 +472,7 @@ namespace Tango.Integration.ExternalBridge
protected virtual void OnStartPowerDownRequest(MessageContainer container)
{
- SendResponse(new StartPowerDownResponse() { }, container.Token, false, ErrorCode.ContinuousResponseAborted, "Power down request is not supported via external bridge.");
+ SendResponse(new StartPowerDownResponse() { }, container.Token, new TransportResponseConfig() { ErrorCode = ErrorCode.ContinuousResponseAborted, ErrorMessage = "Power down request is not supported via external bridge." });
}
#endregion