35 lines
1.1 KiB
C#
35 lines
1.1 KiB
C#
using System.Diagnostics.CodeAnalysis;
|
|
using System.IO.Ports;
|
|
using static System.IO.Ports.Parity;
|
|
using static System.IO.Ports.StopBits;
|
|
|
|
namespace InnovEnergy.Lib.Devices.Battery48TL;
|
|
|
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
|
public static class Constants
|
|
{
|
|
public const Int32 BaseAddress = 1000;
|
|
public const Int32 NoOfRegisters = 56;
|
|
|
|
public const Parity Parity = Odd;
|
|
public const StopBits StopBits = One;
|
|
public const Int32 BaudRate = 115200;
|
|
public const Int32 DataBits = 8;
|
|
public static TimeSpan Timeout { get; } = TimeSpan.FromMilliseconds(100);
|
|
|
|
public const Decimal VMax = 59.0m;
|
|
public const Decimal VMin = 42.0m;
|
|
public const Decimal AhPerString = 40.0m;
|
|
|
|
private const Decimal RStringMin = 0.125m;
|
|
private const Decimal RStringMax = 0.250m;
|
|
private const Decimal IMaxPerString = 20.0m;
|
|
private const UInt16 NumberOfStrings = 5;
|
|
|
|
public const Decimal RIntMin = RStringMin / NumberOfStrings;
|
|
public const Decimal RIntMax = RStringMax / NumberOfStrings;
|
|
public const Decimal IMax = NumberOfStrings * IMaxPerString;
|
|
|
|
|
|
|
|
} |