using InnovEnergy.Lib.Devices.Trumpf.TruConvert; namespace InnovEnergy.Lib.Devices.Trumpf.TruConvertDc; public record TruConvertDcControl { public UInt32 Date { get; init;} public UInt32 Time { get; init;} public UInt32 IpAddress { get; init;} //= 0x C0A80102; public UInt32 Subnet { get; init;} //= 0x FFFFFF00; public UInt32 Gateway { get; init;} //= 0x C0A80102; public Boolean ResetParamToDefault { get; init;} = false ; // Coil public TimeSpan TimeoutForCommunication { get; init;} = DefaultCommunicationTimeOut; public Boolean RestartFlag { get; init;} = false ; // Coil public SystemConfig ConnectedSystemConfig { get; init;} = SystemConfig.NoConfig ; public UInt16 UpdateSwTrigger { get; init;} = 0 ; public UInt16 AutomaticSwUpdate { get; init;} = 0 ; public UInt16 CustomerValuesSaveReset { get; init;} = 0 ; public UInt32 SerialNumberSystemControl { get; init;} public UInt32 SerialNumberDcDc { get; init;} public UInt32 MaterialNumberDcDc { get; init;} public Boolean PowerStageEnable { get; init;} = true; //Coil public Boolean ResetsAlarmAndWarning { get; init;} = false; //Coil public UInt16 SlaveAddress { get; init;} = Slave.Broadcast; public UInt16 SlaveAlarmPolicy { get; init;} = 0; // this is must be a an enum public UInt16 SubSlaveAddress { get; init;} = 0; public Boolean ModbusSlaveId { get; init;} = false; // Coil public Decimal MaximumBatteryVoltage { get; init;} = 0; // resolution 0.01 public Decimal MinimumBatteryVoltage { get; init;} = 0; // resolution 0.01 public Decimal MaximumBatteryChargingCurrent { get; init;} = 0; // resolution 0.1 public Decimal MaximumBatteryDischargingCurrent { get; init;} = 0; // resolution 0.1 public Decimal MaximalPowerAtDc { get; init;} = 0; public Decimal MaximumVoltageAlarmThreshold { get; init;} = 55; // resolution 0.1 public Decimal MinimumVoltageAlarmThreshold { get; init;} = 0; // resolution 0.1 public Decimal BatteryCurrentSet { get; init;} = 0; // resolution 1.0 public Decimal DynamicCurrentPerMillisecond { get; init;} = 0; // resolution : 0.01 public Decimal DcLinkControlMode { get; init;} = 0; // Parameter aktiviert/deaktiviert "DC link voltage droop mode" public Decimal ReferenceVoltage { get; init;} = 800; // resolution : 0.1 public Decimal UpperVoltageWindow { get; init;} = 40; // resolution : 0.1 public Decimal LowerVoltageWindow { get; init;} = 40; // resolution : 0.1 public Decimal VoltageDeadBand { get; init;} = 0; // resolution : 0.1 private static readonly TimeSpan DefaultCommunicationTimeOut = TimeSpan.FromMinutes(10); }