iso15118

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

The ISO 15118 functional block contains OCPP 2.0 features that allow:

- communication between EV and an EVSE

- support for certificate-based authentication and authorization at the charging station, i.e. plug and charge

Index

Constants

View Source
const DeleteCertificateFeatureName = "DeleteCertificate"
View Source
const Get15118EVCertificateFeatureName = "Get15118EVCertificate"
View Source
const GetCertificateStatusFeatureName = "GetCertificateStatus"
View Source
const GetInstalledCertificateIdsFeatureName = "GetInstalledCertificateIds"
View Source
const ProfileName = "iso15118"

Variables

Functions

This section is empty.

Types

type CSMSHandler

type CSMSHandler interface {
	// OnGet15118EVCertificate is called on the CSMS whenever a Get15118EVCertificateRequest is received from a charging station.
	OnGet15118EVCertificate(chargingStationID string, request *Get15118EVCertificateRequest) (confirmation *Get15118EVCertificateResponse, err error)
	// OnGetCertificateStatus is called on the CSMS whenever a GetCertificateStatusRequest is received from a charging station.
	OnGetCertificateStatus(chargingStationID string, request *GetCertificateStatusRequest) (confirmation *GetCertificateStatusResponse, err error)
}

Needs to be implemented by a CSMS for handling messages part of the OCPP 2.0 ISO 15118 profile.

type CertificateChain

type CertificateChain struct {
	Certificate      string   `json:"certificate" validate:"required,max=800"`
	ChildCertificate []string `json:"childCertificate,omitempty" validate:"omitempty,max=4,dive,required,max=800"`
}

Contains an X.509 certificate chain, each first DER encoded into binary, and then base64 encoded.

type ChargingStationHandler

type ChargingStationHandler interface {
	// OnDeleteCertificate is called on a charging station whenever a DeleteCertificateRequest is received from the CSMS.
	OnDeleteCertificate(request *DeleteCertificateRequest) (confirmation *DeleteCertificateResponse, err error)
	// OnGetInstalledCertificateIds is called on a charging station whenever a GetInstalledCertificateIdsRequest is received from the CSMS.
	OnGetInstalledCertificateIds(request *GetInstalledCertificateIdsRequest) (confirmation *GetInstalledCertificateIdsResponse, err error)
}

Needs to be implemented by Charging stations for handling messages part of the OCPP 2.0 ISO 15118 profile.

type DeleteCertificateFeature

type DeleteCertificateFeature struct{}

The CSMS requests the Charging Station to delete a specific installed certificate by sending a DeleteCertificateRequest. The Charging Station responds with a DeleteCertificateResponse.

func (DeleteCertificateFeature) GetFeatureName

func (f DeleteCertificateFeature) GetFeatureName() string

func (DeleteCertificateFeature) GetRequestType

func (f DeleteCertificateFeature) GetRequestType() reflect.Type

func (DeleteCertificateFeature) GetResponseType

func (f DeleteCertificateFeature) GetResponseType() reflect.Type

type DeleteCertificateRequest

type DeleteCertificateRequest struct {
	CertificateHashData types.CertificateHashData `json:"certificateHashData" validate:"required"`
}

The field definition of the DeleteCertificate request payload sent by the CSMS to the Charging Station.

func NewDeleteCertificateRequest

func NewDeleteCertificateRequest(certificateHashData types.CertificateHashData) *DeleteCertificateRequest

Creates a new DeleteCertificateRequest, containing all required fields. There are no optional fields for this message.

func (DeleteCertificateRequest) GetFeatureName

func (r DeleteCertificateRequest) GetFeatureName() string

type DeleteCertificateResponse

type DeleteCertificateResponse struct {
	Status DeleteCertificateStatus `json:"status" validate:"required,deleteCertificateStatus"`
}

This field definition of the DeleteCertificate response payload, sent by the Charging Station to the CSMS in response to a DeleteCertificateRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.

func NewDeleteCertificateResponse

func NewDeleteCertificateResponse(status DeleteCertificateStatus) *DeleteCertificateResponse

Creates a new DeleteCertificateResponse, containing all required fields. There are no optional fields for this message.

func (DeleteCertificateResponse) GetFeatureName

func (c DeleteCertificateResponse) GetFeatureName() string

type DeleteCertificateStatus

type DeleteCertificateStatus string

Status returned in response to DeleteCertificateRequest.

const (
	DeleteCertificateStatusAccepted DeleteCertificateStatus = "Accepted"
	DeleteCertificateStatusFailed   DeleteCertificateStatus = "Failed"
	DeleteCertificateStatusNotFound DeleteCertificateStatus = "NotFound"
)

type Get15118EVCertificateFeature

type Get15118EVCertificateFeature struct{}

An EV connected to a Charging Station may request a new certificate. The EV initiates installing a new certificate. The Charging Station forwards the request for a new certificate to the CSMS. The CSMS responds to Charging Station with a message containing the status and optionally new certificate.

func (Get15118EVCertificateFeature) GetFeatureName

func (f Get15118EVCertificateFeature) GetFeatureName() string

func (Get15118EVCertificateFeature) GetRequestType

func (f Get15118EVCertificateFeature) GetRequestType() reflect.Type

func (Get15118EVCertificateFeature) GetResponseType

func (f Get15118EVCertificateFeature) GetResponseType() reflect.Type

type Get15118EVCertificateRequest

type Get15118EVCertificateRequest struct {
	SchemaVersion string `json:"15118SchemaVersion" validate:"required,max=50"`
	ExiRequest    string `json:"exiRequest" validate:"required,max=5500"`
}

The field definition of the Get15118EVCertificate request payload sent by the Charging Station to the CSMS.

func NewGet15118EVCertificateRequest

func NewGet15118EVCertificateRequest(schemaVersion string, exiRequest string) *Get15118EVCertificateRequest

Creates a new Get15118EVCertificateRequest, containing all required fields.

func (Get15118EVCertificateRequest) GetFeatureName

func (r Get15118EVCertificateRequest) GetFeatureName() string

type Get15118EVCertificateResponse

type Get15118EVCertificateResponse struct {
	Status                            types.Certificate15118EVStatus `json:"status" validate:"required,15118EVCertificate"`
	ExiResponse                       string                         `json:"exiResponse" validate:"required,max=5500"`
	ContractSignatureCertificateChain CertificateChain               `json:"contractSignatureCertificateChain" validate:"required"`
	SaProvisioningCertificateChain    CertificateChain               `json:"saProvisioningCertificateChain" validate:"required"`
}

This field definition of the Get15118EVCertificate response payload, sent by the CSMS to the Charging Station in response to a Get15118EVCertificateRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.

func NewGet15118EVCertificateResponse

func NewGet15118EVCertificateResponse(status types.Certificate15118EVStatus, exiResponse string, contractSignatureCertificateChain CertificateChain, saProvisioningCertificateChain CertificateChain) *Get15118EVCertificateResponse

Creates a new Get15118EVCertificateResponse, containing all required fields.

func (Get15118EVCertificateResponse) GetFeatureName

func (c Get15118EVCertificateResponse) GetFeatureName() string

type GetCertificateStatusFeature

type GetCertificateStatusFeature struct{}

For 15118 certificate installation on EVs, the Charging Station requests the CSMS to provide the OCSP certificate status for its 15118 certificates. The CSMS responds with a GetCertificateStatusResponse, containing the OCSP certificate status. The status indicator in the GetCertificateStatusResponse indicates whether or not the CSMS was successful in retrieving the certificate status. It does NOT indicate the validity of the certificate.

func (GetCertificateStatusFeature) GetFeatureName

func (f GetCertificateStatusFeature) GetFeatureName() string

func (GetCertificateStatusFeature) GetRequestType

func (f GetCertificateStatusFeature) GetRequestType() reflect.Type

func (GetCertificateStatusFeature) GetResponseType

func (f GetCertificateStatusFeature) GetResponseType() reflect.Type

type GetCertificateStatusRequest

type GetCertificateStatusRequest struct {
	OcspRequestData types.OCSPRequestDataType `json:"ocspRequestData" validate:"required"`
}

The field definition of the GetCertificateStatus request payload sent by the Charging Station to the CSMS.

func NewGetCertificateStatusRequest

func NewGetCertificateStatusRequest(ocspRequestData types.OCSPRequestDataType) *GetCertificateStatusRequest

Creates a new GetCertificateStatusRequest, containing all required fields. There are no optional fields for this message.

func (GetCertificateStatusRequest) GetFeatureName

func (r GetCertificateStatusRequest) GetFeatureName() string

type GetCertificateStatusResponse

type GetCertificateStatusResponse struct {
	Status     types.GenericStatus `json:"status" validate:"required,genericStatus"`
	OcspResult string              `json:"ocspResult,omitempty" validate:"omitempty,max=5500"`
}

This field definition of the GetCertificateStatus response payload, sent by the CSMS to the Charging Station in response to a GetCertificateStatusRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.

func NewGetCertificateStatusResponse

func NewGetCertificateStatusResponse(status types.GenericStatus) *GetCertificateStatusResponse

Creates a new GetCertificateStatusResponse, containing all required fields. Optional fields may be set afterwards.

func (GetCertificateStatusResponse) GetFeatureName

func (c GetCertificateStatusResponse) GetFeatureName() string

type GetInstalledCertificateIdsFeature

type GetInstalledCertificateIdsFeature struct{}

To facilitate the management of the Charging Station’s installed certificates, a method of retrieving the installed certificates is provided. The CSMS requests the Charging Station to send a list of installed certificates by sending a GetInstalledCertificateIdsRequest. The Charging Station responds with a GetInstalledCertificateIdsResponse.

func (GetInstalledCertificateIdsFeature) GetFeatureName

func (f GetInstalledCertificateIdsFeature) GetFeatureName() string

func (GetInstalledCertificateIdsFeature) GetRequestType

func (f GetInstalledCertificateIdsFeature) GetRequestType() reflect.Type

func (GetInstalledCertificateIdsFeature) GetResponseType

func (f GetInstalledCertificateIdsFeature) GetResponseType() reflect.Type

type GetInstalledCertificateIdsRequest

type GetInstalledCertificateIdsRequest struct {
	TypeOfCertificate types.CertificateUse `json:"typeOfCertificate" validate:"required,certificateUse"`
}

The field definition of the GetInstalledCertificateIdsRequest PDU sent by the CSMS to the Charging Station.

func NewGetInstalledCertificateIdsRequest

func NewGetInstalledCertificateIdsRequest(typeOfCertificate types.CertificateUse) *GetInstalledCertificateIdsRequest

Creates a new GetInstalledCertificateIdsRequest, containing all required fields. There are no optional fields for this message.

func (GetInstalledCertificateIdsRequest) GetFeatureName

func (r GetInstalledCertificateIdsRequest) GetFeatureName() string

type GetInstalledCertificateIdsResponse

type GetInstalledCertificateIdsResponse struct {
	Status              GetInstalledCertificateStatus `json:"status" validate:"required,getInstalledCertificateStatus"`
	CertificateHashData []types.CertificateHashData   `json:"certificateHashData,omitempty" validate:"omitempty,dive"`
}

The field definition of the GetInstalledCertificateIds response payload sent by the Charging Station to the CSMS in response to a GetInstalledCertificateIdsRequest.

func NewGetInstalledCertificateIdsResponse

func NewGetInstalledCertificateIdsResponse(status GetInstalledCertificateStatus) *GetInstalledCertificateIdsResponse

Creates a new NewGetInstalledCertificateIdsResponse, containing all required fields. Additional optional fields may be set afterwards.

func (GetInstalledCertificateIdsResponse) GetFeatureName

func (c GetInstalledCertificateIdsResponse) GetFeatureName() string

type GetInstalledCertificateStatus

type GetInstalledCertificateStatus string

Status returned in response to GetInstalledCertificateIdsRequest, that indicates whether certificate signing has been accepted or rejected.

const (
	GetInstalledCertificateStatusAccepted GetInstalledCertificateStatus = "Accepted" // Normal successful completion (no errors).
	GetInstalledCertificateStatusNotFound GetInstalledCertificateStatus = "NotFound" // Requested resource not found
)

Jump to

Keyboard shortcuts

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