12 lines
507 B
C#
12 lines
507 B
C#
using System.Text.Json.Nodes;
|
|
using InnovEnergy.Lib.Utils;
|
|
|
|
namespace InnovEnergy.Lib.Victron.VictronVRM;
|
|
|
|
public readonly record struct Device(JsonNode Json)
|
|
{
|
|
public String Type => Json.TryGetString("name")?.Trim() ?? "";
|
|
public String ProductName => Json.TryGetString("productName")?.Trim() ?? "";
|
|
public String FirmwareVersion => Json.TryGetString("firmwareVersion")?.Trim() ?? "";
|
|
public String SerialNumber => Json.TryGetString("machineSerialNumber")?.Trim() ?? "";
|
|
} |