Skip to content

Commit

Permalink
updated memebers + change log
Browse files Browse the repository at this point in the history
  • Loading branch information
Jared-Newell-Mobility committed Feb 6, 2024
1 parent 1fcc49d commit 2c823cf
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Change log

- [#599](https://github.com/mobilityhouse/ocpp/issues/599) v1.6 Action Enum members corrected
- [#564](https://github.com/mobilityhouse/ocpp/issues/564) Add support For Python 3.11 and 3.12
- [#583](https://github.com/mobilityhouse/ocpp/issues/583) OCPP v1.6/v2.0.1 deprecate dataclasses from calls and call results with the suffix 'Payload'

Expand Down
50 changes: 50 additions & 0 deletions ocpp/v16/enums.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from warnings import warn

try:
# breaking change introduced in python 3.11
from enum import StrEnum
Expand All @@ -11,6 +13,12 @@ class StrEnum(str, Enum): # pragma: no cover
class Action(StrEnum):
"""An Action is a required part of a Call message."""

def __init__(self, *args, **kwargs):
warn(
"Action enum contains deprecated members and will be removed in the next major release, please use snake case members."
)

# --------- Soon to be deprecated ---------------------
Authorize = "Authorize"
BootNotification = "BootNotification"
CancelReservation = "CancelReservation"
Expand Down Expand Up @@ -51,6 +59,48 @@ class Action(StrEnum):
UnlockConnector = "UnlockConnector"
UpdateFirmware = "UpdateFirmware"

# --------------------------------------------------------

authorize = "Authorize"
boot_notification = "BootNotification"
cancel_reservation = "CancelReservation"
certificate_signed = "CertificateSigned"
change_availability = "ChangeAvailability"
change_configuration = "ChangeConfiguration"
clear_cache = "ClearCache"
clear_charging_profile = "ClearChargingProfile"
data_transfer = "DataTransfer"
delete_certificate = "DeleteCertificate"
diagnostics_status_notification = "DiagnosticsStatusNotification"
extended_trigger_message = "ExtendedTriggerMessage"
firmware_status_notification = "FirmwareStatusNotification"
get_composite_schedule = "GetCompositeSchedule"
get_configuration = "GetConfiguration"
get_diagnostics = "GetDiagnostics"
get_installed_certificate_ids = "GetInstalledCertificateIds"
get_local_list_version = "GetLocalListVersion"
get_log = "GetLog"
heartbeat = "Heartbeat"
install_certificate = "InstallCertificate"
log_status_notification = "LogStatusNotification"
meter_values = "MeterValues"
remote_start_transaction = "RemoteStartTransaction"
remote_stop_transaction = "RemoteStopTransaction"
reserve_now = "ReserveNow"
reset = "Reset"
security_event_notification = "SecurityEventNotification"
send_local_list = "SendLocalList"
set_charging_profile = "SetChargingProfile"
sign_certificate = "SignCertificate"
signed_firmware_status_notification = "SignedFirmwareStatusNotification"
signed_update_firmware = "SignedUpdateFirmware"
start_transaction = "StartTransaction"
status_notification = "StatusNotification"
stop_transaction = "StopTransaction"
trigger_message = "TriggerMessage"
unlock_connector = "UnlockConnector"
update_firmware = "UpdateFirmware"


class AuthorizationStatus(StrEnum):
"""
Expand Down

0 comments on commit 2c823cf

Please sign in to comment.