public MeasPickerWindow()
 {
     InitializeComponent();
     Config_.Initialize();
     DataFetcher_ = new DataFetcher()
     {
         Config_ = Config_
     };
     RefreshMeasurements();
 }
Exemple #2
0
 public MeasPickerWindow()
 {
     InitializeComponent();
     Config_.Initialize();
     DataFetcher_ = new DataFetcher()
     {
         Config_ = Config_
     };
     PopulateData();
 }
Exemple #3
0
        public static void Main2(string[] args)
        {
            var cur       = Config_.Cursor();
            var buff      = new byte[512];
            int bytes_out = 0;
            var Communication_instance = new  Communication_demo();

            Communication_instance.on_DeviceVersion    += (ch, pack) => onDeviceVersion(pack);
            Communication_instance.on_BusConfiguration += (ch, pack) => onBusConfiguration(pack);
            Communication_instance.on_InstructionsPack += (ch, pack) => onInstructionsPack(pack);
            Communication_instance.on_DeviceError      += (ch, pack) => onDeviceError(pack);
            Communication_instance.on_SensorsData      += (ch, pack) => onSensorsData(pack);
            if (!Communication_instance.sendStop())
            {
                throw new SystemException("error AD_HOC_FAILURE_SENDING_QUEUE_OVERFLOW");
            }
            if (!Communication_instance.sendStart())
            {
                throw new SystemException("error AD_HOC_FAILURE_SENDING_QUEUE_OVERFLOW");
            }
            if (!Communication_instance.sendGetDeviceVersion())
            {
                throw new SystemException("error AD_HOC_FAILURE_SENDING_QUEUE_OVERFLOW");
            }
            if (!Communication_instance.sendGetConfiguration())
            {
                throw new SystemException("error AD_HOC_FAILURE_SENDING_QUEUE_OVERFLOW");
            }
            if (!Communication_instance.sendSetConfiguration())
            {
                throw new SystemException("error AD_HOC_FAILURE_SENDING_QUEUE_OVERFLOW");
            }
            {
                var p6 = Communication.NEW.BusConfiguration(cur);
                fill(p6);
                if (!Communication_instance.send(p6))    //put pack into the channel send-buffer
                {
                    throw new SystemException("error AD_HOC_FAILURE_SENDING_QUEUE_OVERFLOW");
                }
            }
            {
                var p7 = Communication.NEW.InstructionsPack(cur);
                fill(p7);
                if (!Communication_instance.send(p7))    //put pack into the channel send-buffer
                {
                    throw new SystemException("error AD_HOC_FAILURE_SENDING_QUEUE_OVERFLOW");
                }
            }
            bytes_out = Communication_instance.Read(buff, 0, buff.Length); // sending packs
            Communication_instance.Write(buff, 0, buff.Length);            // receiving packs
        }