diff --git a/doc/error_case.puml b/doc/error_case.puml deleted file mode 100644 index 007a5a868..000000000 --- a/doc/error_case.puml +++ /dev/null @@ -1,40 +0,0 @@ -@startuml -actor User -participant Powermeter -participant Error_Manager -participant EVSE_Manager -participant OCPP - -User -> EVSE_Manager: startChargingSession -alt successful case -EVSE_Manager -> Powermeter: startTransaction -Powermeter -> EVSE_Manager: startTransaction Response (OK/ID) -EVSE_Manager -> OCPP: persistTransaction (ID) -else startTransaction failing due to power loss -EVSE_Manager -> Powermeter: startTransaction -Powermeter -> EVSE_Manager: startTransaction Response (FAIL) -EVSE_Manager -> User: stopChargingSession -end -== Separation == -Powermeter -> Powermeter: livemeasure FAILED - -Powermeter -> Error_Manager: raiseError (CommunicationFault) -Error_Manager -> EVSE_Manager: errorRaised Notification (CommunicationFault/Powermeter) -EVSE_Manager -> User: stopChargingSession - -Powermeter -> Powermeter: livemeasure OK -Powermeter -> Powermeter: get Powermeter status -Powermeter -> Error_Manager: clearError (CommunicationFault) -Error_Manager -> EVSE_Manager: errorCleared Notification (CommunicationFault/Powermeter) -alt successful case -EVSE_Manager -> Powermeter: stopTransaction (ID) -Powermeter -> EVSE_Manager: stopTransaction Response (OK/OCMF) -EVSE_Manager -> OCPP: saveTransaction (ID/stopReason:PowerLoss/OCMF) -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: saveTransaction (ID/stopReason:PowerLoss) -end - -@enduml \ No newline at end of file diff --git a/doc/ocmf/powermeter_start_transaction.puml b/doc/ocmf/powermeter_start_transaction.puml new file mode 100644 index 000000000..2de1a7527 --- /dev/null +++ b/doc/ocmf/powermeter_start_transaction.puml @@ -0,0 +1,51 @@ +@startuml +autonumber "" +participant Powermeter +participant EvseManager +participant OCPP +participant CSMS + +title Start of a Transaction + +== User plugs in EV and authorizes == + +EvseManager->OCPP: Event(SessionStarted) + +OCPP->CSMS: StatusNotification.req(Preparing) +return StatusNotification.conf + +alt successful case + EvseManager -> Powermeter: startTransaction + return startTransaction Response (OK/ID) + + EvseManager -> OCPP: Event(TransactionStarted) + OCPP->CSMS: StartTransaction.req + return StartTransaction.conf + + note over EvseManager: Transaction started successfully + +else startTransaction failing due to power loss + EvseManager -> Powermeter: startTransaction + return startTransaction Response (FAIL) + + EvseManager -> OCPP: Event(Deauthorized) + + OCPP->CSMS: StatusNotification.req(Finishing) + return StatusNotification.conf + + EvseManager -> OCPP: raiseError (PowermeterTransactionStartFailed) + OCPP->CSMS: StatusNotification.req(Finishing, PowermeterTransactionStartFailed) + return StatusNotification.conf + +alt EvseManager configured to become inoperative in case of PowermeterCommError + EvseManager -> OCPP: raiseError (Inoperative) + OCPP->CSMS: StatusNotification.req(Faulted) + return StatusNotification.conf + +end + +note over EvseManager: Transaction did not start + +end + +@enduml diff --git a/doc/powermeter_stop_transaction_without_error copy.puml b/doc/ocmf/powermeter_stop_transaction.puml similarity index 50% rename from doc/powermeter_stop_transaction_without_error copy.puml rename to doc/ocmf/powermeter_stop_transaction.puml index e2578646e..c1c2708fc 100644 --- a/doc/powermeter_stop_transaction_without_error copy.puml +++ b/doc/ocmf/powermeter_stop_transaction.puml @@ -4,7 +4,7 @@ participant EVSE_Manager participant OCPP participant CSMS -title Stopping transaction +title Stopping transaction in error == Transaction is running == @@ -14,40 +14,35 @@ Powermeter -> Powermeter: livemeasure FAILED Powermeter -> EVSE_Manager: raiseError (CommunicationFault) & Powermeter -> OCPP: raiseError (CommunicationFault) -EVSE_Manager->EVSE_Manager: Pause charging - -OCPP->CSMS: StatusNotification.req(Faulted) +OCPP->CSMS: StatusNotification.req(Charging, CommunicationFault) 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 +alt EvseManager configured to become inoperative in case of PowermeterCommError + EVSE_Manager->EVSE_Manager: Pause charging + EVSE_Manager -> OCPP: raiseError (Inoperative) + OCPP->CSMS: StatusNotification.req(Faulted) + note over EVSE_Manager: Note that we just continue charging otherwise +end -OCPP->CSMS: StatusNotification.req(Charging) -return StatusNotification.conf +!pragma teoz true -== User stops transaction == +== User stops transaction while powermeter communication error == alt successful case EVSE_Manager -> Powermeter: stopTransaction (ID) return stopTransaction Response (OK/OCMF) -EVSE_Manager -> OCPP: Event(TransactionFinished(ID/stopReason:PowerLoss/OCMF)) +EVSE_Manager -> OCPP: Event(TransactionFinished(OCMF)) -OCPP->CSMS: StopTransaction.req(ID/stopReason:PowerLoss/OCMF) +OCPP->CSMS: StopTransaction.req(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)) +EVSE_Manager -> OCPP: Event(TransactionFinished) note right of OCPP: In this case we can't stop the transaction including the OCMF -OCPP->CSMS: StopTransaction.req(ID/stopReason:PowerLoss) +OCPP->CSMS: StopTransaction.req() return StopTransaction.conf end diff --git a/doc/powermeter_start_transaction.puml b/doc/powermeter_start_transaction.puml deleted file mode 100644 index 86c21500c..000000000 --- a/doc/powermeter_start_transaction.puml +++ /dev/null @@ -1,40 +0,0 @@ -@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 deleted file mode 100644 index 50a992e2c..000000000 --- a/doc/powermeter_stop_transaction_in_error.puml +++ /dev/null @@ -1,56 +0,0 @@ -@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