Пример #1
0
        private void Analog_ValueChanged(object sender, AnalogValueChangedEventArgs e)
        {
            IAnalog analog = sender as IAnalog;

            foreach (AnalogTuple at in Analogs)
            {
                if (at.Hardware.Name == analog.Name)
                {
                    at.Data.RawValue = analog.RawValue;
                    at.Data.Value    = analog.Value;
                    dataServer.PutAnalog(at.Data);
                }
            }
            string s = string.Format("Analog '{0}' {1} {2}", analog.Name, e.Value, analog.Units);

            log.Debug(s);
            CreateEvent(EventTypes.IO, s);
            //dataServer.PutAnalog(analog.Data);
        }
Пример #2
0
 private void Pin_AnalogValueChanged(object sender, AnalogValueChangedEventArgs e)
 {
     ProgressValue = e.NewValue;
     PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("ProgressValue"));
 }