aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/ExternalBridgeViewVM.cs
blob: f0b6bbfdf3d564f56afab6abde4fcd5a6f24fe39 (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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.Core.DI;
using Tango.PPC.Common;
using Tango.PPC.Common.ExternalBridge;

namespace Tango.PPC.UI.ViewModels
{
    public class ExternalBridgeViewVM : PPCViewModel
    {
        /// <summary>
        /// Gets or sets the external bridge service.
        /// </summary>
        [TangoInject]
        public IPPCExternalBridgeService ExternalBridgeService { get; set; }

        public override void OnApplicationStarted()
        {
            //throw new NotImplementedException();
        }
    }
}
s="cm"> if (response.Sum == 15) { stubManager.WriteLine("OK!"); } } */ // Request ---- // Double : DryerZone1Temp // Double : DryerZone2Temp // RepeatedField`1 : HardwarePidControl // RepeatedField`1 : ProcessParameters // Response ---- // UInt32 : HeaterGroupId // UInt32 : Zone1Temp // UInt32 : Zone2Temp // Boolean : Heater1Active // Boolean : Heater2Active // UInt32 : Heater1Percentage // UInt32 : Heater2Percentage HardwarePidControl Pid1 = new HardwarePidControl(); HardwarePidControl Pid2 = new HardwarePidControl(); //Pid1.has_hardwarepidcontroltype = true; Pid1.HardwarePidControlType = (HardwarePidControlType)0; // Pid1.has_outputproportionalpowerlimit = true; Pid1.OutputProportionalPowerLimit = 50; // Pid1.has_outputproportionalband = true; Pid1.OutputProportionalBand = 3; // Pid1.has_kp = true; Pid1.Kp = 2.0; //Pid1.has_ki = true; Pid1.Ki = 0.01; //Pid2.has_hardwarepidcontroltype = true; Pid2.HardwarePidControlType = (HardwarePidControlType)1; // Pid2.has_outputproportionalpowerlimit = true; Pid2.OutputProportionalPowerLimit = 40; // Pid2.has_outputproportionalband = true; Pid2.OutputProportionalBand = 3; // Pid2.has_kp = true; Pid2.Kp = 0.5; //Pid2.has_ki = true; Pid2.Ki = 0.1; var response = stubManager.Run<StubHeatingTestResponse>("StubHeatingTestRequest" ,200.0, 200.0, Pid1, Pid2); while (true) { // Request ---- // Response ---- // UInt32 : HeaterGroupId // UInt32 : Zone1Temp // UInt32 : Zone2Temp // Boolean : Heater1Active // Boolean : Heater2Active // UInt32 : Heater1Percentage // UInt32 : Heater2Percentage var response1 = stubManager.Run<StubHeatingTestPollResponse>("StubHeatingTestPollRequest" ,0); Thread.Sleep(100); } }