aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Integration
diff options
context:
space:
mode:
authorRoy <Roy.mail.net@gmail.com>2022-11-13 03:46:12 +0200
committerRoy <Roy.mail.net@gmail.com>2022-11-13 03:46:12 +0200
commitd38bf750367c6d6cdda3a6a3efbdf3552aa85358 (patch)
tree000818a2a1e49d1e3decc630a94cf183bbaf2128 /Software/Visual_Studio/Tango.Integration
parent8431040bf909ba65d5ce242b5fd2cc91005ba679 (diff)
downloadTango-d38bf750367c6d6cdda3a6a3efbdf3552aa85358.tar.gz
Tango-d38bf750367c6d6cdda3a6a3efbdf3552aa85358.zip
FSE Stats Module.
Extended job run structure. CSV export.
Diffstat (limited to 'Software/Visual_Studio/Tango.Integration')
-rw-r--r--Software/Visual_Studio/Tango.Integration/JobRuns/BasicJobRunsLogger.cs8
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs17
2 files changed, 18 insertions, 7 deletions
diff --git a/Software/Visual_Studio/Tango.Integration/JobRuns/BasicJobRunsLogger.cs b/Software/Visual_Studio/Tango.Integration/JobRuns/BasicJobRunsLogger.cs
index 8c3822278..60b2efa9b 100644
--- a/Software/Visual_Studio/Tango.Integration/JobRuns/BasicJobRunsLogger.cs
+++ b/Software/Visual_Studio/Tango.Integration/JobRuns/BasicJobRunsLogger.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using Tango.BL;
@@ -117,7 +118,12 @@ namespace Tango.Integration.JobRuns
run.LiquidQuantities = e.LiquidQuantities;
run.IsGradient = _job.Segments.Any(x => x.BrushStops.Count > 1);
run.GradientResolutionCm = MachineOperator.GradientGenerationConfiguration.ResolutionCM;
- run.JobString = _job.ToJobFileWhenLoaded().ToString();
+ run.JobString = e.Job.ToJobFileWhenLoaded().ToString();
+
+ run.ApplicationVersion = Assembly.GetEntryAssembly().GetName().Version.ToString();
+ run.FirmwareVersion = MachineOperator.DeviceInformation?.Version;
+ run.CeVersion = _job.Rml.ColorConversionVersion.ToString();
+ run.ProcessParametersTableGuid = MachineOperator.CurrentProcessParameters?.Guid;
//Set individual liquid quantities
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
index 7ee390aff..997ac4b13 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
@@ -2746,6 +2746,11 @@ namespace Tango.Integration.Operation
JobRequest request = new JobRequest();
+ var jobForJobRun = job.Clone();
+ jobForJobRun.Guid = job.Guid;
+ jobForJobRun.Name = job.Name;
+ jobForJobRun.ID = job.ID;
+
int max = job.OrderedSegmentsWithGroups.Last().SegmentIndex + 1;
for (int i = 0; i < job.NumberOfUnits - 1; i++)
@@ -2845,7 +2850,7 @@ namespace Tango.Integration.Operation
await fileUploadHandler.Cancel();
fileUploadHandler = null;
LogManager.Log("Job upload canceled.");
- OnPrintingAborted(handler, clonedJob);
+ OnPrintingAborted(handler, jobForJobRun);
handler.RaiseCanceled();
if (Status != MachineStatuses.Disconnected)
{
@@ -2860,7 +2865,7 @@ namespace Tango.Integration.Operation
}
SaveLastJobLiquidQuantities(clonedJob, originalJob.Machine.Configuration, processParameters, handler);
- OnPrintingAborted(handler, clonedJob);
+ OnPrintingAborted(handler, jobForJobRun);
handler.RaiseCanceled();
if (Status != MachineStatuses.Disconnected)
{
@@ -3051,7 +3056,7 @@ namespace Tango.Integration.Operation
LogManager.Log(ex, "Error sending job preparation request. Aborting job...");
UseKeepAlive = oldKeepAlive;
UpdateStatus(MachineStatuses.ReadyToDye);
- OnPrintingFailed(handler, clonedJob, ex);
+ OnPrintingFailed(handler, jobForJobRun, ex);
handler.RaiseFailed(ex);
return;
}
@@ -3173,7 +3178,7 @@ namespace Tango.Integration.Operation
{
UseKeepAlive = oldKeepAlive;
UpdateStatus(MachineStatuses.ReadyToDye);
- OnPrintingFailed(handler, clonedJob, ex);
+ OnPrintingFailed(handler, jobForJobRun, ex);
handler.RaiseFailed(ex);
return;
}
@@ -3278,7 +3283,7 @@ namespace Tango.Integration.Operation
finalException = new ContinuousResponseAbortedException($"Job aborted by the embedded device ({continuousException.Container.ErrorMessage}).");
}
- OnPrintingFailed(handler, originalJob, finalException);
+ OnPrintingFailed(handler, jobForJobRun, finalException);
handler.RaiseFailed(finalException);
}
}
@@ -3292,7 +3297,7 @@ namespace Tango.Integration.Operation
UpdateStatus(MachineStatuses.ReadyToDye);
SaveLastJobLiquidQuantities(clonedJob, originalJob.Machine.Configuration, processParameters, handler);
- OnPrintingCompleted(handler, clonedJob);
+ OnPrintingCompleted(handler, jobForJobRun);
handler.RaiseCompleted();
}
});