Skip to content

Commit

Permalink
Merge branch 'master' into add_NotImplemented
Browse files Browse the repository at this point in the history
  • Loading branch information
OrangeTux authored Oct 31, 2023
2 parents adb185c + 02a532d commit 52c5985
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Change log


- [#381](https://github.com/mobilityhouse/ocpp/issues/381) FormatViolation serialization bug with OCPP 1.6-J

## 0.21.0 (2023-10-19)

- [#492] Minor fixes _handle_call doc string - Thanks @drc38
Expand Down
41 changes: 41 additions & 0 deletions ocpp/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,31 @@ class SecurityError(OCPPError):


class FormatViolationError(OCPPError):
"""
Not strict OCPP 1.6 - see FormationViolationError
Valid OCPP 2.0.1
"""

code = "FormatViolation"
default_description = (
"Payload for Action is syntactically incorrect or " "structure for Action"
)


class FormationViolationError(OCPPError):
"""
To allow for strict OCPP 1.6 compliance
5. Known issues that will not be fixed
5.2. Page 14, par 4.2.3. CallError: incorrect name in enum: FormationViolation
Incorrect name in enum: FormationViolation
"""

code = "FormationViolation"
default_description = (
"Payload for Action is syntactically incorrect or structure for Action"
)


class PropertyConstraintViolationError(OCPPError):
code = "PropertyConstraintViolation"
default_description = (
Expand All @@ -83,6 +102,14 @@ class PropertyConstraintViolationError(OCPPError):


class OccurenceConstraintViolationError(OCPPError):
"""
To allow for strict OCPP 1.6 compliance
ocpp-j-1.6-errata-sheet.pdf
5. Known issues that will not be fixed
5.1. Page 14, par 4.2.3: CallError: Typo in enum
Typo in enum: OccurenceConstraintViolation
"""

code = "OccurenceConstraintViolation"
default_description = (
"Payload for Action is syntactically correct but "
Expand All @@ -91,6 +118,20 @@ class OccurenceConstraintViolationError(OCPPError):
)


class OccurrenceConstraintViolationError(OCPPError):
"""
Not strict OCPP 1.6 - see OccurenceConstraintViolationError
Valid OCPP 2.0.1
"""

code = "OccurrenceConstraintViolation"
default_description = (
"Payload for Action is syntactically correct but "
"at least one of the fields violates occurence "
"constraints"
)


class TypeConstraintViolationError(OCPPError):
code = "TypeConstraintViolation"
default_description = (
Expand Down

0 comments on commit 52c5985

Please sign in to comment.