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
- Variables
- type CSMSHandler
- type CertificateAction
- type ChargingStationHandler
- type DeleteCertificateFeature
- type DeleteCertificateRequest
- type DeleteCertificateResponse
- type DeleteCertificateStatus
- type Get15118EVCertificateFeature
- type Get15118EVCertificateRequest
- type Get15118EVCertificateResponse
- type GetCertificateStatusFeature
- type GetCertificateStatusRequest
- type GetCertificateStatusResponse
- type GetInstalledCertificateIdsFeature
- type GetInstalledCertificateIdsRequest
- type GetInstalledCertificateIdsResponse
- type GetInstalledCertificateStatus
- type InstallCertificateFeature
- type InstallCertificateRequest
- type InstallCertificateResponse
- type InstallCertificateStatus
Constants ¶
const DeleteCertificateFeatureName = "DeleteCertificate"
const Get15118EVCertificateFeatureName = "Get15118EVCertificate"
const GetCertificateStatusFeatureName = "GetCertificateStatus"
const GetInstalledCertificateIdsFeatureName = "GetInstalledCertificateIds"
const InstallCertificateFeatureName = "InstallCertificate"
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) (response *Get15118EVCertificateResponse, err error) // OnGetCertificateStatus is called on the CSMS whenever a GetCertificateStatusRequest is received from a charging station. OnGetCertificateStatus(chargingStationID string, request *GetCertificateStatusRequest) (response *GetCertificateStatusResponse, err error) }
Needs to be implemented by a CSMS for handling messages part of the OCPP 2.0 ISO 15118 profile.
type CertificateAction ¶
type CertificateAction string
Defines whether certificate needs to be installed or updated.
const ( CertificateActionInstall CertificateAction = "Install" CertificateActionUpdate CertificateAction = "Update" )
type ChargingStationHandler ¶
type ChargingStationHandler interface { // OnDeleteCertificate is called on a charging station whenever a DeleteCertificateRequest is received from the CSMS. OnDeleteCertificate(request *DeleteCertificateRequest) (response *DeleteCertificateResponse, err error) // OnGetInstalledCertificateIds is called on a charging station whenever a GetInstalledCertificateIdsRequest is received from the CSMS. OnGetInstalledCertificateIds(request *GetInstalledCertificateIdsRequest) (response *GetInstalledCertificateIdsResponse, err error) // OnInstallCertificate is called on a charging station whenever an InstallCertificateRequest is received from the CSMS. OnInstallCertificate(request *InstallCertificateRequest) (response *InstallCertificateResponse, 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"` StatusInfo *types.StatusInfo `json:"statusInfo,omitempty" validate:"omitempty"` }
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. Optional fields may be set afterwards.
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:"iso15118SchemaVersion" validate:"required,max=50"` Action CertificateAction `json:"action" validate:"required,certificateAction"` ExiRequest string `json:"exiRequest" validate:"required,max=5600"` // Raw CertificateInstallationReq request from EV, Base64 encoded. }
The field definition of the Get15118EVCertificate request payload sent by the Charging Station to the CSMS.
func NewGet15118EVCertificateRequest ¶
func NewGet15118EVCertificateRequest(schemaVersion string, action CertificateAction, exiRequest string) *Get15118EVCertificateRequest
Creates a new Get15118EVCertificateRequest, containing all required fields. There are no optional fields for this message.
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=5600"` // Raw CertificateInstallationRes response for the EV, Base64 encoded. StatusInfo *types.StatusInfo `json:"statusInfo,omitempty" validate:"omitempty"` }
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) *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"` StatusInfo *types.StatusInfo `json:"statusInfo,omitempty" validate:"omitempty"` }
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 {
CertificateTypes []types.CertificateUse `json:"certificateType" validate:"omitempty,dive,certificateUse"`
}
The field definition of the GetInstalledCertificateIdsRequest PDU sent by the CSMS to the Charging Station.
func NewGetInstalledCertificateIdsRequest ¶
func NewGetInstalledCertificateIdsRequest() *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"` StatusInfo *types.StatusInfo `json:"statusInfo,omitempty" validate:"omitempty"` CertificateHashDataChain []types.CertificateHashDataChain `json:"certificateHashDataChain,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 )
type InstallCertificateFeature ¶
type InstallCertificateFeature struct{}
The CSMS requests the Charging Station to install a new certificate by sending an InstallCertificateRequest. The certificate may be a root CA certificate, a Sub-CA certificate for an eMobility Operator, Charging Station operator, or a V2G root certificate.
The Charging Station responds with an InstallCertificateResponse.
func (InstallCertificateFeature) GetFeatureName ¶
func (f InstallCertificateFeature) GetFeatureName() string
func (InstallCertificateFeature) GetRequestType ¶
func (f InstallCertificateFeature) GetRequestType() reflect.Type
func (InstallCertificateFeature) GetResponseType ¶
func (f InstallCertificateFeature) GetResponseType() reflect.Type
type InstallCertificateRequest ¶
type InstallCertificateRequest struct { CertificateType types.CertificateUse `json:"certificateType" validate:"required,certificateUse"` // Indicates the certificate type that is sent. Certificate string `json:"certificate" validate:"required,max=5500"` // A PEM encoded X.509 certificate. }
The field definition of the InstallCertificate request payload sent by the CSMS to the Charging Station.
func NewInstallCertificateRequest ¶
func NewInstallCertificateRequest(certificateType types.CertificateUse, certificate string) *InstallCertificateRequest
Creates a new InstallCertificateRequest, containing all required fields. There are no optional fields for this message.
func (InstallCertificateRequest) GetFeatureName ¶
func (r InstallCertificateRequest) GetFeatureName() string
type InstallCertificateResponse ¶
type InstallCertificateResponse struct { Status InstallCertificateStatus `json:"status" validate:"required,installCertificateStatus"` StatusInfo *types.StatusInfo `json:"statusInfo,omitempty" validate:"omitempty"` }
This field definition of the InstallCertificate response payload, sent by the Charging Station to the CSMS in response to a InstallCertificateRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.
func NewInstallCertificateResponse ¶
func NewInstallCertificateResponse(status InstallCertificateStatus) *InstallCertificateResponse
Creates a new InstallCertificateResponse, containing all required fields. There are no optional fields for this message.
func (InstallCertificateResponse) GetFeatureName ¶
func (c InstallCertificateResponse) GetFeatureName() string
type InstallCertificateStatus ¶
type InstallCertificateStatus string
Charging Station indicates if installation was successful.
const ( CertificateStatusAccepted InstallCertificateStatus = "Accepted" CertificateStatusRejected InstallCertificateStatus = "Rejected" CertificateStatusFailed InstallCertificateStatus = "Failed" )