blob: a0d84558b02c00a8d8cddabfd88438c35f009d5b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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;
}
}
}
}
|