From 72e921ee396d0b481b6e36e0bef2b90c44b6aed0 Mon Sep 17 00:00:00 2001 From: Wouter van Reeven Date: Mon, 16 Sep 2024 11:57:38 +0200 Subject: [PATCH] Merge EPM enums and telemetry into ESS. --- doc/news/interface_changes/DM-46348.EPM.rst | 1 + doc/news/interface_changes/DM-46348.ESS.rst | 1 + .../data/sal_interfaces/ESS/ESS_Telemetry.xml | 444 ++++++++++++++++++ python/lsst/ts/xml/enums/EPM.py | 2 + python/lsst/ts/xml/enums/ESS.py | 37 +- python/lsst/ts/xml/enums/__init__.py | 1 + 6 files changed, 483 insertions(+), 3 deletions(-) create mode 100644 doc/news/interface_changes/DM-46348.EPM.rst create mode 100644 doc/news/interface_changes/DM-46348.ESS.rst diff --git a/doc/news/interface_changes/DM-46348.EPM.rst b/doc/news/interface_changes/DM-46348.EPM.rst new file mode 100644 index 000000000..e6aa4da3a --- /dev/null +++ b/doc/news/interface_changes/DM-46348.EPM.rst @@ -0,0 +1 @@ +Merge EPM enums and telemetry into ESS. diff --git a/doc/news/interface_changes/DM-46348.ESS.rst b/doc/news/interface_changes/DM-46348.ESS.rst new file mode 100644 index 000000000..e6aa4da3a --- /dev/null +++ b/doc/news/interface_changes/DM-46348.ESS.rst @@ -0,0 +1 @@ +Merge EPM enums and telemetry into ESS. diff --git a/python/lsst/ts/xml/data/sal_interfaces/ESS/ESS_Telemetry.xml b/python/lsst/ts/xml/data/sal_interfaces/ESS/ESS_Telemetry.xml index d9a0055df..ee81efdd1 100644 --- a/python/lsst/ts/xml/data/sal_interfaces/ESS/ESS_Telemetry.xml +++ b/python/lsst/ts/xml/data/sal_interfaces/ESS/ESS_Telemetry.xml @@ -1,6 +1,22 @@ + + BatteryStatus_Charging=1, + BatteryStatus_Discharging=2, + BatteryStatus_Floating=3, + BatteryStatus_Resting=4 + + + ErrorCode_ConnectionFailed=1, + ErrorCode_ConnectionLost=2, + ErrorCode_StartFailed=3, + ErrorCode_RunFailed=4 + + + OnOff_ON=1, + OnOff_OFF=2 + ESS ESS_airTurbulence @@ -993,4 +1009,432 @@ 1 + + ESS + ESS_pdu + Telemetry for Netbooter PDU devices. + + systemDescription + The value of the SNMP System Description field. + string + unitless + 1 + + + acCurrentDraw + AC current draw. + float + A + 1 + + + acMaxDraw + AC maximum current draw detected. + float + A + 1 + + + powerOutletStatus + Power Outlet Status. + int + unitless + 2 + + + + ESS + ESS_schneiderPm5xxx + Telemetry for Schneider PM5XXX devices. + + systemDescription + The value of the SNMP System Description field. + string + unitless + 1 + + + serialNumber + PM556x - Unit Serial Number + string + unitless + 1 + + + measuredLineVoltageVan + Measured Line Voltage - Van - (Volts) + float + V + 1 + + + measuredLineVoltageVbn + Measured Line Voltage - Vbn - (Volts) + float + V + 1 + + + measuredLineVoltageVcn + Measured Line Voltage - Vcn - (Volts) + float + V + 1 + + + measuredLineVoltageVab + Measured Line Voltage - Vab - (Volts) + float + V + 1 + + + measuredLineVoltageVbc + Measured Line Voltage - Vbc - (Volts) + float + V + 1 + + + measuredLineVoltageVca + Measured Line Voltage - Vca - (Volts) + float + V + 1 + + + loadCurrentA + Measured Load Current - Phase A - (Amps) + float + A + 1 + + + loadCurrentB + Measured Load Current - Phase B - (Amps) + float + A + 1 + + + loadCurrentC + Measured Load Current - Phase C - (Amps) + float + A + 1 + + + neutralCurrent + Measured Neutral Current - (Amps) + float + A + 1 + + + systemFrequency + Measured System Frequency (Hz) + float + Hz + 1 + + + activePowerA + Active Power - Phase A - (kW) + float + kW + 1 + + + activePowerB + Active Power - Phase B - (kW) + float + kW + 1 + + + activePowerC + Active Power - Phase C - (kW) + float + kW + 1 + + + reactivePowerA + Reactive Power - Phase A - (kVar) + float + kW + 1 + + + reactivePowerB + Reactive Power - Phase B - (kVar) + float + kW + 1 + + + reactivePowerC + Reactive Power - Phase C - (kVar) + float + kW + 1 + + + apparentPowerA + Apparent Power - Phase A - (kVA) + float + kW + 1 + + + apparentPowerB + Apparent Power - Phase B - (kVA) + float + kW + 1 + + + apparentPowerC + Apparent Power - Phase C - (kVA) + float + kW + 1 + + + powerFactorA + Power Factor - Phase A + float + unitless + 1 + + + powerFactorB + Power Factor - Phase B + float + unitless + 1 + + + powerFactorC + Power Factor - Phase C + float + unitless + 1 + + + displacementPowerFactorA + Displacement Power Factor - Phase A + float + unitless + 1 + + + displacementPowerFactorB + Displacement Power Factor - Phase B + float + unitless + 1 + + + displacementPowerFactorC + Displacement Power Factor - Phase C + float + unitless + 1 + + + totalPowerFactor + Total Power Factor - Phase (A, B, C) + float + unitless + 1 + + + totalDisplacementPowerFactor + Total Displacement Power Factor - Phase (A, B, C) + float + unitless + 1 + + + totalActivePower + Total Active Power - Phase (A,B,C) - (kW) + float + kW + 1 + + + totalReactivePower + Total Reactive Power - Phase (A,B,C) - (kVar) + float + kW + 1 + + + totalApparentPower + Total Apparent Power - Phase (A,B,C) - (kVA) + float + kW + 1 + + + activeEnergyDelivered + Accumulated Energy - Active Energy Delivered - (Wh) + float + J + 1 + + + reactiveEnergyDelivered + Accumulated Energy - Reactive Energy Delivered - (VARh) + float + J + 1 + + + apparentEnergyDelivered + Accumulated Energy - Apparent Energy Delivered - (VAh) + float + J + 1 + + + resetDateTime + Accumulated Energy - Date /Time of Last Reset + string + unitless + 1 + + + + ESS + ESS_xups + Telemetry for XUPS devices. + + systemDescription + The value of the SNMP System Description field. + string + unitless + 1 + + + batteryCapacity + Battery percent charge. + float + unitless + 1 + + + batteryTimeRemaining + Battery run time in seconds before UPS turns off due to low battery. + float + s + 1 + + + batteryVoltage + Battery voltage as reported by the UPS meters. + float + V + 1 + + + envAmbientTemp + The reading of the ambient temperature in the vicinity of the UPS or SNMP agent. + float + deg_C + 1 + + + batteryCurrent + Battery Current as reported by the UPS metering. Current is positive when discharging, negative when recharging the battery. + float + A + 1 + + + inputCurrent + The measured input current from the UPS meters in amps. + float + A + 3 + + + inputPower + The measured input real power in watts. + float + W + 3 + + + inputVoltage + The measured input voltage from the UPS meters in volts. + float + V + 3 + + + inputFrequency + The utility line frequency in tenths of Hz. + float + Hz + 1 + + + outputCurrent + The measured UPS output current in amps. + float + A + 3 + + + outputPower + The measured real output power in watts. + float + W + 3 + + + outputVoltage + The measured output voltage from the UPS metering in volts. + float + V + 3 + + + outputFrequency + The measured UPS output frequency in tenths of Hz. + float + Hz + 1 + + + outputLoad + The UPS output load in percent of rated capacity. + float + unitless + 1 + + + bypassVoltage + The measured UPS bypass voltage in volts. + float + V + 3 + + + bypassFrequency + The bypass frequency in tenths of Hz. + float + Hz + 1 + + + batteryAbmStatus + Gives the status of the Advanced Battery Management; batteryFloating(3) status means that the charger is temporarily charging the battery to its float voltage; batteryResting(4) is the state when the battery is fully charged and none of the other actions (charging/discharging/floating) is being done. + int + unitless + 1 + + diff --git a/python/lsst/ts/xml/enums/EPM.py b/python/lsst/ts/xml/enums/EPM.py index b96b27d36..1738d119a 100644 --- a/python/lsst/ts/xml/enums/EPM.py +++ b/python/lsst/ts/xml/enums/EPM.py @@ -24,6 +24,7 @@ import enum +# @TODO DM-46349 Remove this enum. class BatteryStatus(enum.IntEnum): """Battery statuses that can be used by the EPM CSC. @@ -42,6 +43,7 @@ class BatteryStatus(enum.IntEnum): Resting = 4 +# @TODO DM-46349 Remove this enum. class OnOff(enum.IntEnum): """On/Off statuses that can be used by the EPM CSC. diff --git a/python/lsst/ts/xml/enums/ESS.py b/python/lsst/ts/xml/enums/ESS.py index 2337a2c32..8f419572d 100644 --- a/python/lsst/ts/xml/enums/ESS.py +++ b/python/lsst/ts/xml/enums/ESS.py @@ -19,12 +19,12 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -__all__ = ["ErrorCode"] +__all__ = ["BatteryStatus", "ErrorCode", "OnOff"] -from enum import IntEnum +import enum -class ErrorCode(IntEnum): +class ErrorCode(enum.IntEnum): """Error codes that can be used by the ESS CSC. Values: @@ -40,3 +40,34 @@ class ErrorCode(IntEnum): ConnectionLost = 2 StartFailed = 3 RunFailed = 4 + + +class BatteryStatus(enum.IntEnum): + """Battery statuses that can be used by the ESS CSC. + + Values: + + * Charging: The battery is charging. + * Discharging: The battery is discharging. + * Floating: The battery is charging to its float voltage. + * Resting: The battery is fully charged and not + charging/discharging/floating. + """ + + Charging = 1 + Discharging = 2 + Floating = 3 + Resting = 4 + + +class OnOff(enum.IntEnum): + """On/Off statuses that can be used by the ESS CSC. + + Values: + + * ON: The device is on. + * OFF: The device is off. + """ + + ON = 1 + OFF = 2 diff --git a/python/lsst/ts/xml/enums/__init__.py b/python/lsst/ts/xml/enums/__init__.py index 7a6a51214..e720bb71d 100644 --- a/python/lsst/ts/xml/enums/__init__.py +++ b/python/lsst/ts/xml/enums/__init__.py @@ -22,6 +22,7 @@ ATMCS, DREAM, EPM, + ESS, GIS, HVAC, MTAOS,