aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Core/IParameterized.cs
blob: 776a7f9264c1ae073e38611f1dc11747c3ac5c39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;

namespace Tango.Core
{
    /// <summary>
    /// Represents a component that exposes some of it's properties as an observable collection of <see cref="ParameterItem"/> which can be bound to UI controls.
    /// </summary>
    public interface IParameterized
    {
        /// <summary>
        /// Gets a bind-able observable collection of the component properties.
        /// </summary>
        [ParameterIgnore]
        [XmlIgnore]
        ReadOnlyObservableCollection<ParameterItem> Parameters { get; }
    }
}
pan>; 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.UI; public void OnExecute(StubManager stubManager) { // Request ---- // UInt32 : Address // UInt32 : Value // Response ---- // String : Status // UInt32 : StatusWord //stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,0x60000400 | 0x0E2, 0xFFFF); // turn ON all the heaters /* int Zone = 4; const Int32 SSR = 5; const Int32 SSR_REG = 0x40; int PT100 = 4; */ //---------------------------------- ///* int Zone = 3; const Int32 SSR = 6; const Int32 SSR_REG = 0x20; const Int32 PT100 = 3; //*/ //---------------------------------- /* int Zone = 2; const Int32 SSR = 7; const Int32 SSR_REG = 0x10; const Int32 PT100 = 2; */ //------------------------------------- /* int Zone = 1; const Int32 SSR = 8; const Int32 SSR_REG = 0x08; const Int32 PT100 = 1; */ //------------------------------------- //stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,0x60000400 | 0x0E2, SSR_REG); // turn ON the heater for (int i = 0; i < 15; i++) { //stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,1); //measer the teperature //stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,2); //measer the teperature //stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,3); //measer the teperature //stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,4); //measer the teperature //stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,5); //measer the teperature // Request ---- // UInt32 : STempSensorID // Response ---- // UInt32 : TempSensorID // UInt32 : TemperatureCMultBy100 var response = stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,PT100); //measer the teperature stubManager.Write(response.TemperatureCMultBy100); stubManager.Write("\n\n"); Thread.Sleep(1500); //stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,PT100_1); //measer the teperature //Thread.Sleep(1500); } stubManager.Run<StubFpgaWriteRegResponse>("StubFpgaWriteRegRequest" ,0x60000400 | 0x0E2, 0x0000); // turn OFF all the heaters /* for (int i = 0; i < 100; i++) { stubManager.Run<StubTempSensorResponse>("StubTempSensorRequest" ,PT100);//measer the teperature Thread.Sleep(1500); } */ }