diff --git a/doc/ocmf/powermeter_start_transaction.md b/doc/ocmf/powermeter_start_transaction.md new file mode 100644 index 000000000..5a22845aa --- /dev/null +++ b/doc/ocmf/powermeter_start_transaction.md @@ -0,0 +1,52 @@ +```mermaid +sequenceDiagram +autonumber +participant Powermeter +participant EvseManager +participant OCPP +participant CSMS + +title Start of a Transaction + +Note over EvseManager: User plugs in EV and authorizes + +EvseManager->>OCPP: Event(SessionStarted) + +OCPP->>CSMS: StatusNotification.req(Preparing) +CSMS-->>OCPP: StatusNotification.conf + +alt successful case + EvseManager->>Powermeter: startTransaction + Powermeter-->>EvseManager: startTransaction Response (OK/ID) + + EvseManager->>OCPP: Event(TransactionStarted) + OCPP->>CSMS: StartTransaction.req + CSMS-->>OCPP: StartTransaction.conf + + Note over EvseManager: Transaction started successfully + +else startTransaction failing due to power loss + EvseManager->>Powermeter: startTransaction + Powermeter-->>EvseManager: startTransaction Response (FAIL) + + EvseManager->>OCPP: Event(Deauthorized) + + OCPP->>CSMS: StatusNotification.req(Finishing) + CSMS-->>OCPP: StatusNotification.conf + + EvseManager->>OCPP: raiseError (PowermeterTransactionStartFailed) + OCPP->>CSMS: StatusNotification.req(Finishing, PowermeterTransactionStartFailed) + CSMS-->>OCPP: StatusNotification.conf + + Note over EvseManager: Transaction did not start +end + +alt EvseManager configured to become inoperative in case of Powermeter CommunicationError + Powermeter->>EvseManager: raise_error(CommunicationError) + Note over Powermeter,EvseManager: raise_error not actual messages between them,
Powermeter raises an CommunicationError
and EvseManager is registered for notification + EvseManager->>OCPP: raise_error (Inoperative) + OCPP->>CSMS: StatusNotification.req(Faulted) + CSMS-->>OCPP: StatusNotification.conf +end + +``` \ No newline at end of file diff --git a/doc/ocmf/powermeter_start_transaction.puml b/doc/ocmf/powermeter_start_transaction.puml deleted file mode 100644 index 2de1a7527..000000000 --- a/doc/ocmf/powermeter_start_transaction.puml +++ /dev/null @@ -1,51 +0,0 @@ -@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/ocmf/powermeter_stop_transaction.md b/doc/ocmf/powermeter_stop_transaction.md new file mode 100644 index 000000000..da81c7d29 --- /dev/null +++ b/doc/ocmf/powermeter_stop_transaction.md @@ -0,0 +1,46 @@ +```mermaid +sequenceDiagram +autonumber +participant Powermeter +participant EvseManager +participant OCPP +participant CSMS + +title Stopping Transaction in Error + +Note over Powermeter, CSMS: Transaction is running + +Powermeter->>Powermeter: detects a
CommunicationError +Note over Powermeter,EvseManager: raise_error not actual messages between them,
Powermeter raises an CommunicationError
and EvseManager is registered for notification +Powermeter->>EvseManager: raise_error (CommunicationFault) +Powermeter->>OCPP: raise_error (CommunicationFault) + +OCPP->>CSMS: StatusNotification.req(Charging, CommunicationFault) +CSMS-->>OCPP: StatusNotification.conf + +alt EvseManager configured to become inoperative in case of PowermeterCommError + EvseManager->>EvseManager: Pause charging + EvseManager->>OCPP: raiseError (Inoperative) + OCPP->>CSMS: StatusNotification.req(Faulted) + Note over EvseManager: Note that we just continue charging otherwise +end + +Note over Powermeter, CSMS: User stops the transaction + +alt successful case (Powermeter has no CommunicationError) + EvseManager->>Powermeter: stopTransaction (ID) + Powermeter-->>EvseManager: stopTransaction Response (OK/OCMF) + EvseManager->>OCPP: Event(TransactionFinished(OCMF)) + + OCPP->>CSMS: StopTransaction.req(OCMF) + CSMS-->>OCPP: StopTransaction.conf +else stopTransaction failing due to subsequent power loss (this applies as well when Powermeter still in CommunicationError) + EvseManager->>Powermeter: stopTransaction (ID) + Powermeter->>EvseManager: stopTransaction Response (FAIL) + EvseManager->>OCPP: Event(TransactionFinished) + + Note right of OCPP: In this case we can't stop the transaction including the OCMF + OCPP->>CSMS: StopTransaction.req() + CSMS-->>OCPP: StopTransaction.conf +end +``` \ No newline at end of file diff --git a/doc/ocmf/powermeter_stop_transaction.puml b/doc/ocmf/powermeter_stop_transaction.puml deleted file mode 100644 index c63459167..000000000 --- a/doc/ocmf/powermeter_stop_transaction.puml +++ /dev/null @@ -1,58 +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) - -OCPP->CSMS: StatusNotification.req(Charging, CommunicationFault) -return StatusNotification.conf - -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 - -!pragma teoz true - -== User stops transaction after powermeter communication error == - -alt successful case -EVSE_Manager -> Powermeter: stopTransaction (ID) -return stopTransaction Response (OK/OCMF) -EVSE_Manager -> OCPP: Event(TransactionFinished(OCMF)) - -OCPP->CSMS: StopTransaction.req(OCMF) -return StopTransaction.conf - -else stopTransaction failing due to subsequent power loss -EVSE_Manager -> Powermeter: stopTransaction (ID) -Powermeter -> EVSE_Manager: stopTransaction Response (FAIL) -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() -return StopTransaction.conf -end - -== User stops transaction while powermeter communication error == - -EVSE_Manager -> Powermeter: stopTransaction (ID) -return stopTransaction Response (FAIL) -EVSE_Manager -> OCPP: Event(TransactionFinished) - -OCPP->CSMS: StopTransaction.req() -return StopTransaction.conf - -@enduml