BatterySensorComponent.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. using Content.Server.Power.Components;
  2. namespace Content.Server.SensorMonitoring;
  3. /// <summary>
  4. /// Enables a battery entity (such as an SMES) to be monitored via the sensor monitoring console.
  5. /// </summary>
  6. /// <remarks>
  7. /// The entity should also have a <see cref="BatteryComponent"/> and <see cref="PowerNetworkBatteryComponent"/>.
  8. /// </remarks>
  9. [RegisterComponent]
  10. public sealed partial class BatterySensorComponent : Component
  11. {
  12. }
  13. /// <summary>
  14. /// Device network data sent by a <see cref="BatterySensorComponent"/>.
  15. /// </summary>
  16. /// <param name="Charge">The current energy charge of the battery, in joules (J).</param>
  17. /// <param name="MaxCharge">The maximum energy capacity of the battery, in joules (J).</param>
  18. /// <param name="Receiving">The current amount of power being received by the battery, in watts (W).</param>
  19. /// <param name="MaxReceiving">The maximum amount of power that can be received by the battery, in watts (W).</param>
  20. /// <param name="Supplying">The current amount of power being supplied by the battery, in watts (W).</param>
  21. /// <param name="MaxSupplying">The maximum amount of power that can be received by the battery, in watts (W).</param>
  22. public sealed record BatterySensorData(
  23. float Charge,
  24. float MaxCharge,
  25. float Receiving,
  26. float MaxReceiving,
  27. float Supplying,
  28. float MaxSupplying
  29. );