diff --git a/doc/powermeter_start_transaction.puml b/doc/powermeter_start_transaction.puml new file mode 100644 index 000000000..86c21500c --- /dev/null +++ b/doc/powermeter_start_transaction.puml @@ -0,0 +1,40 @@ +@startuml +autonumber "" +participant Powermeter +participant EVSE_Manager +participant OCPP +participant CSMS + +title Start of a Transaction + +== User plugs in EV and authorizes == + +EVSE_Manager->OCPP: Event(SessionStarted) + +OCPP->CSMS: StatusNotification.req(Preparing) +return StatusNotification.conf + +alt successful case +EVSE_Manager -> Powermeter: startTransaction +return startTransaction Response (OK/ID) + +EVSE_Manager -> OCPP: Event(TransactionStarted) +OCPP->CSMS: StartTransaction.req +return StartTransaction.conf + +note over EVSE_Manager: Transaction started successfully + +else startTransaction failing due to power loss +EVSE_Manager -> Powermeter: startTransaction +return startTransaction Response (FAIL) + +EVSE_Manager -> OCPP: Event(Deauthorized) + +OCPP->CSMS: StatusNotification.req(Finishing) +return StatusNotification.conf + +note over EVSE_Manager: Transaction did not start + +end + +@enduml diff --git a/doc/powermeter_stop_transaction_in_error.puml b/doc/powermeter_stop_transaction_in_error.puml new file mode 100644 index 000000000..50a992e2c --- /dev/null +++ b/doc/powermeter_stop_transaction_in_error.puml @@ -0,0 +1,56 @@ +@startuml +participant Powermeter +participant EVSE_Manager +participant OCPP +participant CSMS + +title Stopping transaction in error + +== Transaction is running == + +Powermeter -> Powermeter: livemeasure FAILED + +!pragma teoz true +Powermeter -> EVSE_Manager: raiseError (CommunicationFault) +& Powermeter -> OCPP: raiseError (CommunicationFault) + +EVSE_Manager->EVSE_Manager: Pause charging + +OCPP->CSMS: StatusNotification.req(Faulted) +return StatusNotification.conf + +Powermeter -> Powermeter: livemeasure OK +Powermeter -> Powermeter: get Powermeter status +!pragma teoz true +Powermeter -> EVSE_Manager: clearError (CommunicationFault) +& Powermeter -> OCPP: clearError (CommunicationFault) + +== User stops transaction while powermeter communication error == + +EVSE_Manager->EVSE_Manager: Stop Transaction internally +EVSE_Manager->EVSE_Manager: Wait for powermeter to clear error +note right of EVSE_Manager: Note that EvseManager does not stop transaction immediately + +Powermeter -> EVSE_Manager: clearError (CommunicationFault) +& Powermeter -> OCPP: clearError (CommunicationFault) + +alt successful case +EVSE_Manager -> Powermeter: stopTransaction (ID) +return stopTransaction Response (OK/OCMF) +EVSE_Manager -> OCPP: Event(TransactionFinished(ID/stopReason:PowerLoss/OCMF)) + +OCPP->CSMS: StopTransaction.req(ID/stopReason:PowerLoss/OCMF) +return StopTransaction.conf + +else stopTransaction failing due to subsequent power loss +EVSE_Manager -> Powermeter: stopTransaction (ID) +Powermeter -> Powermeter: livemeasure FAILED +Powermeter -> EVSE_Manager: stopTransaction Response (FAIL) +EVSE_Manager -> OCPP: Event(TransactionFinished(ID/stopReason:PowerLoss/OCMF)) + +note right of OCPP: In this case we can't stop the transaction including the OCMF +OCPP->CSMS: StopTransaction.req(ID/stopReason:PowerLoss) +return StopTransaction.conf +end + +@enduml diff --git a/doc/powermeter_stop_transaction_without_error copy.puml b/doc/powermeter_stop_transaction_without_error copy.puml new file mode 100644 index 000000000..e2578646e --- /dev/null +++ b/doc/powermeter_stop_transaction_without_error copy.puml @@ -0,0 +1,54 @@ +@startuml +participant Powermeter +participant EVSE_Manager +participant OCPP +participant CSMS + +title Stopping transaction + +== Transaction is running == + +Powermeter -> Powermeter: livemeasure FAILED + +!pragma teoz true +Powermeter -> EVSE_Manager: raiseError (CommunicationFault) +& Powermeter -> OCPP: raiseError (CommunicationFault) + +EVSE_Manager->EVSE_Manager: Pause charging + +OCPP->CSMS: StatusNotification.req(Faulted) +return StatusNotification.conf + +Powermeter -> Powermeter: livemeasure OK +Powermeter -> Powermeter: get Powermeter status +!pragma teoz true +Powermeter -> EVSE_Manager: clearError (CommunicationFault) +& Powermeter -> OCPP: clearError (CommunicationFault) + +EVSE_Manager->EVSE_Manager: Resume charging + +OCPP->CSMS: StatusNotification.req(Charging) +return StatusNotification.conf + +== User stops transaction == + +alt successful case +EVSE_Manager -> Powermeter: stopTransaction (ID) +return stopTransaction Response (OK/OCMF) +EVSE_Manager -> OCPP: Event(TransactionFinished(ID/stopReason:PowerLoss/OCMF)) + +OCPP->CSMS: StopTransaction.req(ID/stopReason:PowerLoss/OCMF) +return StopTransaction.conf + +else stopTransaction failing due to subsequent power loss +EVSE_Manager -> Powermeter: stopTransaction (ID) +Powermeter -> Powermeter: livemeasure FAILED +Powermeter -> EVSE_Manager: stopTransaction Response (FAIL) +EVSE_Manager -> OCPP: Event(TransactionFinished(ID/stopReason:PowerLoss/OCMF)) + +note right of OCPP: In this case we can't stop the transaction including the OCMF +OCPP->CSMS: StopTransaction.req(ID/stopReason:PowerLoss) +return StopTransaction.conf +end + +@enduml