From 7867b3ac045364fc2aa11a860871bee2bfeb072d Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Sun, 15 Aug 2021 10:27:35 +0300 Subject: Multiple Jobs on one spool. --- .../Tango.Integration/Operation/IMachineOperator.cs | 5 +++++ .../Tango.Integration/Operation/MachineOperator.cs | 13 +++++++++++++ 2 files changed, 18 insertions(+) (limited to 'Software/Visual_Studio/Tango.Integration') diff --git a/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs index ac7bc75c5..23cc4aa48 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs @@ -126,6 +126,11 @@ namespace Tango.Integration.Operation /// TimeSpan ContinuousRequestTimeout { get; set; } + /// + /// Gets a value indicating whether the spool was replaced after the last job. + /// + bool IsSpoolReplaced { get; } + /// /// Occurs when the machine has changed. /// diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs index e15a5a0bd..fb43b55b3 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs @@ -154,6 +154,7 @@ namespace Tango.Integration.Operation EmergencyNotificationProvider = new UsbEmergencyNotificationProvider("COM1"); EnableJobLiquidQuantityValidation = true; FailsWithAdapter = true; + IsSpoolReplaced = true; ContinuousRequestTimeout = TimeSpan.FromSeconds(2); ResetInkFllingStatus(); } @@ -651,6 +652,11 @@ namespace Tango.Integration.Operation /// public TimeSpan ContinuousRequestTimeout { get; set; } + /// + /// Gets a value indicating whether the spool was replaced after the last job. + /// + public bool IsSpoolReplaced { get; private set; } + #endregion #region Virtual Methods @@ -1018,6 +1024,11 @@ namespace Tango.Integration.Operation { OnMachineStateChanged(MachineStatus.State); } + + if (MachineStatus.SpoolState == SpoolState.Absent) + { + IsSpoolReplaced = true; + } } /// @@ -1348,6 +1359,8 @@ namespace Tango.Integration.Operation /// The job. protected virtual void OnPrintingEnded(JobHandler handler, Job job) { + IsSpoolReplaced = false; + LogManager.Log("Raising printing ended event..."); PrintingEnded?.Invoke(this, new PrintingEventArgs(handler, job) -- cgit v1.3.1