26 lines
706 B
C#
26 lines
706 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace RobotNet.VDA5050.State;
|
|
|
|
public class BatteryState
|
|
{
|
|
[Required]
|
|
[JsonPropertyName("batteryCharge")]
|
|
public double BatteryCharge { get; set; }
|
|
|
|
[JsonPropertyName("batteryVoltage")]
|
|
public double? BatteryVoltage { get; set; }
|
|
|
|
[Range(0, 100, ErrorMessage = "Value for BatteryHealth must be between 0 and 100.")]
|
|
[JsonPropertyName("batteryHealth")]
|
|
public double BatteryHealth { get; set; }
|
|
|
|
[Required]
|
|
[JsonPropertyName("charging")]
|
|
public bool Charging { get; set; }
|
|
|
|
[JsonPropertyName("reach")]
|
|
public double? Reach { get; set; }
|
|
}
|