aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Stubs Collection/Procedures/WHS loopp control.txt
blob: 3638af2a58f6d6ad2ab39e2138651c2b7b8731f0 (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
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Google.Protobuf;
using Tango.BL.Enumerations;
using Tango.PMR.Stubs;
using Tango.PMR.Diagnostics;
using Tango.FSE.Common.Diagnostics;
using Tango.FSE.Procedures;

public class Program
{
    public void OnExecute(IProcedureContext context)
    {

		int ControlLoopEnable = context.GetInput<int>("WasteControlLoop");
		
		ProgressRequest progressRequest = new ProgressRequest();
		progressRequest.Amount = 0x3e8;
		progressRequest.Delay = ControlLoopEnable*0x1000+2700;

		var response = context.Send<ProgressResponse>(progressRequest);
        context.AddResult(ResultType.Passed, "Success", response.Progress);

    }
}