ocpp 2.1.0__tar.gz → 2.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (414) hide show
  1. {ocpp-2.1.0 → ocpp-2.2.0}/PKG-INFO +7 -6
  2. {ocpp-2.1.0 → ocpp-2.2.0}/README.rst +1 -1
  3. ocpp-2.2.0/ocpp/_types.py +12 -0
  4. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/charge_point.py +173 -36
  5. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/exceptions.py +21 -14
  6. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/messages.py +57 -23
  7. ocpp-2.2.0/ocpp/py.typed +0 -0
  8. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/routing.py +46 -22
  9. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/call.py +10 -10
  10. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/call_result.py +5 -5
  11. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/datatypes.py +1 -1
  12. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/enums.py +8 -6
  13. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/datatypes.py +0 -34
  14. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/enums.py +10 -8
  15. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/AuthorizeRequest.json +0 -0
  16. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/AuthorizeResponse.json +0 -0
  17. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/BootNotificationRequest.json +0 -0
  18. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/BootNotificationResponse.json +0 -0
  19. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/CancelReservationRequest.json +0 -0
  20. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/CancelReservationResponse.json +0 -0
  21. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/CertificateSignedRequest.json +0 -0
  22. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/CertificateSignedResponse.json +0 -0
  23. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/ChangeAvailabilityRequest.json +0 -0
  24. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/ChangeAvailabilityResponse.json +0 -0
  25. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/ClearCacheRequest.json +0 -0
  26. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/ClearCacheResponse.json +0 -0
  27. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/ClearChargingProfileRequest.json +0 -0
  28. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/ClearChargingProfileResponse.json +0 -0
  29. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/ClearDisplayMessageRequest.json +0 -0
  30. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/ClearDisplayMessageResponse.json +0 -0
  31. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/ClearVariableMonitoringRequest.json +0 -0
  32. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/ClearVariableMonitoringResponse.json +0 -0
  33. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/ClearedChargingLimitRequest.json +0 -0
  34. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/ClearedChargingLimitResponse.json +0 -0
  35. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/CostUpdatedRequest.json +0 -0
  36. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/CostUpdatedResponse.json +0 -0
  37. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/CustomerInformationRequest.json +0 -0
  38. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/CustomerInformationResponse.json +0 -0
  39. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/DataTransferRequest.json +0 -0
  40. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/DataTransferResponse.json +0 -0
  41. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/DeleteCertificateRequest.json +0 -0
  42. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/DeleteCertificateResponse.json +0 -0
  43. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/FirmwareStatusNotificationRequest.json +0 -0
  44. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/FirmwareStatusNotificationResponse.json +0 -0
  45. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/Get15118EVCertificateRequest.json +0 -0
  46. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/Get15118EVCertificateResponse.json +0 -0
  47. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/GetBaseReportRequest.json +0 -0
  48. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/GetBaseReportResponse.json +0 -0
  49. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/GetCertificateStatusRequest.json +0 -0
  50. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/GetCertificateStatusResponse.json +0 -0
  51. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/GetChargingProfilesRequest.json +0 -0
  52. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/GetChargingProfilesResponse.json +0 -0
  53. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/GetCompositeScheduleRequest.json +0 -0
  54. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/GetCompositeScheduleResponse.json +0 -0
  55. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/GetDisplayMessagesRequest.json +0 -0
  56. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/GetDisplayMessagesResponse.json +0 -0
  57. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/GetInstalledCertificateIdsRequest.json +0 -0
  58. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/GetInstalledCertificateIdsResponse.json +0 -0
  59. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/GetLocalListVersionRequest.json +0 -0
  60. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/GetLocalListVersionResponse.json +0 -0
  61. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/GetLogRequest.json +0 -0
  62. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/GetLogResponse.json +0 -0
  63. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/GetMonitoringReportRequest.json +0 -0
  64. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/GetMonitoringReportResponse.json +0 -0
  65. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/GetReportRequest.json +0 -0
  66. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/GetReportResponse.json +0 -0
  67. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/GetTransactionStatusRequest.json +0 -0
  68. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/GetTransactionStatusResponse.json +0 -0
  69. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/GetVariablesRequest.json +0 -0
  70. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/GetVariablesResponse.json +0 -0
  71. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/HeartbeatRequest.json +0 -0
  72. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/HeartbeatResponse.json +0 -0
  73. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/InstallCertificateRequest.json +0 -0
  74. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/InstallCertificateResponse.json +0 -0
  75. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/LogStatusNotificationRequest.json +0 -0
  76. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/LogStatusNotificationResponse.json +0 -0
  77. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/MeterValuesRequest.json +0 -0
  78. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/MeterValuesResponse.json +0 -0
  79. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/NotifyChargingLimitRequest.json +0 -0
  80. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/NotifyChargingLimitResponse.json +0 -0
  81. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/NotifyCustomerInformationRequest.json +0 -0
  82. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/NotifyCustomerInformationResponse.json +0 -0
  83. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/NotifyDisplayMessagesRequest.json +0 -0
  84. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/NotifyDisplayMessagesResponse.json +0 -0
  85. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/NotifyEVChargingNeedsRequest.json +0 -0
  86. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/NotifyEVChargingNeedsResponse.json +0 -0
  87. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/NotifyEVChargingScheduleRequest.json +0 -0
  88. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/NotifyEVChargingScheduleResponse.json +0 -0
  89. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/NotifyEventRequest.json +0 -0
  90. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/NotifyEventResponse.json +0 -0
  91. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/NotifyMonitoringReportRequest.json +0 -0
  92. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/NotifyMonitoringReportResponse.json +0 -0
  93. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/NotifyReportRequest.json +0 -0
  94. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/NotifyReportResponse.json +0 -0
  95. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/PublishFirmwareRequest.json +0 -0
  96. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/PublishFirmwareResponse.json +0 -0
  97. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/PublishFirmwareStatusNotificationRequest.json +0 -0
  98. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/PublishFirmwareStatusNotificationResponse.json +0 -0
  99. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/ReportChargingProfilesRequest.json +0 -0
  100. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/ReportChargingProfilesResponse.json +0 -0
  101. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/RequestStartTransactionRequest.json +0 -0
  102. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/RequestStartTransactionResponse.json +0 -0
  103. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/RequestStopTransactionRequest.json +0 -0
  104. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/RequestStopTransactionResponse.json +0 -0
  105. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/ReservationStatusUpdateRequest.json +0 -0
  106. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/ReservationStatusUpdateResponse.json +0 -0
  107. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/ReserveNowRequest.json +0 -0
  108. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/ReserveNowResponse.json +0 -0
  109. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/ResetRequest.json +0 -0
  110. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/ResetResponse.json +0 -0
  111. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/SecurityEventNotificationRequest.json +0 -0
  112. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/SecurityEventNotificationResponse.json +0 -0
  113. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/SendLocalListRequest.json +0 -0
  114. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/SendLocalListResponse.json +0 -0
  115. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/SetChargingProfileRequest.json +0 -0
  116. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/SetChargingProfileResponse.json +0 -0
  117. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/SetDisplayMessageRequest.json +0 -0
  118. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/SetDisplayMessageResponse.json +0 -0
  119. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/SetMonitoringBaseRequest.json +0 -0
  120. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/SetMonitoringBaseResponse.json +0 -0
  121. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/SetMonitoringLevelRequest.json +0 -0
  122. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/SetMonitoringLevelResponse.json +0 -0
  123. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/SetNetworkProfileRequest.json +0 -0
  124. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/SetNetworkProfileResponse.json +0 -0
  125. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/SetVariableMonitoringRequest.json +0 -0
  126. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/SetVariableMonitoringResponse.json +0 -0
  127. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/SetVariablesRequest.json +0 -0
  128. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/SetVariablesResponse.json +0 -0
  129. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/SignCertificateRequest.json +0 -0
  130. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/SignCertificateResponse.json +0 -0
  131. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/StatusNotificationRequest.json +0 -0
  132. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/StatusNotificationResponse.json +0 -0
  133. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/TransactionEventRequest.json +0 -0
  134. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/TransactionEventResponse.json +0 -0
  135. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/TriggerMessageRequest.json +0 -0
  136. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/TriggerMessageResponse.json +0 -0
  137. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/UnlockConnectorRequest.json +0 -0
  138. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/UnlockConnectorResponse.json +0 -0
  139. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/UnpublishFirmwareRequest.json +0 -0
  140. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/UnpublishFirmwareResponse.json +0 -0
  141. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/UpdateFirmwareRequest.json +0 -0
  142. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/schemas/UpdateFirmwareResponse.json +0 -0
  143. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/call.py +1 -1
  144. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/enums.py +8 -6
  145. {ocpp-2.1.0 → ocpp-2.2.0}/pyproject.toml +14 -6
  146. {ocpp-2.1.0 → ocpp-2.2.0}/LICENSE +0 -0
  147. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/__init__.py +0 -0
  148. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/experimental/v21/README.rst +0 -0
  149. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/__init__.py +0 -0
  150. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/Authorize.json +0 -0
  151. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/AuthorizeResponse.json +0 -0
  152. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/BootNotification.json +0 -0
  153. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/BootNotificationResponse.json +0 -0
  154. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/CancelReservation.json +0 -0
  155. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/CancelReservationResponse.json +0 -0
  156. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/CertificateSigned.json +0 -0
  157. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/CertificateSignedResponse.json +0 -0
  158. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/ChangeAvailability.json +0 -0
  159. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/ChangeAvailabilityResponse.json +0 -0
  160. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/ChangeConfiguration.json +0 -0
  161. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/ChangeConfigurationResponse.json +0 -0
  162. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/ClearCache.json +0 -0
  163. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/ClearCacheResponse.json +0 -0
  164. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/ClearChargingProfile.json +0 -0
  165. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/ClearChargingProfileResponse.json +0 -0
  166. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/DataTransfer.json +0 -0
  167. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/DataTransferResponse.json +0 -0
  168. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/DeleteCertificate.json +0 -0
  169. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/DeleteCertificateResponse.json +0 -0
  170. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/DiagnosticsStatusNotification.json +0 -0
  171. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/DiagnosticsStatusNotificationResponse.json +0 -0
  172. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/ExtendedTriggerMessage.json +0 -0
  173. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/ExtendedTriggerMessageResponse.json +0 -0
  174. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/FirmwareStatusNotification.json +0 -0
  175. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/FirmwareStatusNotificationResponse.json +0 -0
  176. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/GetCompositeSchedule.json +0 -0
  177. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/GetCompositeScheduleResponse.json +0 -0
  178. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/GetConfiguration.json +0 -0
  179. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/GetConfigurationResponse.json +0 -0
  180. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/GetDiagnostics.json +0 -0
  181. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/GetDiagnosticsResponse.json +0 -0
  182. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/GetInstalledCertificateIds.json +0 -0
  183. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/GetInstalledCertificateIdsResponse.json +0 -0
  184. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/GetLocalListVersion.json +0 -0
  185. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/GetLocalListVersionResponse.json +0 -0
  186. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/GetLog.json +0 -0
  187. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/GetLogResponse.json +0 -0
  188. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/Heartbeat.json +0 -0
  189. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/HeartbeatResponse.json +0 -0
  190. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/InstallCertificate.json +0 -0
  191. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/InstallCertificateResponse.json +0 -0
  192. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/LogStatusNotification.json +0 -0
  193. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/LogStatusNotificationResponse.json +0 -0
  194. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/MeterValues.json +0 -0
  195. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/MeterValuesResponse.json +0 -0
  196. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/RemoteStartTransaction.json +0 -0
  197. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/RemoteStartTransactionResponse.json +0 -0
  198. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/RemoteStopTransaction.json +0 -0
  199. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/RemoteStopTransactionResponse.json +0 -0
  200. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/ReserveNow.json +0 -0
  201. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/ReserveNowResponse.json +0 -0
  202. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/Reset.json +0 -0
  203. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/ResetResponse.json +0 -0
  204. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/SecurityEventNotification.json +0 -0
  205. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/SecurityEventNotificationResponse.json +0 -0
  206. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/SendLocalList.json +0 -0
  207. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/SendLocalListResponse.json +0 -0
  208. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/SetChargingProfile.json +0 -0
  209. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/SetChargingProfileResponse.json +0 -0
  210. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/SignCertificate.json +0 -0
  211. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/SignCertificateResponse.json +0 -0
  212. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/SignedFirmwareStatusNotification.json +0 -0
  213. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/SignedFirmwareStatusNotificationResponse.json +0 -0
  214. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/SignedUpdateFirmware.json +0 -0
  215. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/SignedUpdateFirmwareResponse.json +0 -0
  216. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/StartTransaction.json +0 -0
  217. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/StartTransactionResponse.json +0 -0
  218. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/StatusNotification.json +0 -0
  219. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/StatusNotificationResponse.json +0 -0
  220. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/StopTransaction.json +0 -0
  221. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/StopTransactionResponse.json +0 -0
  222. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/TriggerMessage.json +0 -0
  223. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/TriggerMessageResponse.json +0 -0
  224. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/UnlockConnector.json +0 -0
  225. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/UnlockConnectorResponse.json +0 -0
  226. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/UpdateFirmware.json +0 -0
  227. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v16/schemas/UpdateFirmwareResponse.json +0 -0
  228. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/__init__.py +0 -0
  229. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/call.py +0 -0
  230. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v201/call_result.py +0 -0
  231. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/__init__.py +0 -0
  232. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/call_result.py +0 -0
  233. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/datatypes.py +0 -0
  234. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/AFRRSignalRequest.json +0 -0
  235. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/AFRRSignalResponse.json +0 -0
  236. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/AdjustPeriodicEventStreamRequest.json +0 -0
  237. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/AdjustPeriodicEventStreamResponse.json +0 -0
  238. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/AuthorizeRequest.json +0 -0
  239. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/AuthorizeResponse.json +0 -0
  240. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/BatterySwapRequest.json +0 -0
  241. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/BatterySwapResponse.json +0 -0
  242. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/BootNotificationRequest.json +0 -0
  243. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/BootNotificationResponse.json +0 -0
  244. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/CancelReservationRequest.json +0 -0
  245. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/CancelReservationResponse.json +0 -0
  246. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/CertificateSignedRequest.json +0 -0
  247. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/CertificateSignedResponse.json +0 -0
  248. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/ChangeAvailabilityRequest.json +0 -0
  249. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/ChangeAvailabilityResponse.json +0 -0
  250. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/ChangeTransactionTariffRequest.json +0 -0
  251. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/ChangeTransactionTariffResponse.json +0 -0
  252. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/ClearCacheRequest.json +0 -0
  253. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/ClearCacheResponse.json +0 -0
  254. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/ClearChargingProfileRequest.json +0 -0
  255. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/ClearChargingProfileResponse.json +0 -0
  256. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/ClearDERControlRequest.json +0 -0
  257. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/ClearDERControlResponse.json +0 -0
  258. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/ClearDisplayMessageRequest.json +0 -0
  259. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/ClearDisplayMessageResponse.json +0 -0
  260. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/ClearTariffsRequest.json +0 -0
  261. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/ClearTariffsResponse.json +0 -0
  262. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/ClearVariableMonitoringRequest.json +0 -0
  263. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/ClearVariableMonitoringResponse.json +0 -0
  264. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/ClearedChargingLimitRequest.json +0 -0
  265. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/ClearedChargingLimitResponse.json +0 -0
  266. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/ClosePeriodicEventStreamRequest.json +0 -0
  267. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/ClosePeriodicEventStreamResponse.json +0 -0
  268. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/CostUpdatedRequest.json +0 -0
  269. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/CostUpdatedResponse.json +0 -0
  270. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/CustomerInformationRequest.json +0 -0
  271. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/CustomerInformationResponse.json +0 -0
  272. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/DataTransferRequest.json +0 -0
  273. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/DataTransferResponse.json +0 -0
  274. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/DeleteCertificateRequest.json +0 -0
  275. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/DeleteCertificateResponse.json +0 -0
  276. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/FirmwareStatusNotificationRequest.json +0 -0
  277. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/FirmwareStatusNotificationResponse.json +0 -0
  278. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/Get15118EVCertificateRequest.json +0 -0
  279. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/Get15118EVCertificateResponse.json +0 -0
  280. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/GetBaseReportRequest.json +0 -0
  281. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/GetBaseReportResponse.json +0 -0
  282. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/GetCertificateChainStatusRequest.json +0 -0
  283. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/GetCertificateChainStatusResponse.json +0 -0
  284. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/GetCertificateStatusRequest.json +0 -0
  285. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/GetCertificateStatusResponse.json +0 -0
  286. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/GetChargingProfilesRequest.json +0 -0
  287. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/GetChargingProfilesResponse.json +0 -0
  288. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/GetCompositeScheduleRequest.json +0 -0
  289. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/GetCompositeScheduleResponse.json +0 -0
  290. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/GetDERControlRequest.json +0 -0
  291. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/GetDERControlResponse.json +0 -0
  292. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/GetDisplayMessagesRequest.json +0 -0
  293. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/GetDisplayMessagesResponse.json +0 -0
  294. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/GetInstalledCertificateIdsRequest.json +0 -0
  295. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/GetInstalledCertificateIdsResponse.json +0 -0
  296. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/GetLocalListVersionRequest.json +0 -0
  297. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/GetLocalListVersionResponse.json +0 -0
  298. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/GetLogRequest.json +0 -0
  299. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/GetLogResponse.json +0 -0
  300. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/GetMonitoringReportRequest.json +0 -0
  301. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/GetMonitoringReportResponse.json +0 -0
  302. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/GetPeriodicEventStreamRequest.json +0 -0
  303. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/GetPeriodicEventStreamResponse.json +0 -0
  304. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/GetReportRequest.json +0 -0
  305. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/GetReportResponse.json +0 -0
  306. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/GetTariffsRequest.json +0 -0
  307. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/GetTariffsResponse.json +0 -0
  308. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/GetTransactionStatusRequest.json +0 -0
  309. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/GetTransactionStatusResponse.json +0 -0
  310. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/GetVariablesRequest.json +0 -0
  311. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/GetVariablesResponse.json +0 -0
  312. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/HeartbeatRequest.json +0 -0
  313. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/HeartbeatResponse.json +0 -0
  314. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/InstallCertificateRequest.json +0 -0
  315. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/InstallCertificateResponse.json +0 -0
  316. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/LogStatusNotificationRequest.json +0 -0
  317. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/LogStatusNotificationResponse.json +0 -0
  318. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/MeterValuesRequest.json +0 -0
  319. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/MeterValuesResponse.json +0 -0
  320. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/NotifyAllowedEnergyTransferRequest.json +0 -0
  321. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/NotifyAllowedEnergyTransferResponse.json +0 -0
  322. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/NotifyChargingLimitRequest.json +0 -0
  323. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/NotifyChargingLimitResponse.json +0 -0
  324. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/NotifyCustomerInformationRequest.json +0 -0
  325. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/NotifyCustomerInformationResponse.json +0 -0
  326. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/NotifyDERAlarmRequest.json +0 -0
  327. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/NotifyDERAlarmResponse.json +0 -0
  328. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/NotifyDERStartStopRequest.json +0 -0
  329. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/NotifyDERStartStopResponse.json +0 -0
  330. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/NotifyDisplayMessagesRequest.json +0 -0
  331. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/NotifyDisplayMessagesResponse.json +0 -0
  332. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/NotifyEVChargingNeedsRequest.json +0 -0
  333. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/NotifyEVChargingNeedsResponse.json +0 -0
  334. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/NotifyEVChargingScheduleRequest.json +0 -0
  335. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/NotifyEVChargingScheduleResponse.json +0 -0
  336. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/NotifyEventRequest.json +0 -0
  337. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/NotifyEventResponse.json +0 -0
  338. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/NotifyMonitoringReportRequest.json +0 -0
  339. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/NotifyMonitoringReportResponse.json +0 -0
  340. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/NotifyPeriodicEventStream.json +0 -0
  341. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/NotifyPriorityChargingRequest.json +0 -0
  342. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/NotifyPriorityChargingResponse.json +0 -0
  343. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/NotifyReportRequest.json +0 -0
  344. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/NotifyReportResponse.json +0 -0
  345. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/NotifySettlementRequest.json +0 -0
  346. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/NotifySettlementResponse.json +0 -0
  347. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/NotifyWebPaymentStartedRequest.json +0 -0
  348. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/NotifyWebPaymentStartedResponse.json +0 -0
  349. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/OpenPeriodicEventStreamRequest.json +0 -0
  350. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/OpenPeriodicEventStreamResponse.json +0 -0
  351. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/PublishFirmwareRequest.json +0 -0
  352. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/PublishFirmwareResponse.json +0 -0
  353. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/PublishFirmwareStatusNotificationRequest.json +0 -0
  354. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/PublishFirmwareStatusNotificationResponse.json +0 -0
  355. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/PullDynamicScheduleUpdateRequest.json +0 -0
  356. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/PullDynamicScheduleUpdateResponse.json +0 -0
  357. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/ReportChargingProfilesRequest.json +0 -0
  358. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/ReportChargingProfilesResponse.json +0 -0
  359. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/ReportDERControlRequest.json +0 -0
  360. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/ReportDERControlResponse.json +0 -0
  361. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/RequestBatterySwapRequest.json +0 -0
  362. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/RequestBatterySwapResponse.json +0 -0
  363. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/RequestStartTransactionRequest.json +0 -0
  364. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/RequestStartTransactionResponse.json +0 -0
  365. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/RequestStopTransactionRequest.json +0 -0
  366. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/RequestStopTransactionResponse.json +0 -0
  367. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/ReservationStatusUpdateRequest.json +0 -0
  368. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/ReservationStatusUpdateResponse.json +0 -0
  369. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/ReserveNowRequest.json +0 -0
  370. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/ReserveNowResponse.json +0 -0
  371. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/ResetRequest.json +0 -0
  372. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/ResetResponse.json +0 -0
  373. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/SecurityEventNotificationRequest.json +0 -0
  374. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/SecurityEventNotificationResponse.json +0 -0
  375. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/SendLocalListRequest.json +0 -0
  376. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/SendLocalListResponse.json +0 -0
  377. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/SetChargingProfileRequest.json +0 -0
  378. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/SetChargingProfileResponse.json +0 -0
  379. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/SetDERControlRequest.json +0 -0
  380. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/SetDERControlResponse.json +0 -0
  381. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/SetDefaultTariffRequest.json +0 -0
  382. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/SetDefaultTariffResponse.json +0 -0
  383. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/SetDisplayMessageRequest.json +0 -0
  384. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/SetDisplayMessageResponse.json +0 -0
  385. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/SetMonitoringBaseRequest.json +0 -0
  386. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/SetMonitoringBaseResponse.json +0 -0
  387. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/SetMonitoringLevelRequest.json +0 -0
  388. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/SetMonitoringLevelResponse.json +0 -0
  389. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/SetNetworkProfileRequest.json +0 -0
  390. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/SetNetworkProfileResponse.json +0 -0
  391. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/SetVariableMonitoringRequest.json +0 -0
  392. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/SetVariableMonitoringResponse.json +0 -0
  393. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/SetVariablesRequest.json +0 -0
  394. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/SetVariablesResponse.json +0 -0
  395. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/SignCertificateRequest.json +0 -0
  396. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/SignCertificateResponse.json +0 -0
  397. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/StatusNotificationRequest.json +0 -0
  398. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/StatusNotificationResponse.json +0 -0
  399. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/TransactionEventRequest.json +0 -0
  400. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/TransactionEventResponse.json +0 -0
  401. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/TriggerMessageRequest.json +0 -0
  402. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/TriggerMessageResponse.json +0 -0
  403. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/UnlockConnectorRequest.json +0 -0
  404. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/UnlockConnectorResponse.json +0 -0
  405. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/UnpublishFirmwareRequest.json +0 -0
  406. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/UnpublishFirmwareResponse.json +0 -0
  407. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/UpdateDynamicScheduleRequest.json +0 -0
  408. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/UpdateDynamicScheduleResponse.json +0 -0
  409. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/UpdateFirmwareRequest.json +0 -0
  410. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/UpdateFirmwareResponse.json +0 -0
  411. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/UsePriorityChargingRequest.json +0 -0
  412. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/UsePriorityChargingResponse.json +0 -0
  413. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/VatNumberValidationRequest.json +0 -0
  414. {ocpp-2.1.0 → ocpp-2.2.0}/ocpp/v21/schemas/VatNumberValidationResponse.json +0 -0
@@ -1,8 +1,9 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: ocpp
3
- Version: 2.1.0
3
+ Version: 2.2.0
4
4
  Summary: Python package implementing the JSON version of the Open Charge Point Protocol (OCPP).
5
5
  License: MIT
6
+ License-File: LICENSE
6
7
  Author: André Duarte
7
8
  Author-email: andre15x@gmail.com
8
9
  Requires-Python: >=3.11,<4.0
@@ -12,9 +13,9 @@ Classifier: Programming Language :: Python :: 3
12
13
  Classifier: Programming Language :: Python :: 3.11
13
14
  Classifier: Programming Language :: Python :: 3.12
14
15
  Classifier: Programming Language :: Python :: 3.13
15
- Classifier: Programming Language :: Python :: 3.10
16
- Classifier: Programming Language :: Python :: 3.8
17
- Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.14
17
+ Classifier: Programming Language :: Python :: 3.15
18
+ Classifier: Programming Language :: Python :: 3 :: Only
18
19
  Requires-Dist: jsonschema (>=4.23.0,<5.0.0)
19
20
  Project-URL: Documentation, https://ocpp.readthedocs.io/en/latest/
20
21
  Project-URL: Repository, https://github.com/mobilityhouse/ocpp
@@ -34,7 +35,7 @@ OCPP
34
35
 
35
36
  Python package implementing the JSON version of the Open Charge Point Protocol
36
37
  (OCPP). Currently OCPP 1.6 (errata v4), OCPP 2.0.1 (Edition 2 FINAL, 2022-12-15 and Edition 3 errata 2024-11)
37
- are supported.
38
+ and OCPP 2.1 are supported.
38
39
 
39
40
  Installation
40
41
  ------------
@@ -12,7 +12,7 @@ OCPP
12
12
 
13
13
  Python package implementing the JSON version of the Open Charge Point Protocol
14
14
  (OCPP). Currently OCPP 1.6 (errata v4), OCPP 2.0.1 (Edition 2 FINAL, 2022-12-15 and Edition 3 errata 2024-11)
15
- are supported.
15
+ and OCPP 2.1 are supported.
16
16
 
17
17
  Installation
18
18
  ------------
@@ -0,0 +1,12 @@
1
+ from typing import Any, Callable, Literal, TypedDict
2
+
3
+ OCPPVersion = Literal["1.6", "2.0", "2.0.1", "2.1"]
4
+
5
+
6
+ Handler = Callable[..., Any]
7
+
8
+
9
+ class Route(TypedDict, total=False):
10
+ _on_action: Handler
11
+ _after_action: Handler
12
+ _skip_schema_validation: bool
@@ -1,3 +1,5 @@
1
+ from __future__ import annotations
2
+
1
3
  import asyncio
2
4
  import inspect
3
5
  import logging
@@ -5,16 +7,106 @@ import re
5
7
  import time
6
8
  import uuid
7
9
  from dataclasses import Field, asdict, is_dataclass
8
- from typing import Any, Dict, List, Union, get_args, get_origin
9
-
10
+ from types import ModuleType
11
+ from typing import (
12
+ TYPE_CHECKING,
13
+ Any,
14
+ Callable,
15
+ Dict,
16
+ List,
17
+ NoReturn,
18
+ Optional,
19
+ Protocol,
20
+ TypeGuard,
21
+ Union,
22
+ get_args,
23
+ get_origin,
24
+ overload,
25
+ )
26
+ from urllib.parse import urlparse
27
+
28
+ from ocpp._types import OCPPVersion, Route
10
29
  from ocpp.exceptions import NotImplementedError, NotSupportedError, OCPPError
11
- from ocpp.messages import Call, MessageType, unpack, validate_payload
30
+ from ocpp.messages import (
31
+ Call,
32
+ CallError,
33
+ CallResult,
34
+ MessageType,
35
+ unpack,
36
+ validate_payload,
37
+ )
12
38
  from ocpp.routing import create_route_map
13
39
 
40
+ if TYPE_CHECKING:
41
+ from _typeshed import DataclassInstance
42
+
43
+
14
44
  LOGGER = logging.getLogger("ocpp")
15
45
 
16
46
 
17
- def camel_to_snake_case(data):
47
+ class WebSocket(Protocol):
48
+ async def recv(self) -> Union[str, bytes]: ...
49
+ async def send(self, payload: Any) -> None: ...
50
+
51
+
52
+ def extract_charge_point_id(path: Optional[str]) -> Optional[str]:
53
+ """Extract the charge point ID from a WebSocket URL path.
54
+
55
+ In OCPP, chargers connect to a WebSocket endpoint and include their
56
+ identity as the last segment of the URL path. For example, a charger
57
+ with ID "CP001" would connect to ``ws://central-system:9000/CP001``
58
+ or ``ws://central-system:9000/ocpp/CP001``.
59
+
60
+ This function handles various path formats robustly:
61
+
62
+ - ``/CP001`` → ``CP001``
63
+ - ``/ocpp/CP001`` → ``CP001``
64
+ - ``/`` → ``None``
65
+ - ``""`` → ``None``
66
+
67
+ Args:
68
+ path: The URL path from the WebSocket request
69
+ (e.g., ``websocket.request.path``).
70
+
71
+ Returns:
72
+ The charge point ID string, or ``None`` if the path does not
73
+ contain a valid identifier.
74
+ """
75
+ if not path:
76
+ return None
77
+
78
+ # Strip query strings and fragments, then get the path
79
+ parsed = urlparse(path)
80
+ clean_path = parsed.path
81
+
82
+ # Take the last non-empty segment as the charge point ID
83
+ segments = [s for s in clean_path.split("/") if s]
84
+ if not segments:
85
+ return None
86
+
87
+ charge_point_id = segments[-1]
88
+
89
+ # Validate: ID should not be empty after stripping whitespace
90
+ charge_point_id = charge_point_id.strip()
91
+ if not charge_point_id:
92
+ return None
93
+
94
+ return charge_point_id
95
+
96
+
97
+ @overload
98
+ def camel_to_snake_case(data: Dict[str, Any]) -> Dict[str, Any]: ...
99
+
100
+
101
+ @overload
102
+ def camel_to_snake_case(data: List[Any]) -> List[Any]: ...
103
+
104
+
105
+ @overload
106
+ def camel_to_snake_case(data: DataclassInstance) -> Dict[str, Any]: ...
107
+
108
+
109
+ def camel_to_snake_case(data: Any) -> Any:
18
110
  """
19
111
  Convert all keys of all dictionaries inside the given argument from
20
112
  camelCase to snake_case.
@@ -44,7 +136,17 @@ def camel_to_snake_case(data):
44
136
  return data
45
137
 
46
138
 
47
- def snake_to_camel_case(data):
139
+ @overload
140
+ def snake_to_camel_case(data: Dict[str, Any]) -> Dict[str, Any]: ...
141
+
142
+
143
+ @overload
144
+ def snake_to_camel_case(data: List[Any]) -> List[Any]: ...
145
+
146
+
147
+ def snake_to_camel_case(
148
+ data: Union[Dict[str, Any], List[Any]],
149
+ ) -> Union[Dict[str, Any], List[Any]]:
48
150
  """
49
151
  Convert all keys of all dictionaries inside given argument from
50
152
  snake_case to camelCase.
@@ -59,6 +161,7 @@ def snake_to_camel_case(data):
59
161
  # The spec uses inconsent casing for "csms" and "url".
60
162
  # E.g. "OcppCsmsUrl" vs "ResponderURL" and "CSMSRootCertificate"
61
163
  key = key.replace("ocpp_csms_url", "ocppCsmsUrl")
164
+ key = key.replace("receipt_url", "receiptUrl")
62
165
  key = key.replace("csms", "CSMS")
63
166
  key = key.replace("_url", "URL")
64
167
  key = key.replace("soc", "SoC").replace("_SoCket", "Socket")
@@ -81,12 +184,12 @@ def snake_to_camel_case(data):
81
184
  return data
82
185
 
83
186
 
84
- def _is_dataclass_instance(input: Any) -> bool:
187
+ def _is_dataclass_instance(input: Any) -> TypeGuard[DataclassInstance]:
85
188
  """Verify if given `input` is a dataclass."""
86
189
  return is_dataclass(input) and not isinstance(input, type)
87
190
 
88
191
 
89
- def _is_optional_field(field: Field) -> bool:
192
+ def _is_optional_field(field: Field[Any]) -> bool:
90
193
  """Verify if given `field` allows `None` as value.
91
194
 
92
195
  The fields `schema` and `host` on the following class would return `False`.
@@ -103,7 +206,7 @@ def _is_optional_field(field: Field) -> bool:
103
206
  return get_origin(field.type) is Union and type(None) in get_args(field.type)
104
207
 
105
208
 
106
- def serialize_as_dict(dataclass):
209
+ def serialize_as_dict(dataclass: DataclassInstance) -> Dict[str, Any]:
107
210
  """Serialize the given `dataclass` as a `dict` recursively.
108
211
 
109
212
  @dataclass
@@ -148,7 +251,17 @@ def serialize_as_dict(dataclass):
148
251
  return serialized
149
252
 
150
253
 
151
- def remove_nones(data: Union[List, Dict]) -> Union[List, Dict]:
254
+ @overload
255
+ def remove_nones(data: List[Any]) -> List[Any]: ...
256
+
257
+
258
+ @overload
259
+ def remove_nones(data: Dict[str, Any]) -> Dict[str, Any]: ...
260
+
261
+
262
+ def remove_nones(
263
+ data: Union[List[Any], Dict[str, Any]],
264
+ ) -> Union[List[Any], Dict[str, Any]]:
152
265
  if isinstance(data, dict):
153
266
  return {k: remove_nones(v) for k, v in data.items() if v is not None}
154
267
 
@@ -158,7 +271,7 @@ def remove_nones(data: Union[List, Dict]) -> Union[List, Dict]:
158
271
  return data
159
272
 
160
273
 
161
- def _raise_key_error(action, version):
274
+ def _raise_key_error(action: str, version: OCPPVersion) -> NoReturn | None:
162
275
  """
163
276
  Checks whether a keyerror returned by _handle_call
164
277
  is supported by the OCPP version or is simply
@@ -179,7 +292,7 @@ def _raise_key_error(action, version):
179
292
  raise NotSupportedError(
180
293
  details={"cause": f"{action} not supported by OCPP{version}."}
181
294
  )
182
- elif version in ["2.0", "2.0.1"]:
295
+ elif version in ["2.0", "2.0.1", "2.1"]:
183
296
  try:
184
297
  v201_Action(action)
185
298
  raise NotImplementedError(
@@ -190,7 +303,7 @@ def _raise_key_error(action, version):
190
303
  details={"cause": f"{action} not supported by OCPP{version}."}
191
304
  )
192
305
 
193
- return
306
+ return None
194
307
 
195
308
 
196
309
  class ChargePoint:
@@ -199,14 +312,24 @@ class ChargePoint:
199
312
  initiated and received by the Central System
200
313
  """
201
314
 
202
- def __init__(self, id, connection, response_timeout=30, logger=LOGGER):
315
+ _call: ModuleType
316
+ _call_result: ModuleType
317
+ _ocpp_version: OCPPVersion
318
+
319
+ def __init__(
320
+ self,
321
+ id: str,
322
+ connection: WebSocket,
323
+ response_timeout: float = 30.0,
324
+ logger: logging.Logger = LOGGER,
325
+ ):
203
326
  """
204
327
 
205
328
  Args:
206
329
 
207
330
  charger_id (str): ID of the charger.
208
331
  connection: Connection to CP.
209
- response_timeout (int): When no response on a request is received
332
+ response_timeout (float): When no response on a request is received
210
333
  within this interval, a asyncio.TimeoutError is raised.
211
334
  logger: Optional Logger instance used for logging.
212
335
  By default, the 'ocpp' logger is used.
@@ -227,28 +350,30 @@ class ChargePoint:
227
350
  # if exists.
228
351
  self.route_map = create_route_map(self)
229
352
 
230
- self._call_lock = asyncio.Lock()
353
+ self._call_lock: asyncio.Lock = asyncio.Lock()
231
354
 
232
355
  # A queue used to pass CallResults and CallErrors from
233
356
  # the self.serve() task to the self.call() task.
234
- self._response_queue = asyncio.Queue()
357
+ self._response_queue: asyncio.Queue[Union[Call, CallResult, CallError]] = (
358
+ asyncio.Queue()
359
+ )
235
360
 
236
361
  # Function used to generate unique ids for CALLs. By default
237
362
  # uuid.uuid4() is used, but it can be changed. This is meant primarily
238
363
  # for testing purposes to have predictable unique ids.
239
- self._unique_id_generator = uuid.uuid4
364
+ self._unique_id_generator: Callable[[], uuid.UUID] = uuid.uuid4
240
365
 
241
366
  # The logger used to log messages
242
367
  self.logger = logger
243
368
 
244
- async def start(self):
369
+ async def start(self) -> NoReturn:
245
370
  while True:
246
371
  message = await self._connection.recv()
247
- self.logger.info("%s: receive message %s", self.id, message)
372
+ self.logger.debug("%s: receive message %s", self.id, message)
248
373
 
249
374
  await self.route_message(message)
250
375
 
251
- async def route_message(self, raw_msg):
376
+ async def route_message(self, raw_msg: Union[str, bytes]) -> None:
252
377
  """
253
378
  Route a message received from a CP.
254
379
 
@@ -260,14 +385,14 @@ class ChargePoint:
260
385
  msg = unpack(raw_msg)
261
386
  except OCPPError as e:
262
387
  self.logger.exception(
263
- "Unable to parse message: '%s', it doesn't seem "
264
- "to be valid OCPP: %s",
388
+ "Unable to parse message: '%s', it doesn't seem to be valid OCPP: %s",
265
389
  raw_msg,
266
390
  e,
267
391
  )
268
392
  return
269
393
 
270
394
  if msg.message_type_id == MessageType.Call:
395
+ assert isinstance(msg, Call)
271
396
  try:
272
397
  await self._handle_call(msg)
273
398
  except OCPPError as error:
@@ -276,9 +401,10 @@ class ChargePoint:
276
401
  await self._send(response)
277
402
 
278
403
  elif msg.message_type_id in [MessageType.CallResult, MessageType.CallError]:
404
+ assert isinstance(msg, (CallResult, CallError))
279
405
  self._response_queue.put_nowait(msg)
280
406
 
281
- async def _handle_call(self, msg):
407
+ async def _handle_call(self, msg: Call) -> Any:
282
408
  """
283
409
  Execute all hooks installed for based on the Action of the message.
284
410
 
@@ -291,10 +417,11 @@ class ChargePoint:
291
417
 
292
418
  """
293
419
  try:
294
- handlers = self.route_map[msg.action]
295
- except KeyError:
420
+ handlers: Route = self.route_map[msg.action]
421
+ except (KeyError, TypeError):
422
+ # A TypeError means the action isn't hashable, e.g. a JSON array.
296
423
  _raise_key_error(msg.action, self._ocpp_version)
297
- return
424
+ return None
298
425
 
299
426
  if not handlers.get("_skip_schema_validation", False):
300
427
  await validate_payload(msg, self._ocpp_version)
@@ -308,7 +435,7 @@ class ChargePoint:
308
435
  snake_case_payload = camel_to_snake_case(msg.payload)
309
436
 
310
437
  try:
311
- handler = handlers["_on_action"]
438
+ handler: Callable[..., Any] = handlers["_on_action"]
312
439
  except KeyError:
313
440
  _raise_key_error(msg.action, self._ocpp_version)
314
441
  handler_signature = inspect.signature(handler)
@@ -327,7 +454,7 @@ class ChargePoint:
327
454
  response = msg.create_call_error(e).to_json()
328
455
  await self._send(response)
329
456
 
330
- return
457
+ return None
331
458
 
332
459
  temp_response_payload = serialize_as_dict(response)
333
460
 
@@ -356,9 +483,12 @@ class ChargePoint:
356
483
  # call_unique_id should be passed as kwarg only if is defined explicitly
357
484
  # in the handler signature
358
485
  if call_unique_id_required:
359
- response = handler(**snake_case_payload, call_unique_id=msg.unique_id)
360
- else:
361
- response = handler(**snake_case_payload)
486
+ snake_case_payload["call_unique_id"] = msg.unique_id
487
+ # call_response should be passed as kwarg only if the after handler
488
+ # was decorated with inject_response=True
489
+ if getattr(handler, "_inject_response", False):
490
+ snake_case_payload["call_response"] = response_payload
491
+ response = handler(**snake_case_payload)
362
492
  # Create task to avoid blocking when making a call inside the
363
493
  # after handler
364
494
  if inspect.isawaitable(response):
@@ -370,9 +500,14 @@ class ChargePoint:
370
500
  return response
371
501
 
372
502
  async def call(
373
- self, payload, suppress=True, unique_id=None, skip_schema_validation=False
374
- ):
503
+ self,
504
+ payload: DataclassInstance,
505
+ suppress: bool = True,
506
+ unique_id: Optional[str] = None,
507
+ skip_schema_validation: bool = False,
508
+ ) -> Any:
375
509
  """
510
+
376
511
  Send Call message to client and return payload of response.
377
512
 
378
513
  The given payload is transformed into a Call object by looking at the
@@ -445,7 +580,9 @@ class ChargePoint:
445
580
  cls = getattr(self._call_result, payload.__class__.__name__) # noqa
446
581
  return cls(**snake_case_payload)
447
582
 
448
- async def _get_specific_response(self, unique_id, timeout):
583
+ async def _get_specific_response(
584
+ self, unique_id: Optional[str], timeout: Union[int, float]
585
+ ) -> Any:
449
586
  """
450
587
  Return response with given unique ID or raise an asyncio.TimeoutError.
451
588
  """
@@ -467,6 +604,6 @@ class ChargePoint:
467
604
 
468
605
  return await self._get_specific_response(unique_id, timeout_left)
469
606
 
470
- async def _send(self, message):
471
- self.logger.info("%s: send %s", self.id, message)
607
+ async def _send(self, message: Any) -> None:
608
+ self.logger.debug("%s: send message %s", self.id, message)
472
609
  await self._connection.send(message)
@@ -1,20 +1,27 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import Any, Dict, Optional
4
+
5
+
1
6
  class OCPPError(Exception):
2
7
  """Base class for all OCPP errors. It shouldn't be raised, only it
3
8
  subclasses.
4
9
  """
5
10
 
6
- default_description = ""
11
+ code: str
12
+ default_description: str = ""
7
13
 
8
- def __init__(self, description=None, details=None):
9
- self.description = description
10
- if description is None:
11
- self.description = self.default_description
12
-
13
- self.details = details
14
- if self.details is None:
15
- self.details = {}
14
+ def __init__(
15
+ self,
16
+ description: Optional[str] = None,
17
+ details: Optional[Dict[str, Any]] = None,
18
+ ):
19
+ self.description = (
20
+ description if description is not None else self.default_description
21
+ )
22
+ self.details = details if details is not None else {}
16
23
 
17
- def __eq__(self, other):
24
+ def __eq__(self, other: object) -> bool:
18
25
  if other.__class__ is self.__class__:
19
26
  return (self.description, self.details) == (
20
27
  other.description,
@@ -23,14 +30,14 @@ class OCPPError(Exception):
23
30
 
24
31
  return NotImplemented
25
32
 
26
- def __repr__(self):
33
+ def __repr__(self) -> str:
27
34
  return (
28
35
  f"<{self.__class__.__name__} - description={self.description}, "
29
36
  f" details={self.details}>"
30
37
  )
31
38
 
32
- def __str__(self):
33
- return f"{self.__class__.__name__}: {self.description}, " f" {self.details}"
39
+ def __str__(self) -> str:
40
+ return f"{self.__class__.__name__}: {self.description}, {self.details}"
34
41
 
35
42
 
36
43
  class NotImplementedError(OCPPError):
@@ -75,7 +82,7 @@ class FormatViolationError(OCPPError):
75
82
 
76
83
  code = "FormatViolation"
77
84
  default_description = (
78
- "Payload for Action is syntactically incorrect or " "structure for Action"
85
+ "Payload for Action is syntactically incorrect or structure for Action"
79
86
  )
80
87
 
81
88