Skip to content

Commit

Permalink
update powermeter sequence diagrams
Browse files Browse the repository at this point in the history
Signed-off-by: pietfried <pietgoempel@gmail.com>
  • Loading branch information
Pietfried authored and corneliusclaussen committed Oct 1, 2024
1 parent 689836c commit 60c75b5
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 155 deletions.
40 changes: 0 additions & 40 deletions doc/error_case.puml

This file was deleted.

51 changes: 51 additions & 0 deletions doc/ocmf/powermeter_start_transaction.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
@startuml
autonumber "<b><font color=red>"
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
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ participant EVSE_Manager
participant OCPP
participant CSMS

title Stopping transaction
title Stopping transaction in error

== Transaction is running ==

Expand All @@ -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

Expand Down
40 changes: 0 additions & 40 deletions doc/powermeter_start_transaction.puml

This file was deleted.

56 changes: 0 additions & 56 deletions doc/powermeter_stop_transaction_in_error.puml

This file was deleted.

0 comments on commit 60c75b5

Please sign in to comment.