ocpp16

package
v0.0.0-...-4086bda Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Package ocpp16 defines handlers for processing OCPP 1.6 messages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToUUID

func ConvertToUUID(transactionId int) string

func NewCallMaker

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

func NewRouter

func NewRouter(emitter transport.Emitter,
	clk clock.PassiveClock,
	engine store.Engine,
	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 {
	TokenStore store.TokenStore
}

func (AuthorizeHandler) HandleCall

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

type BootNotificationHandler

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

func (BootNotificationHandler) HandleCall

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

type ChangeConfigurationResultHandler

type ChangeConfigurationResultHandler struct {
	SettingsStore store.ChargeStationSettingsStore
	CallMaker     handlers.CallMaker
}

func (ChangeConfigurationResultHandler) HandleCallResult

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

type DataTransferAction

type DataTransferAction struct {
	VendorId  string
	MessageId string
}

type DataTransferCallMaker

type DataTransferCallMaker struct {
	// contains filtered or unexported fields
}

func NewDataTransferCallMaker

func NewDataTransferCallMaker(e transport.Emitter) *DataTransferCallMaker

func (DataTransferCallMaker) Send

func (d DataTransferCallMaker) Send(ctx context.Context, chargeStationId string, request ocpp.Request) error

type DataTransferHandler

type DataTransferHandler struct {
	CallRoutes map[string]map[string]handlers.CallRoute
	SchemaFS   fs.FS
}

func (DataTransferHandler) HandleCall

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

type DataTransferResultHandler

type DataTransferResultHandler struct {
	SchemaFS         fs.FS
	CallResultRoutes map[string]map[string]handlers.CallResultRoute
}

func (DataTransferResultHandler) HandleCallResult

func (d DataTransferResultHandler) 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 MeterValuesHandler

type MeterValuesHandler struct {
	TransactionStore store.TransactionStore
}

func (MeterValuesHandler) HandleCall

func (m MeterValuesHandler) HandleCall(ctx context.Context, chargeStationId string, request ocpp.Request) (response ocpp.Response, err 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 StartTransactionHandler

type StartTransactionHandler struct {
	Clock            clock.PassiveClock
	TokenStore       store.TokenStore
	TransactionStore store.TransactionStore
}

func (StartTransactionHandler) HandleCall

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

type StopTransactionHandler

type StopTransactionHandler struct {
	Clock            clock.PassiveClock
	TokenStore       store.TokenStore
	TransactionStore store.TransactionStore
}

func (StopTransactionHandler) HandleCall

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

type TriggerMessageResultHandler

type TriggerMessageResultHandler struct{}

func (TriggerMessageResultHandler) HandleCallResult

func (c TriggerMessageResultHandler) 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