From f97e616a0d0b6036bbf850de7fe415ae561e4ba5 Mon Sep 17 00:00:00 2001 From: Andreas Linde Date: Thu, 23 May 2024 08:20:34 +0200 Subject: [PATCH] Update usecase event name values to be unique This allows the messages to be handled in a combined handler --- uccevc/types.go | 14 +++++++------- ucevcc/types.go | 18 +++++++++--------- ucevcem/types.go | 8 ++++---- ucevsecc/types.go | 8 ++++---- ucevsoc/types.go | 2 +- uclpc/types.go | 6 +++--- uclpcserver/types.go | 8 ++++---- uclpp/types.go | 6 +++--- uclppserver/types.go | 8 ++++---- ucmgcp/types.go | 14 +++++++------- ucmpc/types.go | 14 +++++++------- ucopev/types.go | 4 ++-- ucoscev/types.go | 4 ++-- ucvabd/types.go | 8 ++++---- ucvapd/types.go | 6 +++--- 15 files changed, 64 insertions(+), 64 deletions(-) diff --git a/uccevc/types.go b/uccevc/types.go index bc5c7f4..9e9c389 100644 --- a/uccevc/types.go +++ b/uccevc/types.go @@ -8,39 +8,39 @@ const ( // EV provided an energy demand // // Use `EnergyDemand` to get the current data - DataUpdateEnergyDemand api.EventType = "DataUpdateEnergyDemand" + DataUpdateEnergyDemand api.EventType = "uccevc-DataUpdateEnergyDemand" // Scenario 2 // EV provided a charge plan constraints // // Use `TimeSlotConstraints` to get the current data - DataUpdateTimeSlotConstraints api.EventType = "DataUpdateTimeSlotConstraints" + DataUpdateTimeSlotConstraints api.EventType = "uccevc-DataUpdateTimeSlotConstraints" // Scenario 3 // EV incentive table data updated // // Use `IncentiveConstraints` to get the current data - DataUpdateIncentiveTable api.EventType = "DataUpdateIncentiveTable" + DataUpdateIncentiveTable api.EventType = "uccevc-DataUpdateIncentiveTable" // EV requested an incentive table, call to WriteIncentiveTableDescriptions required - DataRequestedIncentiveTableDescription api.EventType = "DataRequestedIncentiveTableDescription" + DataRequestedIncentiveTableDescription api.EventType = "uccevc-DataRequestedIncentiveTableDescription" // Scenario 2 & 3 // EV requested power limits, call to WritePowerLimits and WriteIncentives required - DataRequestedPowerLimitsAndIncentives api.EventType = "DataRequestedPowerLimitsAndIncentives" + DataRequestedPowerLimitsAndIncentives api.EventType = "uccevc-DataRequestedPowerLimitsAndIncentives" // Scenario 4 // EV provided a charge plan // // Use `ChargePlanConstraints` to get the current data - DataUpdateChargePlanConstraints api.EventType = "DataUpdateChargePlanConstraints" + DataUpdateChargePlanConstraints api.EventType = "uccevc-DataUpdateChargePlanConstraints" // EV provided a charge plan // // Use `ChargePlan` to get the current data - DataUpdateChargePlan api.EventType = "DataUpdateChargePlan" + DataUpdateChargePlan api.EventType = "uccevc-DataUpdateChargePlan" ) diff --git a/ucevcc/types.go b/ucevcc/types.go index bc89a83..802d6b7 100644 --- a/ucevcc/types.go +++ b/ucevcc/types.go @@ -15,57 +15,57 @@ const ( // An EV was connected // // Use Case EVCC, Scenario 1 - EvConnected api.EventType = "EvConnected" + EvConnected api.EventType = "ucevcc-EvConnected" // An EV was disconnected // // Note: The ev entity is no longer connected to the device! // // Use Case EVCC, Scenario 8 - EvDisconnected api.EventType = "EvDisconnected" + EvDisconnected api.EventType = "ucevcc-EvDisconnected" // EV charge state data was updated // // Use `ChargeState` to get the current data - DataUpdateChargeState api.EventType = "DataUpdateChargeState" + DataUpdateChargeState api.EventType = "ucevcc-DataUpdateChargeState" // EV communication standard data was updated // // Use `CommunicationStandard` to get the current data // // Use Case EVCC, Scenario 2 - DataUpdateCommunicationStandard api.EventType = "DataUpdateCommunicationStandard" + DataUpdateCommunicationStandard api.EventType = "ucevcc-DataUpdateCommunicationStandard" // EV asymmetric charging data was updated // // Use `AsymmetricChargingSupport` to get the current data - DataUpdateAsymmetricChargingSupport api.EventType = "DataUpdateAsymmetricChargingSupport" + DataUpdateAsymmetricChargingSupport api.EventType = "ucevcc-DataUpdateAsymmetricChargingSupport" // EV identificationdata was updated // // Use `Identifications` to get the current data // // Use Case EVCC, Scenario 4 - DataUpdateIdentifications api.EventType = "DataUpdateIdentifications" + DataUpdateIdentifications api.EventType = "ucevcc-DataUpdateIdentifications" // EV manufacturer data was updated // // Use `ManufacturerData` to get the current data // // Use Case EVCC, Scenario 5 - DataUpdateManufacturerData api.EventType = "DataUpdateManufacturerData" + DataUpdateManufacturerData api.EventType = "ucevcc-DataUpdateManufacturerData" // EV charging power limits // // Use `ChargingPowerLimits` to get the current data // // Use Case EVCC, Scenario 6 - DataUpdateCurrentLimits api.EventType = "DataUpdateCurrentLimits" + DataUpdateCurrentLimits api.EventType = "ucevcc-DataUpdateCurrentLimits" // EV permitted power limits updated // // Use `IsInSleepMode` to get the current data // // Use Case EVCC, Scenario 7 - DataUpdateIsInSleepMode api.EventType = "DataUpdateIsInSleepMode" + DataUpdateIsInSleepMode api.EventType = "ucevcc-DataUpdateIsInSleepMode" ) diff --git a/ucevcem/types.go b/ucevcem/types.go index e834202..eaec234 100644 --- a/ucevcem/types.go +++ b/ucevcem/types.go @@ -8,26 +8,26 @@ const ( // Use `PhasesConnected` to get the current data // // Use Case EVCEM, Scenario 1 - DataUpdatePhasesConnected api.EventType = "DataUpdatePhasesConnected" + DataUpdatePhasesConnected api.EventType = "ucevcem-DataUpdatePhasesConnected" // EV current measurement data updated // // Use `CurrentPerPhase` to get the current data // // Use Case EVCEM, Scenario 1 - DataUpdateCurrentPerPhase api.EventType = "DataUpdateCurrentPerPhase" + DataUpdateCurrentPerPhase api.EventType = "ucevcem-DataUpdateCurrentPerPhase" // EV power measurement data updated // // Use `PowerPerPhase` to get the current data // // Use Case EVCEM, Scenario 2 - DataUpdatePowerPerPhase api.EventType = "DataUpdatePowerPerPhase" + DataUpdatePowerPerPhase api.EventType = "ucevcem-DataUpdatePowerPerPhase" // EV charging energy measurement data updated // // Use `EnergyCharged` to get the current data // // Use Case EVCEM, Scenario 3 - DataUpdateEnergyCharged api.EventType = "DataUpdateEnergyCharged" + DataUpdateEnergyCharged api.EventType = "ucevcem-DataUpdateEnergyCharged" ) diff --git a/ucevsecc/types.go b/ucevsecc/types.go index 7a463f8..e9ee9e0 100644 --- a/ucevsecc/types.go +++ b/ucevsecc/types.go @@ -4,10 +4,10 @@ import "github.com/enbility/cemd/api" const ( // An EVSE was connected - EvseConnected api.EventType = "EvseConnected" + EvseConnected api.EventType = "ucevsecc-EvseConnected" // An EVSE was disconnected - EvseDisconnected api.EventType = "EvseDisconnected" + EvseDisconnected api.EventType = "ucevsecc-EvseDisconnected" // EVSE manufacturer data was updated // @@ -16,7 +16,7 @@ const ( // Use Case EVSECC, Scenario 1 // // The entity of the message is the entity of the EVSE - DataUpdateManufacturerData api.EventType = "DataUpdateManufacturerData" + DataUpdateManufacturerData api.EventType = "ucevsecc-DataUpdateManufacturerData" // EVSE operation state was updated // @@ -25,5 +25,5 @@ const ( // Use Case EVSECC, Scenario 2 // // The entity of the message is the entity of the EVSE - DataUpdateOperatingState api.EventType = "DataUpdateOperatingState" + DataUpdateOperatingState api.EventType = "ucevsecc-DataUpdateOperatingState" ) diff --git a/ucevsoc/types.go b/ucevsoc/types.go index b5f2b0a..5ed2da5 100644 --- a/ucevsoc/types.go +++ b/ucevsoc/types.go @@ -8,5 +8,5 @@ const ( // Use `StateOfCharge` to get the current data // // Use Case EVSOC, Scenario 1 - DataUpdateStateOfCharge api.EventType = "DataUpdateStateOfCharge" + DataUpdateStateOfCharge api.EventType = "ucevsoc-DataUpdateStateOfCharge" ) diff --git a/uclpc/types.go b/uclpc/types.go index 82550e8..95946cc 100644 --- a/uclpc/types.go +++ b/uclpc/types.go @@ -8,7 +8,7 @@ const ( // Use `ConsumptionLimit` to get the current data // // Use Case LPC, Scenario 1 - DataUpdateLimit api.EventType = "DataUpdateLimit" + DataUpdateLimit api.EventType = "uclpc-DataUpdateLimit" // Failsafe limit for the consumed active (real) power of the // Controllable System data updated @@ -16,7 +16,7 @@ const ( // Use `FailsafeConsumptionActivePowerLimit` to get the current data // // Use Case LPC, Scenario 2 - DataUpdateFailsafeConsumptionActivePowerLimit api.EventType = "DataUpdateFailsafeConsumptionActivePowerLimit" + DataUpdateFailsafeConsumptionActivePowerLimit api.EventType = "uclpc-DataUpdateFailsafeConsumptionActivePowerLimit" // Minimum time the Controllable System remains in "failsafe state" unless conditions // specified in this Use Case permit leaving the "failsafe state" data updated @@ -24,5 +24,5 @@ const ( // Use `FailsafeDurationMinimum` to get the current data // // Use Case LPC, Scenario 2 - DataUpdateFailsafeDurationMinimum api.EventType = "DataUpdateFailsafeDurationMinimum" + DataUpdateFailsafeDurationMinimum api.EventType = "uclpc-DataUpdateFailsafeDurationMinimum" ) diff --git a/uclpcserver/types.go b/uclpcserver/types.go index f555694..4004a72 100644 --- a/uclpcserver/types.go +++ b/uclpcserver/types.go @@ -8,7 +8,7 @@ const ( // Use `ConsumptionLimit` to get the current data // // Use Case LPC, Scenario 1 - DataUpdateLimit api.EventType = "DataUpdateLimit" + DataUpdateLimit api.EventType = "uclpcserver-DataUpdateLimit" // An incoming load control obligation limit needs to be approved or denied // @@ -16,7 +16,7 @@ const ( // and invoke `ApproveOrDenyConsumptionLimit` for each // // Use Case LPC, Scenario 1 - WriteApprovalRequired api.EventType = "WriteApprovalRequired" + WriteApprovalRequired api.EventType = "uclpcserver-WriteApprovalRequired" // Failsafe limit for the consumed active (real) power of the // Controllable System data update received @@ -24,7 +24,7 @@ const ( // Use `FailsafeConsumptionActivePowerLimit` to get the current data // // Use Case LPC, Scenario 2 - DataUpdateFailsafeConsumptionActivePowerLimit api.EventType = "DataUpdateFailsafeConsumptionActivePowerLimit" + DataUpdateFailsafeConsumptionActivePowerLimit api.EventType = "uclpcserver-DataUpdateFailsafeConsumptionActivePowerLimit" // Minimum time the Controllable System remains in "failsafe state" unless conditions // specified in this Use Case permit leaving the "failsafe state" data update received @@ -32,5 +32,5 @@ const ( // Use `FailsafeDurationMinimum` to get the current data // // Use Case LPC, Scenario 2 - DataUpdateFailsafeDurationMinimum api.EventType = "DataUpdateFailsafeDurationMinimum" + DataUpdateFailsafeDurationMinimum api.EventType = "uclpcserver-DataUpdateFailsafeDurationMinimum" ) diff --git a/uclpp/types.go b/uclpp/types.go index cbac18a..0621480 100644 --- a/uclpp/types.go +++ b/uclpp/types.go @@ -8,7 +8,7 @@ const ( // Use `ProductionLimit` to get the current data // // Use Case LPC, Scenario 1 - DataUpdateLimit api.EventType = "DataUpdateLimit" + DataUpdateLimit api.EventType = "uclpp-DataUpdateLimit" // Failsafe limit for the produced active (real) power of the // Controllable System data updated @@ -16,7 +16,7 @@ const ( // Use `FailsafeProductionActivePowerLimit` to get the current data // // Use Case LPC, Scenario 2 - DataUpdateFailsafeProductionActivePowerLimit api.EventType = "DataUpdateFailsafeProductionActivePowerLimit" + DataUpdateFailsafeProductionActivePowerLimit api.EventType = "uclpp-DataUpdateFailsafeProductionActivePowerLimit" // Minimum time the Controllable System remains in "failsafe state" unless conditions // specified in this Use Case permit leaving the "failsafe state" data updated @@ -24,5 +24,5 @@ const ( // Use `FailsafeDurationMinimum` to get the current data // // Use Case LPC, Scenario 2 - DataUpdateFailsafeDurationMinimum api.EventType = "DataUpdateFailsafeDurationMinimum" + DataUpdateFailsafeDurationMinimum api.EventType = "uclpp-DataUpdateFailsafeDurationMinimum" ) diff --git a/uclppserver/types.go b/uclppserver/types.go index e5df6d8..d144c9e 100644 --- a/uclppserver/types.go +++ b/uclppserver/types.go @@ -8,7 +8,7 @@ const ( // Use `ProductionLimit` to get the current data // // Use Case LPC, Scenario 1 - DataUpdateLimit api.EventType = "DataUpdateLimit" + DataUpdateLimit api.EventType = "uclppserver-DataUpdateLimit" // An incoming load control obligation limit needs to be approved or denied // @@ -16,7 +16,7 @@ const ( // and invoke `ApproveOrDenyProductionLimit` for each // // Use Case LPC, Scenario 1 - WriteApprovalRequired api.EventType = "WriteApprovalRequired" + WriteApprovalRequired api.EventType = "uclppserver-WriteApprovalRequired" // Failsafe limit for the produced active (real) power of the // Controllable System data update received @@ -24,7 +24,7 @@ const ( // Use `FailsafeProductionActivePowerLimit` to get the current data // // Use Case LPC, Scenario 2 - DataUpdateFailsafeProductionActivePowerLimit api.EventType = "DataUpdateFailsafeProductionActivePowerLimit" + DataUpdateFailsafeProductionActivePowerLimit api.EventType = "uclppserver-DataUpdateFailsafeProductionActivePowerLimit" // Minimum time the Controllable System remains in "failsafe state" unless conditions // specified in this Use Case permit leaving the "failsafe state" data update received @@ -32,5 +32,5 @@ const ( // Use `FailsafeDurationMinimum` to get the current data // // Use Case LPC, Scenario 2 - DataUpdateFailsafeDurationMinimum api.EventType = "DataUpdateFailsafeDurationMinimum" + DataUpdateFailsafeDurationMinimum api.EventType = "uclppserver-DataUpdateFailsafeDurationMinimum" ) diff --git a/ucmgcp/types.go b/ucmgcp/types.go index 3d453a3..fcbd382 100644 --- a/ucmgcp/types.go +++ b/ucmgcp/types.go @@ -9,47 +9,47 @@ const ( // Use `PowerLimitationFactor` to get the current data // // Use Case MGCP, Scenario 2 - DataUpdatePowerLimitationFactor api.EventType = "DataUpdatePowerLimitationFactor" + DataUpdatePowerLimitationFactor api.EventType = "ucmgcp-DataUpdatePowerLimitationFactor" // Grid momentary power consumption/production data updated // // Use `Power` to get the current data // // Use Case MGCP, Scenario 2 - DataUpdatePower api.EventType = "DataUpdatePower" + DataUpdatePower api.EventType = "ucmgcp-DataUpdatePower" // Total grid feed in energy data updated // // Use `EnergyFeedIn` to get the current data // // Use Case MGCP, Scenario 3 - DataUpdateEnergyFeedIn api.EventType = "DataUpdateEnergyFeedIn" + DataUpdateEnergyFeedIn api.EventType = "ucmgcp-DataUpdateEnergyFeedIn" // Total grid consumed energy data updated // // Use `EnergyConsumed` to get the current data // // Use Case MGCP, Scenario 4 - DataUpdateEnergyConsumed api.EventType = "DataUpdateEnergyConsumed" + DataUpdateEnergyConsumed api.EventType = "ucmgcp-DataUpdateEnergyConsumed" // Phase specific momentary current consumption/production phase detail data updated // // Use `CurrentPerPhase` to get the current data // // Use Case MGCP, Scenario 5 - DataUpdateCurrentPerPhase api.EventType = "DataUpdateCurrentPerPhase" + DataUpdateCurrentPerPhase api.EventType = "ucmgcp-DataUpdateCurrentPerPhase" // Phase specific voltage at the grid connection point // // Use `VoltagePerPhase` to get the current data // // Use Case MGCP, Scenario 6 - DataUpdateVoltagePerPhase api.EventType = "DataUpdateVoltagePerPhase" + DataUpdateVoltagePerPhase api.EventType = "ucmgcp-DataUpdateVoltagePerPhase" // Grid frequency data updated // // Use `Frequency` to get the current data // // Use Case MGCP, Scenario 7 - DataUpdateFrequency api.EventType = "DataUpdateFrequency" + DataUpdateFrequency api.EventType = "ucmgcp-DataUpdateFrequency" ) diff --git a/ucmpc/types.go b/ucmpc/types.go index 1c5e01a..e6edc61 100644 --- a/ucmpc/types.go +++ b/ucmpc/types.go @@ -8,47 +8,47 @@ const ( // Use `Power` to get the current data // // Use Case MCP, Scenario 1 - DataUpdatePower api.EventType = "DataUpdatePower" + DataUpdatePower api.EventType = "ucmpc-DataUpdatePower" // Phase specific momentary active power consumption or production // // Use `PowerPerPhase` to get the current data // // Use Case MCP, Scenario 1 - DataUpdatePowerPerPhase api.EventType = "DataUpdatePowerPerPhase" + DataUpdatePowerPerPhase api.EventType = "ucmpc-DataUpdatePowerPerPhase" // Total energy consumed // // Use `EnergyConsumed` to get the current data // // Use Case MCP, Scenario 2 - DataUpdateEnergyConsumed api.EventType = "DataUpdateEnergyConsumed" + DataUpdateEnergyConsumed api.EventType = "ucmpc-DataUpdateEnergyConsumed" // Total energy produced // // Use `EnergyProduced` to get the current data // // Use Case MCP, Scenario 2 - DataUpdateEnergyProduced api.EventType = "DataUpdateEnergyProduced" + DataUpdateEnergyProduced api.EventType = "ucmpc-DataUpdateEnergyProduced" // Phase specific momentary current consumption or production // // Use `CurrentPerPhase` to get the current data // // Use Case MCP, Scenario 3 - DataUpdateCurrentsPerPhase api.EventType = "DataUpdateCurrentsPerPhase" + DataUpdateCurrentsPerPhase api.EventType = "ucmpc-DataUpdateCurrentsPerPhase" // Phase specific voltage // // Use `VoltagePerPhase` to get the current data // // Use Case MCP, Scenario 3 - DataUpdateVoltagePerPhase api.EventType = "DataUpdateVoltagePerPhase" + DataUpdateVoltagePerPhase api.EventType = "ucmpc-DataUpdateVoltagePerPhase" // Power network frequency data updated // // Use `Frequency` to get the current data // // Use Case MCP, Scenario 3 - DataUpdateFrequency api.EventType = "DataUpdateFrequency" + DataUpdateFrequency api.EventType = "ucmpc-DataUpdateFrequency" ) diff --git a/ucopev/types.go b/ucopev/types.go index 32eebe6..3955eee 100644 --- a/ucopev/types.go +++ b/ucopev/types.go @@ -6,10 +6,10 @@ const ( // EV current limits // // Use `CurrentLimits` to get the current data - DataUpdateCurrentLimits api.EventType = "DataUpdateCurrentLimits" + DataUpdateCurrentLimits api.EventType = "ucopev-DataUpdateCurrentLimits" // EV load control obligation limit data updated // // Use `LoadControlLimits` to get the current data - DataUpdateLimit api.EventType = "DataUpdateLimit" + DataUpdateLimit api.EventType = "ucopev-DataUpdateLimit" ) diff --git a/ucoscev/types.go b/ucoscev/types.go index fe79145..de1bc31 100644 --- a/ucoscev/types.go +++ b/ucoscev/types.go @@ -6,12 +6,12 @@ const ( // EV current limits // // Use `CurrentLimits` to get the current data - DataUpdateCurrentLimits api.EventType = "DataUpdateCurrentLimits" + DataUpdateCurrentLimits api.EventType = "ucoscev-DataUpdateCurrentLimits" // EV load control recommendation limit data updated // // Use `LoadControlLimits` to get the current data // // Use Case OSCEV, Scenario 1 - DataUpdateLimit api.EventType = "DataUpdateLimit" + DataUpdateLimit api.EventType = "ucoscev-DataUpdateLimit" ) diff --git a/ucvabd/types.go b/ucvabd/types.go index c93ddce..5cc85ce 100644 --- a/ucvabd/types.go +++ b/ucvabd/types.go @@ -8,26 +8,26 @@ const ( // Use `Power` to get the current data // // Use Case VABD, Scenario 1 - DataUpdatePower api.EventType = "d" + DataUpdatePower api.EventType = "ucvabd-DataUpdatePower" // Battery System cumulated charge energy data updated // // Use `EnergyCharged` to get the current data // // Use Case VABD, Scenario 2 - DataUpdateEnergyCharged api.EventType = "DataUpdateEnergyCharged" + DataUpdateEnergyCharged api.EventType = "ucvabd-DataUpdateEnergyCharged" // Battery System cumulated discharge energy data updated // // Use `EnergyDischarged` to get the current data // // Use Case VABD, Scenario 2 - DataUpdateEnergyDischarged api.EventType = "DataUpdateEnergyDischarged" + DataUpdateEnergyDischarged api.EventType = "ucvabd-DataUpdateEnergyDischarged" // Battery System state of charge data updated // // Use `StateOfCharge` to get the current data // // Use Case VABD, Scenario 4 - DataUpdateStateOfCharge api.EventType = "DataUpdateStateOfCharge" + DataUpdateStateOfCharge api.EventType = "ucvabd-DataUpdateStateOfCharge" ) diff --git a/ucvapd/types.go b/ucvapd/types.go index 52b01c0..1827a10 100644 --- a/ucvapd/types.go +++ b/ucvapd/types.go @@ -8,19 +8,19 @@ const ( // Use `Power` to get the current data // // Use Case VAPD, Scenario 1 - DataUpdatePower api.EventType = "DataUpdatePower" + DataUpdatePower api.EventType = "ucvapd-DataUpdatePower" // PV System nominal peak power data updated // // Use `PowerNominalPeak` to get the current data // // Use Case VAPD, Scenario 2 - DataUpdatePowerNominalPeak api.EventType = "DataUpdatePowerNominalPeak" + DataUpdatePowerNominalPeak api.EventType = "ucvapd-DataUpdatePowerNominalPeak" // PV System total yield data updated // // Use `PVYieldTotal` to get the current data // // Use Case VAPD, Scenario 3 - DataUpdatePVYieldTotal api.EventType = "DataUpdatePVYieldTotal" + DataUpdatePVYieldTotal api.EventType = "ucvapd-DataUpdatePVYieldTotal" )