using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Threading; using hdc.blk; namespace QueuedProperties { public class ParallelBLOCK : BLOCK { public ParallelBLOCK() { // Registracion de delegates QPP.RegPCH("PropI", PropIPCH); QPP.RegPCH("PropS", PropSPCH); } public override void BStart() { if (BIsStarted) return; BIsStarted = true; // Arranca el Dispatching QPP.StartDispatching(); } int iii = 0; // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Input Queued Property private int _PropI = -1; // <<<<<<<<<<< public int PropI { set { // Encola el valor QPP.Enqueue("PropI", value); } } // Handler de la Property PropU void PropIPCH(object value) { iii = 0; OutS = "@" + value; } // Input Queued Property private String _PropS = ""; // <<<<<<<<<<< public String PropS { set { // Encola el valor QPP.Enqueue("PropS", value); } } // Handler de la Property PropS void PropSPCH(object value) { iii = 0; OutS = "" + value; } // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Output Property del BLOCK private String _OutS = ""; public String OutS { get { return _OutS; } set { if (_OutS == value) return; _OutS = value; OnPropertyChanged("OutS"); } } //////////////////////////////////////// } }