Documentation ¶
Overview ¶
The Local authorization list functional block contains OCPP 2.0 features for synchronizing local authorization lists between CSMS and charging station. Local lists are used for offline and generally optimized authorization.
Index ¶
- Constants
- Variables
- type AuthorizationData
- type CSMSHandler
- type ChargingStationHandler
- type GetLocalListVersionFeature
- type GetLocalListVersionRequest
- type GetLocalListVersionResponse
- type SendLocalListFeature
- type SendLocalListRequest
- type SendLocalListResponse
- type SendLocalListStatus
- type UpdateType
Constants ¶
const GetLocalListVersionFeatureName = "GetLocalListVersion"
const ProfileName = "localAuthList"
const SendLocalListFeatureName = "SendLocalList"
Variables ¶
var Profile = ocpp.NewProfile( ProfileName, GetLocalListVersionFeature{}, SendLocalListFeature{}, )
Functions ¶
This section is empty.
Types ¶
type AuthorizationData ¶
type AuthorizationData struct { IdTokenInfo *types.IdTokenInfo `json:"idTokenInfo,omitempty" validate:"omitempty"` IdToken types.IdToken `json:"idToken"` }
Contains the identifier to use for authorization.
type CSMSHandler ¶
type CSMSHandler interface { }
Needs to be implemented by a CSMS for handling messages part of the OCPP 2.0 Local Authorization List profile.
type ChargingStationHandler ¶
type ChargingStationHandler interface { // OnGetLocalListVersion is called on a charging station whenever a GetLocalListVersionRequest is received from the CSMS. OnGetLocalListVersion(request *GetLocalListVersionRequest) (response *GetLocalListVersionResponse, err error) // OnSendLocalList is called on a charging station whenever a SendLocalListRequest is received from the CSMS. OnSendLocalList(request *SendLocalListRequest) (response *SendLocalListResponse, err error) }
Needs to be implemented by Charging stations for handling messages part of the OCPP 2.0 Local Authorization List profile.
type GetLocalListVersionFeature ¶
type GetLocalListVersionFeature struct{}
The CSMS can request a Charging Station for the version number of the Local Authorization List by sending a GetLocalListVersionRequest. Upon receipt of the GetLocalListVersionRequest Charging Station responds with a GetLocalListVersionResponse containing the version number of its Local Authorization List. The Charging Station SHALL use a version number of 0 (zero) to indicate that the Local Authorization List is empty.
func (GetLocalListVersionFeature) GetFeatureName ¶
func (f GetLocalListVersionFeature) GetFeatureName() string
func (GetLocalListVersionFeature) GetRequestType ¶
func (f GetLocalListVersionFeature) GetRequestType() reflect.Type
func (GetLocalListVersionFeature) GetResponseType ¶
func (f GetLocalListVersionFeature) GetResponseType() reflect.Type
type GetLocalListVersionRequest ¶
type GetLocalListVersionRequest struct { }
The field definition of the GetLocalListVersion request payload sent by the CSMS to the Charging Station.
func NewGetLocalListVersionRequest ¶
func NewGetLocalListVersionRequest() *GetLocalListVersionRequest
Creates a new GetLocalListVersionRequest, which doesn't contain any required or optional fields.
func (GetLocalListVersionRequest) GetFeatureName ¶
func (r GetLocalListVersionRequest) GetFeatureName() string
type GetLocalListVersionResponse ¶
type GetLocalListVersionResponse struct {
VersionNumber int `json:"versionNumber" validate:"gte=0"`
}
This field definition of the GetLocalListVersion response payload, sent by the Charging Station to the CSMS in response to a GetLocalListVersionRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.
func NewGetLocalListVersionResponse ¶
func NewGetLocalListVersionResponse(version int) *GetLocalListVersionResponse
Creates a new GetLocalListVersionResponse, containing all required fields. There are no optional fields for this message.
func (GetLocalListVersionResponse) GetFeatureName ¶
func (c GetLocalListVersionResponse) GetFeatureName() string
type SendLocalListFeature ¶
type SendLocalListFeature struct{}
Enables the CSMS to send a Local Authorization List which a Charging Station can use for the authorization of idTokens. The list MAY be either a full list to replace the current list in the Charging Station or it MAY be a differential list with updates to be applied to the current list in the Charging Station.
To install or update a local authorization list, the CSMS sends a SendLocalListRequest to a Charging Station, which responds with a SendLocalListResponse, containing the status of the operation.
If LocalAuthListEnabled is configured to false on a charging station, this operation will have no effect.
func (SendLocalListFeature) GetFeatureName ¶
func (f SendLocalListFeature) GetFeatureName() string
func (SendLocalListFeature) GetRequestType ¶
func (f SendLocalListFeature) GetRequestType() reflect.Type
func (SendLocalListFeature) GetResponseType ¶
func (f SendLocalListFeature) GetResponseType() reflect.Type
type SendLocalListRequest ¶
type SendLocalListRequest struct { VersionNumber int `json:"versionNumber" validate:"gte=0"` UpdateType UpdateType `json:"updateType" validate:"required,updateType201"` LocalAuthorizationList []AuthorizationData `json:"localAuthorizationList,omitempty" validate:"omitempty,dive"` }
The field definition of the SendLocalList request payload sent by the CSMS to the Charging Station.
func NewSendLocalListRequest ¶
func NewSendLocalListRequest(versionNumber int, updateType UpdateType) *SendLocalListRequest
Creates a new SendLocalListRequest, which doesn't contain any required or optional fields.
func (SendLocalListRequest) GetFeatureName ¶
func (r SendLocalListRequest) GetFeatureName() string
type SendLocalListResponse ¶
type SendLocalListResponse struct { Status SendLocalListStatus `json:"status" validate:"required,sendLocalListStatus"` StatusInfo *types.StatusInfo `json:"statusInfo,omitempty" validate:"omitempty"` }
This field definition of the SendLocalList response payload, sent by the Charging Station to the CSMS in response to a SendLocalListRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.
func NewSendLocalListResponse ¶
func NewSendLocalListResponse(status SendLocalListStatus) *SendLocalListResponse
Creates a new SendLocalListResponse, containing all required fields. There are no optional fields for this message.
func (SendLocalListResponse) GetFeatureName ¶
func (c SendLocalListResponse) GetFeatureName() string
type SendLocalListStatus ¶
type SendLocalListStatus string
Indicates whether the Charging Station has successfully received and applied the update of the Local Authorization List.
const ( SendLocalListStatusAccepted SendLocalListStatus = "Accepted" // Local Authorization List successfully updated. SendLocalListStatusFailed SendLocalListStatus = "Failed" // Failed to update the Local Authorization List. SendLocalListStatusVersionMismatch SendLocalListStatus = "VersionMismatch" // Version number in the request for a differential update is less or equal then version number of current list. )
type UpdateType ¶
type UpdateType string
Indicates the type of update (full or differential) for a SendLocalListRequest.
const ( UpdateTypeDifferential UpdateType = "Differential" // Indicates that the current Local Authorization List must be updated with the values in this message. UpdateTypeFull UpdateType = "Full" // Indicates that the current Local Authorization List must be replaced by the values in this message. )