diff options
| author | Roy <roy.mail.net@gmail.com> | 2018-01-02 23:06:26 +0200 |
|---|---|---|
| committer | Roy <roy.mail.net@gmail.com> | 2018-01-02 23:06:26 +0200 |
| commit | 06071e5417fb3353702fd4c4c3da5b8fa7caa804 (patch) | |
| tree | 85dad724eff2f14e55007dfdc52c83bd5322206b /Software/Visual_Studio/Tango.Stubs | |
| parent | 0ab7e3d35c01eaaa6ebf03225971909bea365597 (diff) | |
| download | Tango-06071e5417fb3353702fd4c4c3da5b8fa7caa804.tar.gz Tango-06071e5417fb3353702fd4c4c3da5b8fa7caa804.zip | |
Allegedly improved USB adapter on C# on PREPEND_HEADER mode. (tested !)
Diffstat (limited to 'Software/Visual_Studio/Tango.Stubs')
| -rw-r--r-- | Software/Visual_Studio/Tango.Stubs/Stubs/BigData.cs | 47 | ||||
| -rw-r--r-- | Software/Visual_Studio/Tango.Stubs/Tango.Stubs.csproj | 1 |
2 files changed, 48 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.Stubs/Stubs/BigData.cs b/Software/Visual_Studio/Tango.Stubs/Stubs/BigData.cs new file mode 100644 index 000000000..a0d84558b --- /dev/null +++ b/Software/Visual_Studio/Tango.Stubs/Stubs/BigData.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Core; +using Tango.Logging; +using Tango.PMR; +using Tango.PMR.Integration; +using Tango.PMR.Stubs; +using Tango.Transport; + +namespace Tango.Stubs.Stubs +{ + [Stub("Big Data", "Sends a lot of bytes.", StubDirection.Both)] + public class BigData : StubBase + { + public BigData(ITransporter transporter) : base(transporter) + { + } + + [ParameterItem(Minimum = null, Maximum = null)] + public double NumberA { get; set; } + + [ParameterItem(Minimum = null, Maximum = null)] + public double NumberB { get; set; } + + protected async override Task<string> OnRun(Action<String> multiResponseCallback) + { + try + { + var response = await Transporter.SendRequest<DirectSynchronizationRequest, DirectSynchronizationResponse>( + new DirectSynchronizationRequest() + { + + } + ); + + return response.Message.LocalDB.Length.ToString(); + } + catch (Exception ex) + { + return ex.Message; + } + } + } +} diff --git a/Software/Visual_Studio/Tango.Stubs/Tango.Stubs.csproj b/Software/Visual_Studio/Tango.Stubs/Tango.Stubs.csproj index 541119a44..c21f1d40a 100644 --- a/Software/Visual_Studio/Tango.Stubs/Tango.Stubs.csproj +++ b/Software/Visual_Studio/Tango.Stubs/Tango.Stubs.csproj @@ -68,6 +68,7 @@ <Compile Include="IStub.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="StubDirection.cs" /> + <Compile Include="Stubs\BigData.cs" /> <Compile Include="Stubs\Progress.cs" /> <Compile Include="Stubs\Calculate.cs" /> <Compile Include="StubAttribute.cs" /> |
