ocpp201

package
v0.0.0-...-55c65bb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package ocpp201 defines handlers for processing OCPP 2.0.1 messages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCertificateId

func GetCertificateId(pemData string) (string, error)

GetCertificateId returns the SHA-256 thumbprint of the certificate

func NewCallMaker

func NewCallMaker(e transport.Emitter) *handlers.OcppCallMaker

func NewRouter

func NewRouter(emitter transport.Emitter,
	clk clock.PassiveClock,
	engine store.Engine,
	tariffService services.TariffService,
	certValidationService services.CertificateValidationService,
	chargeStationCertProvider services.ChargeStationCertificateProvider,
	contractCertProvider services.ContractCertificateProvider,
	heartbeatInterval time.Duration,
	schemaFS fs.FS) transport.MessageHandler

func StatusNotificationHandler

func StatusNotificationHandler(ctx context.Context, chargeStationId string, request ocpp.Request) (ocpp.Response, error)

Types

type AuthorizeHandler

type AuthorizeHandler struct {
	TokenAuthService             services.TokenAuthService
	CertificateValidationService services.CertificateValidationService
}

func (AuthorizeHandler) HandleCall

func (a AuthorizeHandler) HandleCall(ctx context.Context, _ string, request ocpp.Request) (ocpp.Response, error)

type BootNotificationHandler

type BootNotificationHandler struct {
	Clock               clock.PassiveClock
	RuntimeDetailsStore store.ChargeStationRuntimeDetailsStore
	HeartbeatInterval   int
}

func (BootNotificationHandler) HandleCall

func (b BootNotificationHandler) HandleCall(ctx context.Context, chargeStationId string, request ocpp.Request) (ocpp.Response, error)

type CertificateSignedResultHandler

type CertificateSignedResultHandler struct {
	Store store.Engine
}

func (CertificateSignedResultHandler) HandleCallResult

func (c CertificateSignedResultHandler) HandleCallResult(ctx context.Context, chargeStationId string, request ocpp.Request, response ocpp.Response, state any) error

type ChangeAvailabilityResultHandler

type ChangeAvailabilityResultHandler struct{}

func (ChangeAvailabilityResultHandler) HandleCallResult

func (h ChangeAvailabilityResultHandler) HandleCallResult(ctx context.Context, chargeStationId string, request ocpp.Request, response ocpp.Response, state any) error

type ClearCacheResultHandler

type ClearCacheResultHandler struct{}

func (ClearCacheResultHandler) HandleCallResult

func (h ClearCacheResultHandler) HandleCallResult(ctx context.Context, chargeStationId string, request ocpp.Request, response ocpp.Response, state any) error

type DeleteCertificateResultHandler

type DeleteCertificateResultHandler struct{}

func (DeleteCertificateResultHandler) HandleCallResult

func (h DeleteCertificateResultHandler) HandleCallResult(ctx context.Context, chargeStationId string, request ocpp.Request, response ocpp.Response, state any) error

type FirmwareStatusNotificationHandler

type FirmwareStatusNotificationHandler struct{}

func (FirmwareStatusNotificationHandler) HandleCall

func (h FirmwareStatusNotificationHandler) HandleCall(ctx context.Context, chargeStationId string, request ocpp.Request) (response ocpp.Response, err error)

type Get15118EvCertificateHandler

type Get15118EvCertificateHandler struct {
	ContractCertificateProvider services.ContractCertificateProvider
}

func (Get15118EvCertificateHandler) HandleCall

type GetBaseReportResultHandler

type GetBaseReportResultHandler struct{}

func (GetBaseReportResultHandler) HandleCallResult

func (h GetBaseReportResultHandler) HandleCallResult(ctx context.Context, chargeStationId string, request ocpp.Request, response ocpp.Response, state any) error

type GetCertificateStatusHandler

type GetCertificateStatusHandler struct {
	CertificateValidationService services.CertificateValidationService
}

func (GetCertificateStatusHandler) HandleCall

func (g GetCertificateStatusHandler) HandleCall(ctx context.Context, chargeStationId string, request ocpp.Request) (ocpp.Response, error)

type GetInstalledCertificateIdsResultHandler

type GetInstalledCertificateIdsResultHandler struct{}

func (GetInstalledCertificateIdsResultHandler) HandleCallResult

func (h GetInstalledCertificateIdsResultHandler) HandleCallResult(ctx context.Context, chargeStationId string, request ocpp.Request, response ocpp.Response, state any) error

type GetLocalListVersionResultHandler

type GetLocalListVersionResultHandler struct{}

func (GetLocalListVersionResultHandler) HandleCallResult

func (h GetLocalListVersionResultHandler) HandleCallResult(ctx context.Context, chargeStationId string, request ocpp.Request, response ocpp.Response, state any) error

type GetReportResultHandler

type GetReportResultHandler struct{}

func (GetReportResultHandler) HandleCallResult

func (h GetReportResultHandler) HandleCallResult(ctx context.Context, chargeStationId string, request ocpp.Request, response ocpp.Response, state any) error

type GetTransactionStatusResultHandler

type GetTransactionStatusResultHandler struct{}

func (GetTransactionStatusResultHandler) HandleCallResult

func (h GetTransactionStatusResultHandler) HandleCallResult(ctx context.Context, chargeStationId string, request ocpp.Request, response ocpp.Response, state any) error

type GetVariablesResultHandler

type GetVariablesResultHandler struct{}

func (GetVariablesResultHandler) HandleCallResult

func (h GetVariablesResultHandler) HandleCallResult(ctx context.Context, chargeStationId string, request ocpp.Request, response ocpp.Response, state any) error

type HeartbeatHandler

type HeartbeatHandler struct {
	Clock clock.PassiveClock
}

func (HeartbeatHandler) HandleCall

func (h HeartbeatHandler) HandleCall(ctx context.Context, chargeStationId string, request ocpp.Request) (ocpp.Response, error)

type InstallCertificateResultHandler

type InstallCertificateResultHandler struct {
	Store store.Engine
}

func (InstallCertificateResultHandler) HandleCallResult

func (i InstallCertificateResultHandler) HandleCallResult(ctx context.Context, chargeStationId string, request ocpp.Request, response ocpp.Response, state any) error

type LogStatusNotificationHandler

type LogStatusNotificationHandler struct{}

func (LogStatusNotificationHandler) HandleCall

func (h LogStatusNotificationHandler) HandleCall(ctx context.Context, chargeStationId string, request ocpp.Request) (response ocpp.Response, err error)

type MeterValuesHandler

type MeterValuesHandler struct{}

func (MeterValuesHandler) HandleCall

func (h MeterValuesHandler) HandleCall(ctx context.Context, chargeStationId string, request ocpp.Request) (response ocpp.Response, err error)

type NotifyReportHandler

type NotifyReportHandler struct{}

func (NotifyReportHandler) HandleCall

func (h NotifyReportHandler) HandleCall(ctx context.Context, chargeStationId string, request ocpp.Request) (response ocpp.Response, err error)

type RequestStartTransactionResultHandler

type RequestStartTransactionResultHandler struct{}

func (RequestStartTransactionResultHandler) HandleCallResult

func (h RequestStartTransactionResultHandler) HandleCallResult(ctx context.Context, chargeStationId string, request ocpp.Request, response ocpp.Response, state any) error

type RequestStopTransactionResultHandler

type RequestStopTransactionResultHandler struct{}

func (RequestStopTransactionResultHandler) HandleCallResult

func (h RequestStopTransactionResultHandler) HandleCallResult(ctx context.Context, chargeStationId string, request ocpp.Request, response ocpp.Response, state any) error

type ResetResultHandler

type ResetResultHandler struct{}

func (ResetResultHandler) HandleCallResult

func (h ResetResultHandler) HandleCallResult(ctx context.Context, chargeStationId string, request ocpp.Request, response ocpp.Response, state any) error

type SecurityEventNotificationHandler

type SecurityEventNotificationHandler struct{}

func (SecurityEventNotificationHandler) HandleCall

func (s SecurityEventNotificationHandler) HandleCall(ctx context.Context, chargeStationId string, request ocpp.Request) (response ocpp.Response, err error)

type SendLocalListResultHandler

type SendLocalListResultHandler struct{}

func (SendLocalListResultHandler) HandleCallResult

func (h SendLocalListResultHandler) HandleCallResult(ctx context.Context, chargeStationId string, request ocpp.Request, response ocpp.Response, state any) error

type SetNetworkProfileResultHandler

type SetNetworkProfileResultHandler struct{}

func (SetNetworkProfileResultHandler) HandleCallResult

func (h SetNetworkProfileResultHandler) HandleCallResult(ctx context.Context, chargeStationId string, request ocpp.Request, response ocpp.Response, state any) error

type SetVariablesResultHandler

type SetVariablesResultHandler struct {
	Store store.Engine
}

func (SetVariablesResultHandler) HandleCallResult

func (i SetVariablesResultHandler) HandleCallResult(ctx context.Context, chargeStationId string, request ocpp.Request, response ocpp.Response, state any) error

type SignCertificateHandler

type SignCertificateHandler struct {
	ChargeStationCertificateProvider services.ChargeStationCertificateProvider
	Store                            store.Engine
}

func (SignCertificateHandler) HandleCall

func (s SignCertificateHandler) HandleCall(ctx context.Context, chargeStationId string, request ocpp.Request) (ocpp.Response, error)

type TransactionEventHandler

type TransactionEventHandler struct {
	Store            store.Engine
	TokenAuthService services.TokenAuthService
	TariffService    services.TariffService
}

func (TransactionEventHandler) HandleCall

func (t TransactionEventHandler) HandleCall(ctx context.Context, chargeStationId string, request ocpp.Request) (ocpp.Response, error)

type TriggerMessageResultHandler

type TriggerMessageResultHandler struct {
	Store store.Engine
}

func (TriggerMessageResultHandler) HandleCallResult

func (i TriggerMessageResultHandler) HandleCallResult(ctx context.Context, chargeStationId string, request ocpp.Request, response ocpp.Response, state any) error

type UnlockConnectorResultHandler

type UnlockConnectorResultHandler struct{}

func (UnlockConnectorResultHandler) HandleCallResult

func (h UnlockConnectorResultHandler) HandleCallResult(ctx context.Context, chargeStationId string, request ocpp.Request, response ocpp.Response, state any) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL