aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Converters/UsersRolesToStringConverter.cs
blob: e607b13d5f5fec20c8d5e0d4c774913de923e8fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
using Tango.BL.Entities;
using Tango.MachineStudio.DB.ViewModels;

namespace Tango.MachineStudio.DB.Converters
{
    /// <summary>
    /// Converts user role to string.
    /// </summary>
    /// <seealso cref="System.Windows.Data.IValueConverter" />
    public class UsersRolesToStringConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value == null) return "";

            if (value is IEnumerable<UsersRole>)
            {
                IEnumerable<UsersRole> userRoles = value as IEnumerable<UsersRole>;
                return String.Join(", ", userRoles.Select(x => x.Role.Name));
            }
            else
            {
                IEnumerable<MultiComboVM<Role>> userRoles = value as IEnumerable<MultiComboVM<Role>>;
                return String.Join(", ", userRoles.Where(x => x.IsSelected).Select(x => x.Entity.Name));
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Tango Observables Generator
// 
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. Do not modify!
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Xml.Serialization;
using Newtonsoft.Json;
using System.Linq;
using Tango.DAL.Remote.DB;
using Tango.Core;
using System.ComponentModel;
using Tango.Core.CustomAttributes;

namespace Tango.BL.Entities
{
    [Table("HARDWARE_MOTORS")]
    public abstract class HardwareMotorBase : ObservableEntity<HardwareMotor>
    {

        public event EventHandler<Int32> MinFrequencyChanged;

        public event EventHandler<Int32> MaxFrequencyChanged;

        public event EventHandler<Int32> SetMicroStepChanged;

        public event EventHandler<Int32> MicroStepChanged;

        public event EventHandler<Double> MaxChangeSlopeChanged;

        public event EventHandler<Double> HighLengthMicroSecondChanged;

        public event EventHandler<Boolean> SpeedMasterChanged;

        public event EventHandler<Int32> PulsePerRoundChanged;

        public event EventHandler<Double> PulleyRadiusChanged;

        public event EventHandler<Int32> ConfigWordChanged;

        public event EventHandler<Boolean> DirectionThreadWizeChanged;

        public event EventHandler<Int32> KvalHoldChanged;

        public event EventHandler<Int32> KvalRunChanged;

        public event EventHandler<Int32> KvalAccChanged;

        public event EventHandler<Int32> KvalDecChanged;

        public event EventHandler<Int32> OverCurrentThresholdChanged;

        public event EventHandler<Int32> StallThresholdChanged;

        public event EventHandler<Int32> ThermalCompensationFactorChanged;

        public event EventHandler<Boolean> LowSpeedOptimizationChanged;

        public event EventHandler<Int32> StSlpChanged;

        public event EventHandler<Int32> IntSpdChanged;

        public event EventHandler<Int32> FnSlpAccChanged;

        public event EventHandler<Int32> FnSlpDecChanged;

        public event EventHandler<Int32> FsSpdChanged;

        public event EventHandler<Int32> GateCfg1Changed;

        public event EventHandler<Int32> GateCfg2Changed;

        public event EventHandler<Int32> TValHoldChanged;

        public event EventHandler<Int32> TValRunChanged;

        public event EventHandler<Int32> TValAccChanged;

        public event EventHandler<Int32> TValDecChanged;

        public event EventHandler<Int32> TFastChanged;

        public event EventHandler<Int32> TOnMinChanged;

        public event EventHandler<Int32> TOffMinChanged;

        public event EventHandler<Boolean> ActiveChanged;

        public event EventHandler<HardwareMotorType> HardwareMotorTypeChanged;

        public event EventHandler<HardwareVersion> HardwareVersionChanged;

        protected String _hardwaremotortypeguid;

        /// <summary>
        /// Gets or sets the hardwaremotorbase hardware motor type guid.
        /// </summary>

        [Column("HARDWARE_MOTOR_TYPE_GUID")]
        [ForeignKey("HardwareMotorType")]

        public  String HardwareMotorTypeGuid
        {
            get 
            {
                return _hardwaremotortypeguid; 
            }

            set 
            {
                if (_hardwaremotortypeguid != value)
                {
                    _hardwaremotortypeguid = value;

                }
            }
        }

        protected String _hardwareversionguid;

        /// <summary>
        /// Gets or sets the hardwaremotorbase hardware version guid.
        /// </summary>

        [Column("HARDWARE_VERSION_GUID")]
        [ForeignKey("HardwareVersion")]

        public  String HardwareVersionGuid
        {
            get 
            {
                return _hardwareversionguid; 
            }

            set 
            {
                if (_hardwareversionguid != value)
                {
                    _hardwareversionguid = value;

                }
            }
        }

        protected Int32 _minfrequency;

        /// <summary>
        /// Gets or sets the hardwaremotorbase min frequency.
        /// </summary>

        [Column("MIN_FREQUENCY")]

        public  Int32 MinFrequency
        {
            get 
            {
                return _minfrequency; 
            }

            set 
            {
                if (_minfrequency != value)
                {
                    _minfrequency = value;

                    OnMinFrequencyChanged(value);

                }
            }
        }

        protected Int32 _maxfrequency;

        /// <summary>
        /// Gets or sets the hardwaremotorbase max frequency.
        /// </summary>

        [Column("MAX_FREQUENCY")]

        public  Int32 MaxFrequency
        {
            get 
            {
                return _maxfrequency; 
            }

            set 
            {
                if (_maxfrequency != value)
                {
                    _maxfrequency = value;

                    OnMaxFrequencyChanged(value);

                }
            }
        }

        protected Int32 _setmicrostep;

        /// <summary>
        /// Gets or sets the hardwaremotorbase set micro step.
        /// </summary>

        [Column("SET_MICRO_STEP")]

        public  Int32 SetMicroStep
        {
            get 
            {
                return _setmicrostep; 
            }

            set 
            {
                if (_setmicrostep != value)
                {
                    _setmicrostep = value;

                    OnSetMicroStepChanged(value);

                }
            }
        }

        protected Int32 _microstep;

        /// <summary>
        /// Gets or sets the hardwaremotorbase micro step.
        /// </summary>

        [Column("MICRO_STEP")]

        public  Int32 MicroStep
        {
            get 
            {
                return _microstep; 
            }

            set 
            {
                if (_microstep != value)
                {
                    _microstep = value;

                    OnMicroStepChanged(value);

                }
            }
        }

        protected Double _maxchangeslope;

        /// <summary>
        /// Gets or sets the hardwaremotorbase max change slope.
        /// </summary>

        [Column("MAX_CHANGE_SLOPE")]

        public  Double MaxChangeSlope
        {
            get 
            {
                return _maxchangeslope; 
            }

            set 
            {
                if (_maxchangeslope != value)
                {
                    _maxchangeslope = value;

                    OnMaxChangeSlopeChanged(value);

                }
            }
        }

        protected Double _highlengthmicrosecond;

        /// <summary>
        /// Gets or sets the hardwaremotorbase high length micro second.
        /// </summary>

        [Column("HIGH_LENGTH_MICRO_SECOND")]

        public  Double HighLengthMicroSecond
        {
            get 
            {
                return _highlengthmicrosecond; 
            }

            set 
            {
                if (_highlengthmicrosecond != value)
                {
                    _highlengthmicrosecond = value;

                    OnHighLengthMicroSecondChanged(value);

                }
            }
        }

        protected Boolean _speedmaster;

        /// <summary>
        /// Gets or sets the hardwaremotorbase speed master.
        /// </summary>

        [Column("SPEED_MASTER")]

        public  Boolean SpeedMaster
        {
            get 
            {
                return _speedmaster; 
            }

            set 
            {
                if (_speedmaster != value)
                {
                    _speedmaster = value;

                    OnSpeedMasterChanged(value);

                }
            }
        }

        protected Int32 _pulseperround;

        /// <summary>
        /// Gets or sets the hardwaremotorbase pulse per round.
        /// </summary>

        [Column("PULSE_PER_ROUND")]

        public  Int32 PulsePerRound
        {
            get 
            {
                return _pulseperround; 
            }

            set 
            {
                if (_pulseperround != value)
                {
                    _pulseperround = value;

                    OnPulsePerRoundChanged(value);

                }
            }
        }

        protected Double _pulleyradius;

        /// <summary>
        /// Gets or sets the hardwaremotorbase pulley radius.
        /// </summary>

        [Column("PULLEY_RADIUS")]

        public  Double PulleyRadius
        {
            get 
            {
                return _pulleyradius; 
            }

            set 
            {
                if (_pulleyradius != value)
                {
                    _pulleyradius = value;

                    OnPulleyRadiusChanged(value);

                }
            }
        }

        protected Int32 _configword;

        /// <summary>
        /// Gets or sets the hardwaremotorbase config word.
        /// </summary>

        [Column("CONFIG_WORD")]

        public  Int32 ConfigWord
        {
            get 
            {
                return _configword; 
            }

            set 
            {
                if (_configword != value)
                {
                    _configword = value;

                    OnConfigWordChanged(value);

                }
            }
        }

        protected Boolean _directionthreadwize;

        /// <summary>
        /// Gets or sets the hardwaremotorbase direction thread wize.
        /// </summary>

        [Column("DIRECTION_THREAD_WIZE")]

        public  Boolean DirectionThreadWize
        {
            get 
            {
                return _directionthreadwize; 
            }

            set 
            {
                if (_directionthreadwize != value)
                {
                    _directionthreadwize = value;

                    OnDirectionThreadWizeChanged(value);

                }
            }
        }

        protected Int32 _kvalhold;

        /// <summary>
        /// Gets or sets the hardwaremotorbase kval hold.
        /// </summary>

        [Column("KVAL_HOLD")]

        public  Int32 KvalHold
        {
            get 
            {
                return _kvalhold; 
            }

            set 
            {
                if (_kvalhold != value)
                {
                    _kvalhold = value;

                    OnKvalHoldChanged(value);

                }
            }
        }

        protected Int32 _kvalrun;

        /// <summary>
        /// Gets or sets the hardwaremotorbase kval run.
        /// </summary>

        [Column("KVAL_RUN")]

        public  Int32 KvalRun
        {
            get 
            {
                return _kvalrun; 
            }

            set 
            {
                if (_kvalrun != value)
                {
                    _kvalrun = value;

                    OnKvalRunChanged(value);

                }
            }
        }

        protected Int32 _kvalacc;

        /// <summary>
        /// Gets or sets the hardwaremotorbase kval acc.
        /// </summary>

        [Column("KVAL_ACC")]

        public  Int32 KvalAcc
        {
            get 
            {
                return _kvalacc; 
            }

            set 
            {
                if (_kvalacc != value)
                {
                    _kvalacc = value;

                    OnKvalAccChanged(value);

                }
            }
        }

        protected Int32 _kvaldec;

        /// <summary>
        /// Gets or sets the hardwaremotorbase kval dec.
        /// </summary>

        [Column("KVAL_DEC")]

        public  Int32 KvalDec
        {
            get 
            {
                return _kvaldec; 
            }

            set 
            {
                if (_kvaldec != value)
                {
                    _kvaldec = value;

                    OnKvalDecChanged(value);

                }
            }
        }

        protected Int32 _overcurrentthreshold;

        /// <summary>
        /// Gets or sets the hardwaremotorbase over current threshold.
        /// </summary>

        [Column("OVER_CURRENT_THRESHOLD")]

        public  Int32 OverCurrentThreshold
        {
            get 
            {
                return _overcurrentthreshold; 
            }

            set 
            {
                if (_overcurrentthreshold != value)
                {
                    _overcurrentthreshold = value;

                    OnOverCurrentThresholdChanged(value);

                }
            }
        }

        protected Int32 _stallthreshold;

        /// <summary>
        /// Gets or sets the hardwaremotorbase stall threshold.
        /// </summary>

        [Column("STALL_THRESHOLD")]

        public  Int32 StallThreshold
        {
            get 
            {
                return _stallthreshold; 
            }

            set 
            {
                if (_stallthreshold != value)
                {
                    _stallthreshold = value;

                    OnStallThresholdChanged(value);

                }
            }
        }

        protected Int32 _thermalcompensationfactor;

        /// <summary>
        /// Gets or sets the hardwaremotorbase thermal compensation factor.
        /// </summary>

        [Column("THERMAL_COMPENSATION_FACTOR")]

        public  Int32 ThermalCompensationFactor
        {
            get 
            {
                return _thermalcompensationfactor; 
            }

            set 
            {
                if (_thermalcompensationfactor != value)
                {
                    _thermalcompensationfactor = value;

                    OnThermalCompensationFactorChanged(value);

                }
            }
        }

        protected Boolean _lowspeedoptimization;

        /// <summary>
        /// Gets or sets the hardwaremotorbase low speed optimization.
        /// </summary>

        [Column("LOW_SPEED_OPTIMIZATION")]

        public  Boolean LowSpeedOptimization
        {
            get 
            {
                return _lowspeedoptimization; 
            }

            set 
            {
                if (_lowspeedoptimization != value)
                {
                    _lowspeedoptimization = value;

                    OnLowSpeedOptimizationChanged(value);

                }
            }
        }

        protected Int32 _stslp;

        /// <summary>
        /// Gets or sets the hardwaremotorbase st slp.
        /// </summary>

        [Column("ST_SLP")]

        public  Int32 StSlp
        {
            get 
            {
                return _stslp; 
            }

            set 
            {
                if (_stslp != value)
                {
                    _stslp = value;

                    OnStSlpChanged(value);

                }
            }
        }

        protected Int32 _intspd;

        /// <summary>
        /// Gets or sets the hardwaremotorbase int spd.
        /// </summary>

        [Column("INT_SPD")]

        public  Int32 IntSpd
        {
            get 
            {
                return _intspd; 
            }

            set 
            {
                if (_intspd != value)
                {
                    _intspd = value;

                    OnIntSpdChanged(value);

                }
            }
        }

        protected Int32 _fnslpacc;

        /// <summary>
        /// Gets or sets the hardwaremotorbase fn slp acc.
        /// </summary>

        [Column("FN_SLP_ACC")]

        public  Int32 FnSlpAcc
        {
            get 
            {
                return _fnslpacc; 
            }

            set 
            {
                if (_fnslpacc != value)
                {
                    _fnslpacc = value;

                    OnFnSlpAccChanged(value);

                }
            }
        }

        protected Int32 _fnslpdec;

        /// <summary>
        /// Gets or sets the hardwaremotorbase fn slp dec.
        /// </summary>

        [Column("FN_SLP_DEC")]

        public  Int32 FnSlpDec
        {
            get 
            {
                return _fnslpdec; 
            }

            set 
            {
                if (_fnslpdec != value)
                {
                    _fnslpdec = value;

                    OnFnSlpDecChanged(value);

                }
            }
        }

        protected Int32 _fsspd;

        /// <summary>
        /// The speed in which the motor moves to full step operation.
        /// </summary>

        [Column("FS_SPD")]

        public  Int32 FsSpd
        {
            get 
            {
                return _fsspd; 
            }

            set 
            {
                if (_fsspd != value)
                {
                    _fsspd = value;

                    OnFsSpdChanged(value);

                }
            }
        }

        protected Int32 _gatecfg1;

        /// <summary>
        /// Gets or sets the hardwaremotorbase gate cfg 1.
        /// </summary>

        [Column("GATE_CFG_1")]

        public  Int32 GateCfg1
        {
            get 
            {
                return _gatecfg1; 
            }

            set 
            {
                if (_gatecfg1 != value)
                {
                    _gatecfg1 = value;

                    OnGateCfg1Changed(value);

                }
            }
        }

        protected Int32 _gatecfg2;

        /// <summary>
        /// Gets or sets the hardwaremotorbase gate cfg 2.
        /// </summary>

        [Column("GATE_CFG_2")]

        public  Int32 GateCfg2
        {
            get 
            {
                return _gatecfg2; 
            }

            set 
            {
                if (_gatecfg2 != value)
                {
                    _gatecfg2 = value;

                    OnGateCfg2Changed(value);

                }
            }
        }

        protected Int32 _tvalhold;

        /// <summary>
        /// Gets or sets the hardwaremotorbase t val hold.
        /// </summary>

        [Column("T_VAL_HOLD")]

        public  Int32 TValHold
        {
            get 
            {
                return _tvalhold; 
            }

            set 
            {
                if (_tvalhold != value)
                {
                    _tvalhold = value;

                    OnTValHoldChanged(value);

                }
            }
        }

        protected Int32 _tvalrun;

        /// <summary>
        /// Gets or sets the hardwaremotorbase t val run.
        /// </summary>

        [Column("T_VAL_RUN")]

        public  Int32 TValRun
        {
            get 
            {
                return _tvalrun; 
            }

            set 
            {
                if (_tvalrun != value)
                {
                    _tvalrun = value;

                    OnTValRunChanged(value);

                }
            }
        }

        protected Int32 _tvalacc;

        /// <summary>
        /// Gets or sets the hardwaremotorbase t val acc.
        /// </summary>

        [Column("T_VAL_ACC")]

        public  Int32 TValAcc
        {
            get 
            {
                return _tvalacc; 
            }

            set 
            {
                if (_tvalacc != value)
                {
                    _tvalacc = value;

                    OnTValAccChanged(value);

                }
            }
        }

        protected Int32 _tvaldec;

        /// <summary>
        /// Gets or sets the hardwaremotorbase t val dec.
        /// </summary>

        [Column("T_VAL_DEC")]

        public  Int32 TValDec
        {
            get 
            {
                return _tvaldec; 
            }

            set 
            {
                if (_tvaldec != value)
                {
                    _tvaldec = value;

                    OnTValDecChanged(value);

                }
            }
        }

        protected Int32 _tfast;

        /// <summary>
        /// Gets or sets the hardwaremotorbase t fast.
        /// </summary>

        [Column("T_FAST")]

        public  Int32 TFast
        {
            get 
            {
                return _tfast; 
            }

            set 
            {
                if (_tfast != value)
                {
                    _tfast = value;

                    OnTFastChanged(value);

                }
            }
        }

        protected Int32 _tonmin;

        /// <summary>
        /// Gets or sets the hardwaremotorbase t on min.
        /// </summary>

        [Column("T_ON_MIN")]

        public  Int32 TOnMin
        {
            get 
            {
                return _tonmin; 
            }

            set 
            {
                if (_tonmin != value)
                {
                    _tonmin = value;

                    OnTOnMinChanged(value);

                }
            }
        }

        protected Int32 _toffmin;

        /// <summary>
        /// Gets or sets the hardwaremotorbase t off min.
        /// </summary>

        [Column("T_OFF_MIN")]

        public  Int32 TOffMin
        {
            get 
            {
                return _toffmin; 
            }

            set 
            {
                if (_toffmin != value)
                {
                    _toffmin = value;

                    OnTOffMinChanged(value);

                }
            }
        }

        protected Boolean _active;

        /// <summary>
        /// Gets or sets the hardwaremotorbase active.
        /// </summary>

        [Column("ACTIVE")]

        public  Boolean Active
        {
            get 
            {
                return _active; 
            }

            set 
            {
                if (_active != value)
                {
                    _active = value;

                    OnActiveChanged(value);

                }
            }
        }

        protected HardwareMotorType _hardwaremotortype;

        /// <summary>
        /// Gets or sets the hardwaremotorbase hardware motor types.
        /// </summary>

        [XmlIgnore]
        [JsonIgnore]
        public virtual HardwareMotorType HardwareMotorType
        {
            get 
            {
                return _hardwaremotortype; 
            }

            set 
            {
                if (_hardwaremotortype != value)
                {
                    _hardwaremotortype = value;

                    if (HardwareMotorType != null)
                    {
                        HardwareMotorTypeGuid = HardwareMotorType.Guid;
                    }

                    OnHardwareMotorTypeChanged(value);

                }
            }
        }

        protected HardwareVersion _hardwareversion;

        /// <summary>
        /// Gets or sets the hardwaremotorbase hardware versions.
        /// </summary>

        [XmlIgnore]
        [JsonIgnore]
        public virtual HardwareVersion HardwareVersion
        {
            get 
            {
                return _hardwareversion; 
            }

            set 
            {
                if (_hardwareversion != value)
                {
                    _hardwareversion = value;

                    if (HardwareVersion != null)
                    {
                        HardwareVersionGuid = HardwareVersion.Guid;
                    }

                    OnHardwareVersionChanged(value);

                }
            }
        }

        /// <summary>
        /// Called when the MinFrequency has changed.
        /// </summary>
        protected virtual void OnMinFrequencyChanged(Int32 minfrequency)
        {
            MinFrequencyChanged?.Invoke(this, minfrequency);
            RaisePropertyChanged(nameof(MinFrequency));
        }

        /// <summary>
        /// Called when the MaxFrequency has changed.
        /// </summary>
        protected virtual void OnMaxFrequencyChanged(Int32 maxfrequency)
        {
            MaxFrequencyChanged?.Invoke(this, maxfrequency);
            RaisePropertyChanged(nameof(MaxFrequency));
        }

        /// <summary>
        /// Called when the SetMicroStep has changed.
        /// </summary>
        protected virtual void OnSetMicroStepChanged(Int32 setmicrostep)
        {
            SetMicroStepChanged?.Invoke(this, setmicrostep);
            RaisePropertyChanged(nameof(SetMicroStep));
        }

        /// <summary>
        /// Called when the MicroStep has changed.
        /// </summary>
        protected virtual void OnMicroStepChanged(Int32 microstep)
        {
            MicroStepChanged?.Invoke(this, microstep);
            RaisePropertyChanged(nameof(MicroStep));
        }

        /// <summary>
        /// Called when the MaxChangeSlope has changed.
        /// </summary>
        protected virtual void OnMaxChangeSlopeChanged(Double maxchangeslope)
        {
            MaxChangeSlopeChanged?.Invoke(this, maxchangeslope);
            RaisePropertyChanged(nameof(MaxChangeSlope));
        }

        /// <summary>
        /// Called when the HighLengthMicroSecond has changed.
        /// </summary>
        protected virtual void OnHighLengthMicroSecondChanged(Double highlengthmicrosecond)
        {
            HighLengthMicroSecondChanged?.Invoke(this, highlengthmicrosecond);
            RaisePropertyChanged(nameof(HighLengthMicroSecond));
        }

        /// <summary>
        /// Called when the SpeedMaster has changed.
        /// </summary>
        protected virtual void OnSpeedMasterChanged(Boolean speedmaster)
        {
            SpeedMasterChanged?.Invoke(this, speedmaster);
            RaisePropertyChanged(nameof(SpeedMaster));
        }

        /// <summary>
        /// Called when the PulsePerRound has changed.
        /// </summary>
        protected virtual void OnPulsePerRoundChanged(Int32 pulseperround)
        {
            PulsePerRoundChanged?.Invoke(this, pulseperround);
            RaisePropertyChanged(nameof(PulsePerRound));
        }

        /// <summary>
        /// Called when the PulleyRadius has changed.
        /// </summary>
        protected virtual void OnPulleyRadiusChanged(Double pulleyradius)
        {
            PulleyRadiusChanged?.Invoke(this, pulleyradius);
            RaisePropertyChanged(nameof(PulleyRadius));
        }

        /// <summary>
        /// Called when the ConfigWord has changed.
        /// </summary>
        protected virtual void OnConfigWordChanged(Int32 configword)
        {
            ConfigWordChanged?.Invoke(this, configword);
            RaisePropertyChanged(nameof(ConfigWord));
        }

        /// <summary>
        /// Called when the DirectionThreadWize has changed.
        /// </summary>
        protected virtual void OnDirectionThreadWizeChanged(Boolean directionthreadwize)
        {
            DirectionThreadWizeChanged?.Invoke(this, directionthreadwize);
            RaisePropertyChanged(nameof(DirectionThreadWize));
        }

        /// <summary>
        /// Called when the KvalHold has changed.
        /// </summary>
        protected virtual void OnKvalHoldChanged(Int32 kvalhold)
        {
            KvalHoldChanged?.Invoke(this, kvalhold);
            RaisePropertyChanged(nameof(KvalHold));
        }

        /// <summary>
        /// Called when the KvalRun has changed.
        /// </summary>
        protected virtual void OnKvalRunChanged(Int32 kvalrun)
        {
            KvalRunChanged?.Invoke(this, kvalrun);
            RaisePropertyChanged(nameof(KvalRun));
        }

        /// <summary>
        /// Called when the KvalAcc has changed.
        /// </summary>
        protected virtual void OnKvalAccChanged(Int32 kvalacc)
        {
            KvalAccChanged?.Invoke(this, kvalacc);
            RaisePropertyChanged(nameof(KvalAcc));
        }

        /// <summary>
        /// Called when the KvalDec has changed.
        /// </summary>
        protected virtual void OnKvalDecChanged(Int32 kvaldec)
        {
            KvalDecChanged?.Invoke(this, kvaldec);
            RaisePropertyChanged(nameof(KvalDec));
        }

        /// <summary>
        /// Called when the OverCurrentThreshold has changed.
        /// </summary>
        protected virtual void OnOverCurrentThresholdChanged(Int32 overcurrentthreshold)
        {
            OverCurrentThresholdChanged?.Invoke(this, overcurrentthreshold);
            RaisePropertyChanged(nameof(OverCurrentThreshold));
        }

        /// <summary>
        /// Called when the StallThreshold has changed.
        /// </summary>
        protected virtual void OnStallThresholdChanged(Int32 stallthreshold)
        {
            StallThresholdChanged?.Invoke(this, stallthreshold);
            RaisePropertyChanged(nameof(StallThreshold));
        }

        /// <summary>
        /// Called when the ThermalCompensationFactor has changed.
        /// </summary>
        protected virtual void OnThermalCompensationFactorChanged(Int32 thermalcompensationfactor)
        {
            ThermalCompensationFactorChanged?.Invoke(this, thermalcompensationfactor);
            RaisePropertyChanged(nameof(ThermalCompensationFactor));
        }

        /// <summary>
        /// Called when the LowSpeedOptimization has changed.
        /// </summary>
        protected virtual void OnLowSpeedOptimizationChanged(Boolean lowspeedoptimization)
        {
            LowSpeedOptimizationChanged?.Invoke(this, lowspeedoptimization);
            RaisePropertyChanged(nameof(LowSpeedOptimization));
        }

        /// <summary>
        /// Called when the StSlp has changed.
        /// </summary>
        protected virtual void OnStSlpChanged(Int32 stslp)
        {
            StSlpChanged?.Invoke(this, stslp);
            RaisePropertyChanged(nameof(StSlp));
        }

        /// <summary>
        /// Called when the IntSpd has changed.
        /// </summary>
        protected virtual void OnIntSpdChanged(Int32 intspd)
        {
            IntSpdChanged?.Invoke(this, intspd);
            RaisePropertyChanged(nameof(IntSpd));
        }

        /// <summary>
        /// Called when the FnSlpAcc has changed.
        /// </summary>
        protected virtual void OnFnSlpAccChanged(Int32 fnslpacc)
        {
            FnSlpAccChanged?.Invoke(this, fnslpacc);
            RaisePropertyChanged(nameof(FnSlpAcc));
        }

        /// <summary>
        /// Called when the FnSlpDec has changed.
        /// </summary>
        protected virtual void OnFnSlpDecChanged(Int32 fnslpdec)
        {
            FnSlpDecChanged?.Invoke(this, fnslpdec);
            RaisePropertyChanged(nameof(FnSlpDec));
        }

        /// <summary>
        /// Called when the FsSpd has changed.
        /// </summary>
        protected virtual void OnFsSpdChanged(Int32 fsspd)
        {
            FsSpdChanged?.Invoke(this, fsspd);
            RaisePropertyChanged(nameof(FsSpd));
        }

        /// <summary>
        /// Called when the GateCfg1 has changed.
        /// </summary>
        protected virtual void OnGateCfg1Changed(Int32 gatecfg1)
        {
            GateCfg1Changed?.Invoke(this, gatecfg1);
            RaisePropertyChanged(nameof(GateCfg1));
        }

        /// <summary>
        /// Called when the GateCfg2 has changed.
        /// </summary>
        protected virtual void OnGateCfg2Changed(Int32 gatecfg2)
        {
            GateCfg2Changed?.Invoke(this, gatecfg2);
            RaisePropertyChanged(nameof(GateCfg2));
        }

        /// <summary>
        /// Called when the TValHold has changed.
        /// </summary>
        protected virtual void OnTValHoldChanged(Int32 tvalhold)
        {
            TValHoldChanged?.Invoke(this, tvalhold);
            RaisePropertyChanged(nameof(TValHold));
        }

        /// <summary>
        /// Called when the TValRun has changed.
        /// </summary>
        protected virtual void OnTValRunChanged(Int32 tvalrun)
        {
            TValRunChanged?.Invoke(this, tvalrun);
            RaisePropertyChanged(nameof(TValRun));
        }

        /// <summary>
        /// Called when the TValAcc has changed.
        /// </summary>
        protected virtual void OnTValAccChanged(Int32 tvalacc)
        {
            TValAccChanged?.Invoke(this, tvalacc);
            RaisePropertyChanged(nameof(TValAcc));
        }

        /// <summary>
        /// Called when the TValDec has changed.
        /// </summary>
        protected virtual void OnTValDecChanged(Int32 tvaldec)
        {
            TValDecChanged?.Invoke(this, tvaldec);
            RaisePropertyChanged(nameof(TValDec));
        }

        /// <summary>
        /// Called when the TFast has changed.
        /// </summary>
        protected virtual void OnTFastChanged(Int32 tfast)
        {
            TFastChanged?.Invoke(this, tfast);
            RaisePropertyChanged(nameof(TFast));
        }

        /// <summary>
        /// Called when the TOnMin has changed.
        /// </summary>
        protected virtual void OnTOnMinChanged(Int32 tonmin)
        {
            TOnMinChanged?.Invoke(this, tonmin);
            RaisePropertyChanged(nameof(TOnMin));
        }

        /// <summary>
        /// Called when the TOffMin has changed.
        /// </summary>
        protected virtual void OnTOffMinChanged(Int32 toffmin)
        {
            TOffMinChanged?.Invoke(this, toffmin);
            RaisePropertyChanged(nameof(TOffMin));
        }

        /// <summary>
        /// Called when the Active has changed.
        /// </summary>
        protected virtual void OnActiveChanged(Boolean active)
        {
            ActiveChanged?.Invoke(this, active);
            RaisePropertyChanged(nameof(Active));
        }

        /// <summary>
        /// Called when the HardwareMotorType has changed.
        /// </summary>
        protected virtual void OnHardwareMotorTypeChanged(HardwareMotorType hardwaremotortype)
        {
            HardwareMotorTypeChanged?.Invoke(this, hardwaremotortype);
            RaisePropertyChanged(nameof(HardwareMotorType));
        }

        /// <summary>
        /// Called when the HardwareVersion has changed.
        /// </summary>
        protected virtual void OnHardwareVersionChanged(HardwareVersion hardwareversion)
        {
            HardwareVersionChanged?.Invoke(this, hardwareversion);
            RaisePropertyChanged(nameof(HardwareVersion));
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="HardwareMotorBase" /> class.
        /// </summary>
        public HardwareMotorBase() : base()
        {
        }
    }
}