diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2020-09-12 22:03:13 +0300 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2020-09-12 22:03:13 +0300 |
| commit | 82fbd8fc872285637aaec64e1daa0da938d7d34e (patch) | |
| tree | 863439aaa5e8f288a92ab6698b11e1c96790bc81 /Software | |
| parent | 67954a38c95eb7e8cb8fde579e6b8583a17920cc (diff) | |
| download | Tango-82fbd8fc872285637aaec64e1daa0da938d7d34e.tar.gz Tango-82fbd8fc872285637aaec64e1daa0da938d7d34e.zip | |
add parameters to progress stub
Diffstat (limited to 'Software')
| -rw-r--r-- | Software/PMR/Messages/Stubs/ProgressRequest.proto | 3 | ||||
| -rw-r--r-- | Software/PMR/Messages/Stubs/ProgressResponse.proto | 1 | ||||
| -rw-r--r-- | Software/Stubs Collection/stubs/arm test.cs | 43 |
3 files changed, 47 insertions, 0 deletions
diff --git a/Software/PMR/Messages/Stubs/ProgressRequest.proto b/Software/PMR/Messages/Stubs/ProgressRequest.proto index 7ba54710b..add15a9d0 100644 --- a/Software/PMR/Messages/Stubs/ProgressRequest.proto +++ b/Software/PMR/Messages/Stubs/ProgressRequest.proto @@ -7,4 +7,7 @@ message ProgressRequest { int32 Amount = 1; int32 Delay = 2; + uint32 Param1 = 3; + uint32 Param2 = 4; + uint32 Param3 = 5; }
\ No newline at end of file diff --git a/Software/PMR/Messages/Stubs/ProgressResponse.proto b/Software/PMR/Messages/Stubs/ProgressResponse.proto index 554ab65f6..f5bf0b462 100644 --- a/Software/PMR/Messages/Stubs/ProgressResponse.proto +++ b/Software/PMR/Messages/Stubs/ProgressResponse.proto @@ -6,4 +6,5 @@ option java_package = "com.twine.tango.pmr.stubs"; message ProgressResponse { double Progress = 1; + uint32 Info = 2; }
\ 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..3c9b1d2ff --- /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<= 10; i++) + { + progressRequest.Amount = 0xB11; + progressRequest.Delay = 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 = 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 |
