Skip to content

Commit

Permalink
Modify the format to Mermaid
Browse files Browse the repository at this point in the history
Signed-off-by: florinmihut <[email protected]>
  • Loading branch information
florinmihut committed Dec 20, 2024
1 parent 7cb2b04 commit a69359b
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 109 deletions.
52 changes: 52 additions & 0 deletions doc/ocmf/powermeter_start_transaction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
```mermaid

Check notice on line 1 in doc/ocmf/powermeter_start_transaction.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

doc/ocmf/powermeter_start_transaction.md#L1

First line in a file should be a top-level heading
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, <br/>Powermeter raises an CommunicationError <br/>and EvseManager is registered for notification

Check notice on line 46 in doc/ocmf/powermeter_start_transaction.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

doc/ocmf/powermeter_start_transaction.md#L46

Expected: 80; Actual: 180
EvseManager->>OCPP: raise_error (Inoperative)
OCPP->>CSMS: StatusNotification.req(Faulted)
CSMS-->>OCPP: StatusNotification.conf
end
```

Check notice on line 52 in doc/ocmf/powermeter_start_transaction.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

doc/ocmf/powermeter_start_transaction.md#L52

Files should end with a single newline character
51 changes: 0 additions & 51 deletions doc/ocmf/powermeter_start_transaction.puml

This file was deleted.

46 changes: 46 additions & 0 deletions doc/ocmf/powermeter_stop_transaction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
```mermaid

Check notice on line 1 in doc/ocmf/powermeter_stop_transaction.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

doc/ocmf/powermeter_stop_transaction.md#L1

First line in a file should be a top-level heading
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 <br/> CommunicationError
Note over Powermeter,EvseManager: raise_error not actual messages between them, <br/>Powermeter raises an CommunicationError <br/>and EvseManager is registered for notification

Check notice on line 14 in doc/ocmf/powermeter_stop_transaction.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

doc/ocmf/powermeter_stop_transaction.md#L14

Expected: 80; Actual: 176
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)

Check notice on line 37 in doc/ocmf/powermeter_stop_transaction.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

doc/ocmf/powermeter_stop_transaction.md#L37

Expected: 80; Actual: 124
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

Check notice on line 42 in doc/ocmf/powermeter_stop_transaction.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

doc/ocmf/powermeter_stop_transaction.md#L42

Expected: 80; Actual: 85
OCPP->>CSMS: StopTransaction.req()
CSMS-->>OCPP: StopTransaction.conf
end
```

Check notice on line 46 in doc/ocmf/powermeter_stop_transaction.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

doc/ocmf/powermeter_stop_transaction.md#L46

Files should end with a single newline character
58 changes: 0 additions & 58 deletions doc/ocmf/powermeter_stop_transaction.puml

This file was deleted.

0 comments on commit a69359b

Please sign in to comment.