aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs')
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs31
1 files changed, 30 insertions, 1 deletions
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
index 777f0b199..049d78d9c 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
@@ -88,6 +88,7 @@ namespace Tango.Integration.Operation
private DateTime? _jobActualStartDate;
private List<Event> _emulatedEvents;
private List<BitResultComposition> _bitResults;
+ private JobSpoolType _currentSpoolType;
public static String EmbeddedLogsFolder { get; private set; }
public static String EmbeddedLogsTag { get; private set; }
@@ -1480,7 +1481,8 @@ namespace Tango.Integration.Operation
ConnectRequest request = new ConnectRequest()
{
Password = "1234",
- UnixTime = DateTimeOffset.UtcNow.ToUnixTimeSeconds()
+ UnixTime = DateTimeOffset.UtcNow.ToUnixTimeSeconds(),
+ SpoolType = _currentSpoolType
};
try
@@ -4426,6 +4428,33 @@ namespace Tango.Integration.Operation
return _bitResults;
}
+ /// <summary>
+ /// Notifies the remote machine about spool type change.
+ /// If the machine is not connected the spool type will be added to the connection request.
+ /// </summary>
+ /// <param name="spoolType">Type of the spool.</param>
+ public async Task SetSpoolType(JobSpoolType spoolType)
+ {
+ _currentSpoolType = spoolType;
+
+ LogManager.Log($"Spool type changed to: '{spoolType}'.");
+
+ if (IsConnected)
+ {
+ try
+ {
+ await SendRequest<SpoolTypeChangedRequest, SpoolTypeChangedResponse>(new SpoolTypeChangedRequest()
+ {
+ SpoolType = spoolType
+ });
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "Error changing the spool type on the machine.");
+ }
+ }
+ }
+
#endregion
}
}