Documentation ¶
Overview ¶
The Remote control functional block contains OCPP 2.0 features for remote-control management from the CSMS.
Index ¶
- Constants
- Variables
- type CSMSHandler
- type ChargingStationHandler
- type MessageTrigger
- type RequestStartStopStatus
- type RequestStartTransactionFeature
- type RequestStartTransactionRequest
- type RequestStartTransactionResponse
- type RequestStopTransactionFeature
- type RequestStopTransactionRequest
- type RequestStopTransactionResponse
- type TriggerMessageFeature
- type TriggerMessageRequest
- type TriggerMessageResponse
- type TriggerMessageStatus
- type UnlockConnectorFeature
- type UnlockConnectorRequest
- type UnlockConnectorResponse
- type UnlockStatus
Constants ¶
const ( MessageTriggerBootNotification MessageTrigger = "BootNotification" MessageTriggerLogStatusNotification MessageTrigger = "LogStatusNotification" MessageTriggerFirmwareStatusNotification MessageTrigger = "FirmwareStatusNotification" MessageTriggerHeartbeat MessageTrigger = "Heartbeat" MessageTriggerMeterValues MessageTrigger = "MeterValues" MessageTriggerSignChargingStationCertificate MessageTrigger = "SignChargingStationCertificate" MessageTriggerSignV2GCertificate MessageTrigger = "SignV2GCertificate" MessageTriggerStatusNotification MessageTrigger = "StatusNotification" MessageTriggerTransactionEvent MessageTrigger = "TransactionEvent" MessageTriggerSignCombinedCertificate MessageTrigger = "SignCombinedCertificate" MessageTriggerPublishFirmwareStatusNotification MessageTrigger = "PublishFirmwareStatusNotification" TriggerMessageStatusAccepted TriggerMessageStatus = "Accepted" TriggerMessageStatusRejected TriggerMessageStatus = "Rejected" TriggerMessageStatusNotImplemented TriggerMessageStatus = "NotImplemented" )
const ProfileName = "remoteControl"
const RequestStartTransactionFeatureName = "RequestStartTransaction"
const RequestStopTransactionFeatureName = "RequestStopTransaction"
const TriggerMessageFeatureName = "TriggerMessage"
const UnlockConnectorFeatureName = "UnlockConnector"
Variables ¶
var Profile = ocpp.NewProfile( ProfileName, RequestStartTransactionFeature{}, RequestStopTransactionFeature{}, TriggerMessageFeature{}, UnlockConnectorFeature{}, )
Functions ¶
This section is empty.
Types ¶
type CSMSHandler ¶
type CSMSHandler interface { }
Needs to be implemented by a CSMS for handling messages part of the OCPP 2.0 Remote control profile.
type ChargingStationHandler ¶
type ChargingStationHandler interface { // OnRequestStartTransaction is called on a charging station whenever a RequestStartTransactionRequest is received from the CSMS. OnRequestStartTransaction(request *RequestStartTransactionRequest) (response *RequestStartTransactionResponse, err error) // OnRequestStopTransaction is called on a charging station whenever a RequestStopTransactionRequest is received from the CSMS. OnRequestStopTransaction(request *RequestStopTransactionRequest) (response *RequestStopTransactionResponse, err error) // OnTriggerMessage is called on a charging station whenever a TriggerMessageRequest is received from the CSMS. OnTriggerMessage(request *TriggerMessageRequest) (response *TriggerMessageResponse, err error) // OnUnlockConnector is called on a charging station whenever a UnlockConnectorRequest is received from the CSMS. OnUnlockConnector(request *UnlockConnectorRequest) (response *UnlockConnectorResponse, err error) }
Needs to be implemented by Charging stations for handling messages part of the OCPP 2.0 Remote control profile.
type MessageTrigger ¶
type MessageTrigger string
Type of request to be triggered by trigger messages.
type RequestStartStopStatus ¶
type RequestStartStopStatus string
Status reported in RequestStartTransactionResponse.
const ( RequestStartStopStatusAccepted RequestStartStopStatus = "Accepted" RequestStartStopStatusRejected RequestStartStopStatus = "Rejected" )
type RequestStartTransactionFeature ¶
type RequestStartTransactionFeature struct{}
The CSMS may remotely start a transaction for a user. This functionality may be triggered by:
- a CSO, to help out a user, that is having trouble starting a transaction
- a third-party event (e.g. mobile app)
- a previously set ChargingProfile
The CSMS sends a RequestStartTransactionRequest to the Charging Station. The Charging Stations will reply with a RequestStartTransactionResponse.
func (RequestStartTransactionFeature) GetFeatureName ¶
func (f RequestStartTransactionFeature) GetFeatureName() string
func (RequestStartTransactionFeature) GetRequestType ¶
func (f RequestStartTransactionFeature) GetRequestType() reflect.Type
func (RequestStartTransactionFeature) GetResponseType ¶
func (f RequestStartTransactionFeature) GetResponseType() reflect.Type
type RequestStartTransactionRequest ¶
type RequestStartTransactionRequest struct { EvseID *int `json:"evseId,omitempty" validate:"omitempty,gt=0"` RemoteStartID int `json:"remoteStartId" validate:"gte=0"` IDToken types.IdToken `json:"idToken"` ChargingProfile *types.ChargingProfile `json:"chargingProfile,omitempty"` GroupIdToken *types.IdToken `json:"groupIdToken,omitempty" validate:"omitempty,dive"` }
The field definition of the RequestStartTransaction request payload sent by the CSMS to the Charging Station.
func NewRequestStartTransactionRequest ¶
func NewRequestStartTransactionRequest(remoteStartID int, IdToken types.IdToken) *RequestStartTransactionRequest
Creates a new RequestStartTransactionRequest, containing all required fields. Optional fields may be set afterwards.
func (RequestStartTransactionRequest) GetFeatureName ¶
func (r RequestStartTransactionRequest) GetFeatureName() string
type RequestStartTransactionResponse ¶
type RequestStartTransactionResponse struct { Status RequestStartStopStatus `json:"status" validate:"required,requestStartStopStatus"` TransactionID string `json:"transactionId,omitempty" validate:"max=36"` StatusInfo *types.StatusInfo `json:"statusInfo,omitempty"` }
This field definition of the RequestStartTransaction response payload, sent by the Charging Station to the CSMS in response to a RequestStartTransactionRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.
func NewRequestStartTransactionResponse ¶
func NewRequestStartTransactionResponse(status RequestStartStopStatus) *RequestStartTransactionResponse
Creates a new RequestStartTransactionResponse, containing all required fields. Optional fields may be set afterwards.
func (RequestStartTransactionResponse) GetFeatureName ¶
func (c RequestStartTransactionResponse) GetFeatureName() string
type RequestStopTransactionFeature ¶
type RequestStopTransactionFeature struct{}
The CSMS may remotely stop an ongoing transaction for a user. This functionality may be triggered by:
- a CSO, to help out a user, that is having trouble stopping a transaction
- a third-party event (e.g. mobile app)
- the ISO15118-1 use-case F2
The CSMS sends a RequestStopTransactionRequest to the Charging Station. The Charging Stations will reply with a RequestStopTransactionResponse.
func (RequestStopTransactionFeature) GetFeatureName ¶
func (f RequestStopTransactionFeature) GetFeatureName() string
func (RequestStopTransactionFeature) GetRequestType ¶
func (f RequestStopTransactionFeature) GetRequestType() reflect.Type
func (RequestStopTransactionFeature) GetResponseType ¶
func (f RequestStopTransactionFeature) GetResponseType() reflect.Type
type RequestStopTransactionRequest ¶
type RequestStopTransactionRequest struct {
TransactionID string `json:"transactionId" validate:"required,max=36"`
}
The field definition of the RequestStopTransaction request payload sent by the CSMS to the Charging Station.
func NewRequestStopTransactionRequest ¶
func NewRequestStopTransactionRequest(transactionID string) *RequestStopTransactionRequest
Creates a new RequestStopTransactionRequest, containing all required fields. There are no optional fields for this message.
func (RequestStopTransactionRequest) GetFeatureName ¶
func (r RequestStopTransactionRequest) GetFeatureName() string
type RequestStopTransactionResponse ¶
type RequestStopTransactionResponse struct { Status RequestStartStopStatus `json:"status" validate:"required,requestStartStopStatus"` StatusInfo *types.StatusInfo `json:"statusInfo,omitempty"` }
This field definition of the RequestStopTransaction response payload, sent by the Charging Station to the CSMS in response to a RequestStopTransactionRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.
func NewRequestStopTransactionResponse ¶
func NewRequestStopTransactionResponse(status RequestStartStopStatus) *RequestStopTransactionResponse
Creates a new RequestStopTransactionResponse, containing all required fields. Optional fields may be set afterwards.
func (RequestStopTransactionResponse) GetFeatureName ¶
func (c RequestStopTransactionResponse) GetFeatureName() string
type TriggerMessageFeature ¶
type TriggerMessageFeature struct{}
The CSMS may request a Charging Station to send a Charging Station-initiated message. This is achieved sending a TriggerMessageRequest to a charging station, indicating which message should be received. The charging station responds with a TriggerMessageResponse, indicating whether it will send a message or not.
func (TriggerMessageFeature) GetFeatureName ¶
func (f TriggerMessageFeature) GetFeatureName() string
func (TriggerMessageFeature) GetRequestType ¶
func (f TriggerMessageFeature) GetRequestType() reflect.Type
func (TriggerMessageFeature) GetResponseType ¶
func (f TriggerMessageFeature) GetResponseType() reflect.Type
type TriggerMessageRequest ¶
type TriggerMessageRequest struct { RequestedMessage MessageTrigger `json:"requestedMessage" validate:"required,messageTrigger"` Evse *types.EVSE `json:"evse,omitempty" validate:"omitempty"` }
The field definition of the TriggerMessage request payload sent by the CSMS to the Charging Station.
func NewTriggerMessageRequest ¶
func NewTriggerMessageRequest(requestedMessage MessageTrigger) *TriggerMessageRequest
Creates a new TriggerMessageRequest, containing all required fields. Optional fields may be set afterwards.
func (TriggerMessageRequest) GetFeatureName ¶
func (r TriggerMessageRequest) GetFeatureName() string
type TriggerMessageResponse ¶
type TriggerMessageResponse struct { Status TriggerMessageStatus `json:"status" validate:"required,triggerMessageStatus"` StatusInfo *types.StatusInfo `json:"statusInfo,omitempty"` }
This field definition of the TriggerMessage response payload, sent by the Charging Station to the CSMS in response to a TriggerMessageRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.
func NewTriggerMessageResponse ¶
func NewTriggerMessageResponse(status TriggerMessageStatus) *TriggerMessageResponse
Creates a new TriggerMessageResponse, containing all required fields. Optional fields may be set afterwards.
func (TriggerMessageResponse) GetFeatureName ¶
func (c TriggerMessageResponse) GetFeatureName() string
type UnlockConnectorFeature ¶
type UnlockConnectorFeature struct{}
It sometimes happens that a connector of a Charging Station socket does not unlock correctly. This happens most of the time when there is tension on the charging cable. This means the driver cannot unplug his charging cable from the Charging Station. To help a driver, the CSO can send a UnlockConnectorRequest to the Charging Station. The Charging Station will then try to unlock the connector again and respond with an UnlockConnectorResponse.
func (UnlockConnectorFeature) GetFeatureName ¶
func (f UnlockConnectorFeature) GetFeatureName() string
func (UnlockConnectorFeature) GetRequestType ¶
func (f UnlockConnectorFeature) GetRequestType() reflect.Type
func (UnlockConnectorFeature) GetResponseType ¶
func (f UnlockConnectorFeature) GetResponseType() reflect.Type
type UnlockConnectorRequest ¶
type UnlockConnectorRequest struct { EvseID int `json:"evseId" validate:"gte=0"` ConnectorID int `json:"connectorId" validate:"gte=0"` }
The field definition of the UnlockConnector request payload sent by the CSMS to the Charging Station.
func NewUnlockConnectorRequest ¶
func NewUnlockConnectorRequest(evseID int, connectorID int) *UnlockConnectorRequest
Creates a new UnlockConnectorRequest, containing all required fields. There are no optional fields for this message.
func (UnlockConnectorRequest) GetFeatureName ¶
func (r UnlockConnectorRequest) GetFeatureName() string
type UnlockConnectorResponse ¶
type UnlockConnectorResponse struct { Status UnlockStatus `json:"status" validate:"required,unlockStatus"` StatusInfo *types.StatusInfo `json:"statusInfo,omitempty"` }
This field definition of the UnlockConnector response payload, sent by the Charging Station to the CSMS in response to a UnlockConnectorRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.
func NewUnlockConnectorResponse ¶
func NewUnlockConnectorResponse(status UnlockStatus) *UnlockConnectorResponse
Creates a new UnlockConnectorResponse, containing all required fields. Optional fields may be set afterwards.
func (UnlockConnectorResponse) GetFeatureName ¶
func (c UnlockConnectorResponse) GetFeatureName() string
type UnlockStatus ¶
type UnlockStatus string
Status in UnlockConnectorResponse.
const ( UnlockStatusUnlocked UnlockStatus = "Unlocked" // Connector has successfully been unlocked. UnlockStatusUnlockFailed UnlockStatus = "UnlockFailed" // Failed to unlock the connector. UnlockStatusOngoingAuthorizedTransaction UnlockStatus = "OngoingAuthorizedTransaction" // The connector is not unlocked, because there is still an authorized transaction ongoing. UnlockStatusUnknownConnector UnlockStatus = "UnknownConnector" // The specified connector is not known by the Charging Station. )