CatStation/Content.Shared/SensorMonitoring/BatterySensorPayloads.cs

36 lines
1.4 KiB
C#

using Content.Shared.DeviceNetwork;
namespace Content.Shared.SensorMonitoring;
/// <summary>
/// Data about a battery sent to the power monitoring console.
/// </summary>
public partial record struct BatterySensorDataPayload : INetworkPayload
{
[DataField]
public BatterySensorData Data;
}
/// <summary>
/// A request for <see cref="BatterySensorDataPayload"/>.
/// </summary>
public partial record struct BatterySensorSyncPayload : INetworkPayload;
/// <summary>
/// Device network data sent by a <see cref="BatterySensorComponent"/>.
/// </summary>
/// <param name="Charge">The current energy charge of the battery, in joules (J).</param>
/// <param name="MaxCharge">The maximum energy capacity of the battery, in joules (J).</param>
/// <param name="Receiving">The current amount of power being received by the battery, in watts (W).</param>
/// <param name="MaxReceiving">The maximum amount of power that can be received by the battery, in watts (W).</param>
/// <param name="Supplying">The current amount of power being supplied by the battery, in watts (W).</param>
/// <param name="MaxSupplying">The maximum amount of power that can be received by the battery, in watts (W).</param>
[DataRecord]
public partial record struct BatterySensorData(
float Charge,
float MaxCharge,
float Receiving,
float MaxReceiving,
float Supplying,
float MaxSupplying
);