Пример #1
0
        public void Init(ConsultSensor sens)
        {
            _queue = new Queue<float>(50);
            _flag = new AutoResetEvent(false);
            _sens = sens;

            InitDefaults();

            this.ScaleDescription = sens.ConvFunc(1).Scale;

            MaximumF = ScaleDescription.Max;
            MinimumF = ScaleDescription.Min;

            this.Text = _sens._name;
            this.CustomUnitMeasure = ScaleDescription.Scale;

            _sens.NewDataFloat += new ConsultSensor.SensorNewDataFloatEven(NewDataUpdate);

            _workThread = new Thread(new ThreadStart(this.WorkFunction));
            _workThread.Name = "ColorBarThreadSensor:'" + sens._name + "'";
            _workThread.Priority = ThreadPriority.BelowNormal;
            _workThread.Start();
        }
Пример #2
0
 public SensorValue(bool value, ScaleDescription scale)
 {
     this.Value       = value;
     this.Scale       = scale;
     this.TypeOfValue = typeof(bool);
 }
Пример #3
0
 public SensorValue(bool value, ScaleDescription scale)
 {
     this.Value = value;
     this.Scale = scale;
     this.TypeOfValue = typeof(bool);
 }
Пример #4
0
        public void Init(ConsultSensor sens)
        {
            _queue = new Queue<float>(50);
            _flag = new AutoResetEvent(false);
            _sens = sens;

            InitDefaultAquaGaugeToConsult();

            this.ScaleDescription = sens.ConvFunc(1).Scale;

            MaxValue = ScaleDescription.Max;
            MinValue = ScaleDescription.Min;

            this.DialText = _sens._name + Environment.NewLine + ScaleDescription.Scale;

            _sens.NewDataFloat += NewDataUpdate;

            _workThread = new Thread(new ThreadStart(this.WorkFunction));
            _workThread.Name = "AquagaugeThreadSensor:[" + sens._name + "]";
            _workThread.Priority = ThreadPriority.BelowNormal;
            _workThread.Start();
        }