diff --git a/ocpp1.6/types/types.go b/ocpp1.6/types/types.go index 1a00b2ba..c38f51e6 100644 --- a/ocpp1.6/types/types.go +++ b/ocpp1.6/types/types.go @@ -202,7 +202,7 @@ const ( MeasurandPowerReactiveExport Measurand = "Power.Reactive.Export" MeasurandPowerReactiveImport Measurand = "Power.Reactive.Import" MeasurandRPM Measurand = "RPM" - MeasueandSoC Measurand = "SoC" + MeasurandSoC Measurand = "SoC" MeasurandTemperature Measurand = "Temperature" MeasurandVoltage Measurand = "Voltage" PhaseL1 Phase = "L1" @@ -262,7 +262,7 @@ func isValidValueFormat(fl validator.FieldLevel) bool { func isValidMeasurand(fl validator.FieldLevel) bool { measurand := Measurand(fl.Field().String()) switch measurand { - case MeasueandSoC, MeasurandCurrentExport, MeasurandCurrentImport, MeasurandCurrentOffered, MeasurandEnergyActiveExportInterval, MeasurandEnergyActiveExportRegister, MeasurandEnergyReactiveExportInterval, MeasurandEnergyReactiveExportRegister, MeasurandEnergyReactiveImportRegister, MeasurandEnergyReactiveImportInterval, MeasurandEnergyActiveImportInterval, MeasurandEnergyActiveImportRegister, MeasurandFrequency, MeasurandPowerActiveExport, MeasurandPowerActiveImport, MeasurandPowerReactiveImport, MeasurandPowerReactiveExport, MeasurandPowerOffered, MeasurandPowerFactor, MeasurandVoltage, MeasurandTemperature, MeasurandRPM: + case MeasurandSoC, MeasurandCurrentExport, MeasurandCurrentImport, MeasurandCurrentOffered, MeasurandEnergyActiveExportInterval, MeasurandEnergyActiveExportRegister, MeasurandEnergyReactiveExportInterval, MeasurandEnergyReactiveExportRegister, MeasurandEnergyReactiveImportRegister, MeasurandEnergyReactiveImportInterval, MeasurandEnergyActiveImportInterval, MeasurandEnergyActiveImportRegister, MeasurandFrequency, MeasurandPowerActiveExport, MeasurandPowerActiveImport, MeasurandPowerReactiveImport, MeasurandPowerReactiveExport, MeasurandPowerOffered, MeasurandPowerFactor, MeasurandVoltage, MeasurandTemperature, MeasurandRPM: return true default: return false diff --git a/ocpp2.0.1/types/types.go b/ocpp2.0.1/types/types.go index 030a57af..7231e0b1 100644 --- a/ocpp2.0.1/types/types.go +++ b/ocpp2.0.1/types/types.go @@ -593,7 +593,7 @@ const ( MeasurandPowerOffered Measurand = "Power.Offered" MeasurandPowerReactiveExport Measurand = "Power.Reactive.Export" MeasurandPowerReactiveImport Measurand = "Power.Reactive.Import" - MeasueandSoC Measurand = "SoC" + MeasurandSoC Measurand = "SoC" MeasurandTemperature Measurand = "Temperature" MeasurandVoltage Measurand = "Voltage" PhaseL1 Phase = "L1" @@ -626,7 +626,7 @@ func isValidReadingContext(fl validator.FieldLevel) bool { func isValidMeasurand(fl validator.FieldLevel) bool { measurand := Measurand(fl.Field().String()) switch measurand { - case MeasueandSoC, MeasurandCurrentExport, MeasurandCurrentImport, MeasurandCurrentOffered, MeasurandEnergyActiveExportInterval, MeasurandEnergyActiveExportRegister, MeasurandEnergyReactiveExportInterval, MeasurandEnergyReactiveExportRegister, MeasurandEnergyReactiveImportRegister, MeasurandEnergyReactiveImportInterval, MeasurandEnergyActiveImportInterval, MeasurandEnergyActiveImportRegister, MeasurandFrequency, MeasurandPowerActiveExport, MeasurandPowerActiveImport, MeasurandPowerReactiveImport, MeasurandPowerReactiveExport, MeasurandPowerOffered, MeasurandPowerFactor, MeasurandVoltage, MeasurandTemperature, MeasurandEnergyActiveNet, MeasurandEnergyApparentNet, MeasurandEnergyReactiveNet, MeasurandEnergyApparentImport, MeasurandEnergyApparentExport: + case MeasurandSoC, MeasurandCurrentExport, MeasurandCurrentImport, MeasurandCurrentOffered, MeasurandEnergyActiveExportInterval, MeasurandEnergyActiveExportRegister, MeasurandEnergyReactiveExportInterval, MeasurandEnergyReactiveExportRegister, MeasurandEnergyReactiveImportRegister, MeasurandEnergyReactiveImportInterval, MeasurandEnergyActiveImportInterval, MeasurandEnergyActiveImportRegister, MeasurandFrequency, MeasurandPowerActiveExport, MeasurandPowerActiveImport, MeasurandPowerReactiveImport, MeasurandPowerReactiveExport, MeasurandPowerOffered, MeasurandPowerFactor, MeasurandVoltage, MeasurandTemperature, MeasurandEnergyActiveNet, MeasurandEnergyApparentNet, MeasurandEnergyReactiveNet, MeasurandEnergyApparentImport, MeasurandEnergyApparentExport: return true default: return false