Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ocpp: always send confirmation #15950

Merged
merged 5 commits into from
Sep 15, 2024
Merged

Ocpp: always send confirmation #15950

merged 5 commits into from
Sep 15, 2024

Conversation

andig
Copy link
Member

@andig andig commented Sep 7, 2024

Fix #15943. Replace #15945. Refs lorenzodonini/ocpp-go#293.

TODO

  • Ich erkenne hier bei StopTransaction keinen Unterschied der Funktion.

@andig andig marked this pull request as draft September 7, 2024 12:42
@andig andig added enhancement New feature or request devices Specific device support labels Sep 7, 2024
@andig andig requested a review from premultiply September 7, 2024 12:45
@andig
Copy link
Member Author

andig commented Sep 7, 2024

Ich hab den PR soweit zurück gebaut dass er m.E. die echten Änderungen zeigt.

@premultiply
Copy link
Member

Danke.
Dann mach doch bitte noch einen zweiten PR der das dann auch wieder so schön anordnet wie in meinem PR.
Dann kann man auch die Ähnlichkeiten im Ablauf der Callbacks direkt erkennen. Macht es besser verständlich.

@andig
Copy link
Member Author

andig commented Sep 7, 2024

Der PR zeigt alle Änderungen aus dem anderen die ich erkennen konnte. Mehr waren es nicht?

@premultiply
Copy link
Member

func (cp *CP) StopTransaction(request *core.StopTransactionRequest) (*core.StopTransactionConfirmation, error) {
	if request == nil {
		return nil, ErrInvalidRequest
	}

	if conn := cp.connectorByTransactionID(request.TransactionId); conn != nil {
		return conn.StopTransaction(request)
	}

	res := &core.StopTransactionConfirmation{
		IdTagInfo: &types.IdTagInfo{
			Status: types.AuthorizationStatusAccepted, // accept old pending stop message during startup
		},
	}

	return res, nil
}

Default steht immer zum Schluss, der connector-Handler ist Ausnahme davon.
Wie in allen anderen Funktionen. Immer das gleiche Muster.

@github-actions github-actions bot added the stale Outdated and ready to close label Sep 14, 2024
@andig andig marked this pull request as ready for review September 15, 2024 11:48
@andig andig merged commit 009a9c2 into master Sep 15, 2024
6 checks passed
@andig andig deleted the fix/ocpp-confirmation branch September 15, 2024 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devices Specific device support enhancement New feature or request stale Outdated and ready to close
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Charge Amps Halo: timeout
2 participants