diff --git a/MainWindow.xaml b/MainWindow.xaml index cd1734f..5b9dee4 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -53,6 +53,9 @@ + + + @@ -75,9 +78,16 @@ + + + + + + + diff --git a/MainWindowViewModel.cs b/MainWindowViewModel.cs index 216cff4..1ba6711 100644 --- a/MainWindowViewModel.cs +++ b/MainWindowViewModel.cs @@ -209,6 +209,12 @@ private void UpdateMediumInfo() _hardware.IsIPEnabled = true; _hardware.BusCurrent = null; } + else if (_hardware2Program.MediumTypes[0] == "MT-2") + { + _applicationProgram.MaskVersion = "MV-27B0"; + _hardware.IsIPEnabled = false; + _hardware.BusCurrent = null; + } else { _applicationProgram.MaskVersion = "MV-07B0"; @@ -442,7 +448,9 @@ private void CreateNew(object param) _applicationProgram.DefaultLanguage = lang; _applicationProgram.DynamicTableManagement = false; _applicationProgram.Linkable = false; - _applicationProgram.MinEtsVersion = "4.0"; + _applicationProgram.MinEtsVersion = "5.0"; + _applicationProgram.MaxSecurityIndividualAddressEntries = 32; + _applicationProgram.MaxSecurityGroupKeyTableEntries = 50; var appStatic = new ApplicationProgramStatic_T(); _applicationProgram.Static = appStatic; @@ -477,6 +485,7 @@ private void CreateNew(object param) OrderNumber = "0"; _hardware2Program.MediumTypes.Add("MT-5"); + _hardware2Program.MediumTypes.Add("MT-2"); _catalogSection.Name = Ressources.Devices; _catalogSection.Number = "1"; @@ -699,6 +708,9 @@ private void RaiseChanged() RaisePropertyChanged(nameof(ComObjects)); RaisePropertyChanged(nameof(MediumType)); RaisePropertyChanged(nameof(ReplacedVersions)); + RaisePropertyChanged(nameof(IsSecureEnabled)); + RaisePropertyChanged(nameof(MaxSecurityIndividualAddressEntries)); + RaisePropertyChanged(nameof(MaxSecurityGroupKeyTableEntries)); } #region Properties @@ -837,6 +849,57 @@ public string ReplacedVersions } } + public bool IsSecureEnabled + { + get + { + if (_applicationProgram == null) + return false; + + return _applicationProgram.IsSecureEnabled; + } + set + { + _applicationProgram.IsSecureEnabled = value; + + RaisePropertyChanged(nameof(IsSecureEnabled)); + } + } + + public ushort MaxSecurityIndividualAddressEntries + { + get + { + if (_applicationProgram == null) + return 0; + + return _applicationProgram.MaxSecurityIndividualAddressEntries; + } + set + { + _applicationProgram.MaxSecurityIndividualAddressEntries = value; + + RaisePropertyChanged(nameof(MaxSecurityIndividualAddressEntries)); + } + } + + public ushort MaxSecurityGroupKeyTableEntries + { + get + { + if (_applicationProgram == null) + return 0; + + return _applicationProgram.MaxSecurityGroupKeyTableEntries; + } + set + { + _applicationProgram.MaxSecurityIndividualAddressEntries = value; + + RaisePropertyChanged(nameof(MaxSecurityGroupKeyTableEntries)); + } + } + public ObservableCollection ParameterTypes { get => _applicationProgram?.Static?.ParameterTypes; diff --git a/Properties/Ressources.resx b/Properties/Ressources.resx index 6df86f7..1b2bb3e 100644 --- a/Properties/Ressources.resx +++ b/Properties/Ressources.resx @@ -252,4 +252,16 @@ ReplacedVersion + + RF + + + Enable data security + + + Max SecurityGroupKeyTable Entries + + + Max SecurityIndividualAddress Entries + \ No newline at end of file