aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Stubs Collection
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2020-09-15 09:46:12 +0300
committerAvi Levkovich <avi@twine-s.com>2020-09-15 09:46:12 +0300
commitb0d3ccdbb8cd825c32a1f616223c9c391e0d1e14 (patch)
tree11ed48b45b15191f8985b8e9696b1808e218f7eb /Software/Stubs Collection
parent3218bd4b12197f5b27147788221f738254dec41f (diff)
parentc502b0a93c9a5365bbdd834e027e02446b3b4210 (diff)
downloadTango-b0d3ccdbb8cd825c32a1f616223c9c391e0d1e14.tar.gz
Tango-b0d3ccdbb8cd825c32a1f616223c9c391e0d1e14.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Stubs Collection')
-rw-r--r--Software/Stubs Collection/stubs/ERRFILE.TXT0
-rw-r--r--Software/Stubs Collection/stubs/Read Dispensers Serial Num.cs27
-rw-r--r--Software/Stubs Collection/stubs/arm test.cs43
3 files changed, 70 insertions, 0 deletions
diff --git a/Software/Stubs Collection/stubs/ERRFILE.TXT b/Software/Stubs Collection/stubs/ERRFILE.TXT
deleted file mode 100644
index e69de29bb..000000000
--- a/Software/Stubs Collection/stubs/ERRFILE.TXT
+++ /dev/null
diff --git a/Software/Stubs Collection/stubs/Read Dispensers Serial Num.cs b/Software/Stubs Collection/stubs/Read Dispensers Serial Num.cs
new file mode 100644
index 000000000..934371725
--- /dev/null
+++ b/Software/Stubs Collection/stubs/Read Dispensers Serial Num.cs
@@ -0,0 +1,27 @@
+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;
+
+public void OnExecute(StubManager stubManager)
+{
+ uint i;
+ string serialnum;
+
+ StubDispenserEEpromRequest dispenserEEpromRequest = new StubDispenserEEpromRequest();
+ for (i = 0; i<8;i++)
+ {
+ dispenserEEpromRequest.DispenserId = i;
+ dispenserEEpromRequest.BurnRequest = false;
+ var response = stubManager.Run<StubDispenserEEpromResponse>(dispenserEEpromRequest);
+ stubManager.Write("Dispenser Serial # read \t"+ (i+1) + " serial number "+ response.DispenserEEprom.DispenserSN +"\n");
+ }
+
+} \ No newline at end of file
diff --git a/Software/Stubs Collection/stubs/arm test.cs b/Software/Stubs Collection/stubs/arm test.cs
new file mode 100644
index 000000000..ca1ff1771
--- /dev/null
+++ b/Software/Stubs Collection/stubs/arm test.cs
@@ -0,0 +1,43 @@
+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;
+
+public void OnExecute(StubManager stubManager)
+{
+int i;
+ProgressRequest progressRequest = new ProgressRequest();
+
+ for (i = 1;i<= 12; i++)
+ {
+ progressRequest.Amount = 0xB11;
+ progressRequest.Delay = 7680+0;
+ var response = stubManager.Run<ProgressResponse>(progressRequest);
+ Thread.Sleep(12000);
+ progressRequest.Amount = 0xB12;
+ response = stubManager.Run<ProgressResponse>(progressRequest);
+ Thread.Sleep(1000);
+ stubManager.Write("Arm Test \t"+ i + " direction 0 progress "+ response.Progress +"\n");
+
+ }
+
+ for (i = 1;i<= 10; i++)
+ {
+ progressRequest.Amount = 0xB11;
+ progressRequest.Delay = 7680+1;
+ var response = stubManager.Run<ProgressResponse>(progressRequest);
+ Thread.Sleep(12000);
+ progressRequest.Amount = 0xB12;
+ response = stubManager.Run<ProgressResponse>(progressRequest);
+ stubManager.Write("Arm Test \t"+ i + " direction 1 progress "+ response.Progress +"\n");
+
+ Thread.Sleep(1000);
+ }
+} \ No newline at end of file