aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Stubs Collection/stubs/embParamDownload.cs
diff options
context:
space:
mode:
authorMirta <mirta@twine-s.com>2020-12-30 16:39:52 +0200
committerMirta <mirta@twine-s.com>2020-12-30 16:39:52 +0200
commit00a491d93733d4625ad329b2ba8237f445364b3f (patch)
tree4b24c6fa78d7648f4bb7cefafa464bb0b063fec4 /Software/Stubs Collection/stubs/embParamDownload.cs
parent124ad4150f80c6846fdee41dbbda9848c105f6e5 (diff)
downloadTango-00a491d9.tar.gz
Tango-00a491d9.zip
merge
Diffstat (limited to 'Software/Stubs Collection/stubs/embParamDownload.cs')
-rw-r--r--Software/Stubs Collection/stubs/embParamDownload.cs74
1 files changed, 0 insertions, 74 deletions
diff --git a/Software/Stubs Collection/stubs/embParamDownload.cs b/Software/Stubs Collection/stubs/embParamDownload.cs
deleted file mode 100644
index afdc14c92..000000000
--- a/Software/Stubs Collection/stubs/embParamDownload.cs
+++ /dev/null
@@ -1,74 +0,0 @@
-using System;
-using System.Text;
-using System.Linq;
-using System.Drawing;
-using System.Diagnostics;
-using System.Windows.Forms;
-using System.Threading;
-using System.Threading.Tasks;
-using System.Collections.Generic;
-using Tango.PMR.Stubs;
-using Tango.Stubs;
-using Google.Protobuf;
-using Tango.PMR.EmbeddedParameters;
-using System.IO;
-using Tango.PMR.IO;
-
-
-public void OnExecute(StubManager stubManager)
-{
-
-
-ConfigurationParameters configurationParameters = new ConfigurationParameters();
-
-File.WriteAllBytes("C:/temp/EmbParam.cfg",configurationParameters.ToBytes());
-
-byte[] fileBytes = File.ReadAllBytes("C:/temp/EmbParam.cfg");
-
-
-var config = ConfigurationParameters.Parser.ParseFrom(fileBytes);
-
- stubManager.Write( config);
- Thread.Sleep(1000);
-
-//1. read
-stubManager.Write("\n\n Deleting old file");
-
-stubManager.Write("\n\n Loading new file file");
-
-
-FileDownloadRequest fileDownloadRequest = new FileDownloadRequest();
-fileDownloadRequest.FileName = "SYSINFO//EmbParam.cfg";;
-
-FileDownloadResponse response = stubManager.Run<FileDownloadResponse>(fileDownloadRequest);
-
-
-FileChunkDownloadRequest fileChunkDownloadRequest = new FileChunkDownloadRequest();
-fileChunkDownloadRequest.DownloadID = response.
-fileChunkDownloadRequest.FileName = null;
-fileChunkDownloadRequest.Position = 0;
-
-Thread.Sleep(1000);
-long chunk_size = response2.MaxChunkLength;
-
-FileStream fs = new FileStream("C:/temp/EmbParam.cfg",FileMode.Open);
-
-while (fs.Position < fs.Length)
-{
- stubManager.Write("Position "+ fs.Position+ " Length "+ fs.Length +"\n\n");
- FileChunkUploadRequest fileChunkUploadRequest = new FileChunkUploadRequest();
- fileChunkUploadRequest.UploadID = response2.UploadID;
- byte[] chunk = new byte[Math.Min(chunk_size,fs.Length - fs.Position)];
- fs.Read(chunk,0,chunk.Length);
- fileChunkUploadRequest.Buffer = ByteString.CopyFrom(chunk);
- var response3 = stubManager.Run<FileChunkUploadResponse>(fileChunkUploadRequest);
- Thread.Sleep(2000);
-
-}
-
-/*
-13:46:42.38: Executing script 'embeddedparametersbuild.cs'...
-{ "BreakSensorLimit": 10, "DiagnosticCollectionLimit": 1, "OverHeatCountLimit": 3, "UnderHeatCountLimit": 3, "CloseValveTimeout": 255, "OpenValveTimeout": 255, "InitialDispenserPressure": 1.5, "InitialDispenserTimeout": 60000, "InitialDispenserTimeLag": 100, "DispenserBuildPressureSpeed": 800, "DispenserBuildPressureLimit": 0.9, "DispenserBuildPressureTimeout": 80000, "DispenserBuildPressureLag": 50, "ACHeatersLowerOperationLimit": 995, "ACHeatersUpperOperationLimit": 1005, "DCHeatersLowerOperationLimit": 978, "DCHeatersUpperOperationLimit": 1005, "DispenserPresegmentWFCF": 80, "StartHeatingOnInitSequence": true, "GeneralParameters": [ 1, 1, 1, 1, 800, 1000 ], "CurrentAlarmLowLimit": 0.8, "CurrentAlarmHighLimit": 1.07, "IDSSegmentRefillTimeout": 5000, "IDSPreSegmentBuildupTime": 5000, "IDSCleaningSpeed": 50, "IDSCleaningStopBeforeSegmentTime": 3000, "IDSCleaningStartSprayPreSegmentTime": 1000, "IDSLeftCleaningMotorSpeed": 30, "IDSRightCleaningMotorSpeed": 23, "SwitchToIdleTimeinSeconds": 3600, "IdleDrierTemperature": 80, "IdleHeadTemperature": 80, "PowerOffTemperatureLimit": 50, "IDSPreSegmentWFCFTimeBeforeSegment": 1500 } */
-
-
-} \ No newline at end of file