Exemple #1
0
                public bool Delete(SensorDesignatorEnum Designator)
                {
                    if (!_sensors.ContainsKey(Designator))
                    {
                        return(false);
                    }

                    _sensors.Remove(Designator);
                    return(true);
                }
Exemple #2
0
                public bool GetReading(TriggerTypeEnum TriggerType, SensorDesignatorEnum Designator, out double Reading)
                {
                    Reading = 999999;

                    if (!_sensors.ContainsKey(Designator))
                    {
                        return(false);
                    }

                    return(GetReading(TriggerType, this[Designator], out Reading));
                }
Exemple #3
0
                // Indexer
                public SensorClass this[SensorDesignatorEnum Designator]
                {
                    get
                    {
                        if (!_sensors.ContainsKey(Designator))
                        {
                            throw new System.ArgumentException("Sensor doesn't exist", "Designator");
                        }

                        return(_sensors[Designator]);
                    }
                }
Exemple #4
0
                // Public Methods
                public bool Add(SensorDesignatorEnum Designator, SensorTypeEnum SensorType)
                {
                    if (_sensors.ContainsKey(Designator))
                    {
                        return(false);
                    }

                    switch (SensorType)
                    {
                    case SensorTypeEnum.Peak_80350A:
                        _sensors.Add(Designator, new PeakSensor80350AClass(_parentGigatronics854x, Designator, SensorTypeEnum.Peak_80350A));
                        break;

                    case SensorTypeEnum.Regular:
                        _sensors.Add(Designator, new SensorClass(_parentGigatronics854x, Designator, SensorTypeEnum.Regular));
                        break;
                    }

                    return(true);
                }
Exemple #5
0
                // Constructor
                internal SensorClass(Gigatronics854x ParentGigatronics854x, SensorDesignatorEnum Designator, SensorTypeEnum Type)
                {
                    _parentGigatronics854x = ParentGigatronics854x;
                    this.Designator        = Designator;
                    this.Type = Type;
                    Averaging = new AveragingClass(this);
                    Offset    = new OffsetClass(this);

                    switch (this.Designator)
                    {
                    case SensorDesignatorEnum.A:
                        _charDesignator = 'A';
                        break;

                    case SensorDesignatorEnum.B:
                        _charDesignator = 'B';
                        break;

                    default:
                        _charDesignator = 'A';
                        break;
                    }
                }
Exemple #6
0
 // Constructor
 internal PeakSensor80350AClass(Gigatronics854x ParentGigatronics854x, SensorDesignatorEnum Designator, SensorTypeEnum Type)
     : base(ParentGigatronics854x, Designator, Type)
 {
 }