Documentation ¶
Overview ¶
The provisioning functional block contains features that help a CSO to provision their Charging Stations, allowing them on their network and retrieving configuration information from these Charging Stations. Additionally, it contains features for retrieving information about the configuration of Charging Stations, make changes to the configuration, resetting it etc.
Index ¶
- Constants
- Variables
- type APN
- type APNAuthentication
- type BootNotificationFeature
- type BootNotificationRequest
- type BootNotificationResponse
- type BootReason
- type CSMSHandler
- type ChargingStationHandler
- type ChargingStationType
- type ComponentCriterion
- type DataType
- type GetBaseReportFeature
- type GetBaseReportRequest
- type GetBaseReportResponse
- type GetReportFeature
- type GetReportRequest
- type GetReportResponse
- type GetVariableData
- type GetVariableResult
- type GetVariableStatus
- type GetVariablesFeature
- type GetVariablesRequest
- type GetVariablesResponse
- type ModemType
- type Mutability
- type NetworkConnectionProfile
- type NotifyReportFeature
- type NotifyReportRequest
- type NotifyReportResponse
- type OCPPInterface
- type OCPPTransport
- type OCPPVersion
- type RegistrationStatus
- type ReportBaseType
- type ReportData
- type ResetFeature
- type ResetRequest
- type ResetResponse
- type ResetStatus
- type ResetType
- type SetNetworkProfileFeature
- type SetNetworkProfileRequest
- type SetNetworkProfileResponse
- type SetNetworkProfileStatus
- type SetNetworkProfileType
- type SetVariableData
- type SetVariableResult
- type SetVariableStatus
- type SetVariablesFeature
- type SetVariablesRequest
- type SetVariablesResponse
- type VPN
- type VPNType
- type VariableAttribute
- type VariableCharacteristics
Constants ¶
const ( RegistrationStatusAccepted RegistrationStatus = "Accepted" RegistrationStatusPending RegistrationStatus = "Pending" RegistrationStatusRejected RegistrationStatus = "Rejected" BootReasonApplicationReset BootReason = "ApplicationReset" BootReasonFirmwareUpdate BootReason = "FirmwareUpdate" BootReasonLocalReset BootReason = "LocalReset" BootReasonPowerUp BootReason = "PowerUp" BootReasonRemoteReset BootReason = "RemoteReset" BootReasonScheduledReset BootReason = "ScheduledReset" BootReasonTriggered BootReason = "Triggered" BootReasonUnknown BootReason = "Unknown" BootReasonWatchdog BootReason = "Watchdog" )
const ( OCPPVersion12 OCPPVersion = "OCPP12" // 1.2 OCPPVersion15 OCPPVersion = "OCPP15" // 1.5 OCPPVersion16 OCPPVersion = "OCPP16" // 1.6 OCPPVersion20 OCPPVersion = "OCPP20" // 2.0 OCPPTransportJSON OCPPTransport = "JSON" // Use JSON over WebSockets for transport of OCPP PDU’s OCPPTransportSOAP OCPPTransport = "SOAP" // Use SOAP for transport of OCPP PDU’s OCPPInterfaceWired0 OCPPInterface = "Wired0" OCPPInterfaceWired1 OCPPInterface = "Wired1" OCPPInterfaceWired2 OCPPInterface = "Wired2" OCPPInterfaceWired3 OCPPInterface = "Wired3" OCPPInterfaceWireless0 OCPPInterface = "Wireless0" OCPPInterfaceWireless1 OCPPInterface = "Wireless1" OCPPInterfaceWireless2 OCPPInterface = "Wireless2" OCPPInterfaceWireless3 OCPPInterface = "Wireless3" VPNTypeIKEv2 VPNType = "IKEv2" VPNTypeIPSec VPNType = "IPSec" VPNTypeL2TP VPNType = "L2TP" VPNTypePPTP VPNType = "PPTP" APNAuthenticationCHAP APNAuthentication = "CHAP" APNAuthenticationNone APNAuthentication = "NONE" APNAuthenticationPAP APNAuthentication = "PAP" APNAuthenticationAuto APNAuthentication = "AUTO" // Sequentially try CHAP, PAP, NONE. SetNetworkProfileStatusAccepted SetNetworkProfileStatus = "Accepted" SetNetworkProfileStatusRejected SetNetworkProfileStatus = "Rejected" SetNetworkProfileStatusFailed SetNetworkProfileStatus = "Failed" )
const BootNotificationFeatureName = "BootNotification"
const GetBaseReportFeatureName = "GetBaseReport"
const GetReportFeatureName = "GetReport"
const GetVariablesFeatureName = "GetVariables"
const NotifyReportFeatureName = "NotifyReport"
const ProfileName = "provisioning"
const ResetFeatureName = "Reset"
const SetNetworkProfileFeatureName = "SetNetworkProfile"
const SetVariablesFeatureName = "SetVariables"
Variables ¶
var Profile = ocpp.NewProfile( ProfileName, BootNotificationFeature{}, GetBaseReportFeature{}, GetReportFeature{}, GetVariablesFeature{}, NotifyReportFeature{}, ResetFeature{}, SetNetworkProfileFeature{}, SetVariablesFeature{}, )
Functions ¶
This section is empty.
Types ¶
type APN ¶
type APN struct { APN string `json:"apn" validate:"required,max=512"` // The Access Point Name as an URL. APNUsername string `json:"apnUserName,omitempty" validate:"omitempty,max=20"` // APN username. APNPassword string `json:"apnPassword,omitempty" validate:"omitempty,max=20"` // APN password. SimPin *int `json:"simPin,omitempty" validate:"omitempty,gte=0"` // SIM card pin code. PreferredNetwork string `json:"preferredNetwork,omitempty" validate:"omitempty,max=6"` // Preferred network, written as MCC and MNC concatenated. UseOnlyPreferredNetwork bool `json:"useOnlyPreferredNetwork,omitempty"` // Use only the preferred Network, do not dial in when not available. APNAuthentication APNAuthentication `json:"apnAuthentication" validate:"required,apnAuthentication"` // Authentication method. }
type BootNotificationFeature ¶
type BootNotificationFeature struct{}
After each (re)boot, a Charging Station SHALL send a request to the CSMS with information about its configuration (e.g. version, vendor, etc.). The CSMS SHALL respond to indicate whether it will accept the Charging Station. Between the physical power-on/reboot and the successful completion of a BootNotification, where CSMS returns Accepted or Pending, the Charging Station SHALL NOT send any other request to the CSMS.
When the CSMS responds with a BootNotificationResponse with a status Accepted, the Charging Station will adjust the heartbeat interval in accordance with the interval from the response PDU and it is RECOMMENDED to synchronize its internal clock with the supplied CSMS’s current time.
If that interval value is zero, the Charging Station chooses a waiting interval on its own, in a way that avoids flooding the CSMS with requests. If the CSMS returns the Pending status, the communication channel SHOULD NOT be closed by either the Charging Station or the CSMS.
The CSMS MAY send request messages to retrieve information from the Charging Station or change its configuration.
func (BootNotificationFeature) GetFeatureName ¶
func (f BootNotificationFeature) GetFeatureName() string
func (BootNotificationFeature) GetRequestType ¶
func (f BootNotificationFeature) GetRequestType() reflect.Type
func (BootNotificationFeature) GetResponseType ¶
func (f BootNotificationFeature) GetResponseType() reflect.Type
type BootNotificationRequest ¶
type BootNotificationRequest struct { Reason BootReason `json:"reason" validate:"required,bootReason"` ChargingStation ChargingStationType `json:"chargingStation" validate:"required,dive"` }
The field definition of the BootNotification request payload sent by the Charging Station to the CSMS.
func NewBootNotificationRequest ¶
func NewBootNotificationRequest(reason BootReason, model string, vendorName string) *BootNotificationRequest
Creates a new BootNotificationRequest, containing all required fields. Optional fields may be set afterwards.
func (BootNotificationRequest) GetFeatureName ¶
func (r BootNotificationRequest) GetFeatureName() string
type BootNotificationResponse ¶
type BootNotificationResponse struct { CurrentTime *types.DateTime `json:"currentTime" validate:"required"` Interval int `json:"interval" validate:"gte=0"` Status RegistrationStatus `json:"status" validate:"required,registrationStatus"` StatusInfo *types.StatusInfo `json:"statusInfo,omitempty" validate:"omitempty"` }
The field definition of the BootNotification response payload, sent by the CSMS to the Charging Station in response to a BootNotificationRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.
func NewBootNotificationResponse ¶
func NewBootNotificationResponse(currentTime *types.DateTime, interval int, status RegistrationStatus) *BootNotificationResponse
Creates a new BootNotificationResponse. There are no optional fields for this message.
func (BootNotificationResponse) GetFeatureName ¶
func (c BootNotificationResponse) GetFeatureName() string
type BootReason ¶
type BootReason string
The reason for sending a BootNotification event to the CSMS.
type CSMSHandler ¶
type CSMSHandler interface { // OnBootNotification is called on the CSMS whenever a BootNotificationRequest is received from a charging station. OnBootNotification(chargingStationID string, request *BootNotificationRequest) (response *BootNotificationResponse, err error) // OnNotifyReport is called on the CSMS whenever a NotifyReportRequest is received from a charging station. OnNotifyReport(chargingStationID string, request *NotifyReportRequest) (response *NotifyReportResponse, err error) }
Needs to be implemented by a CSMS for handling messages part of the OCPP 2.0 Provisioning profile.
type ChargingStationHandler ¶
type ChargingStationHandler interface { // OnGetBaseReport is called on a charging station whenever a GetBaseReportRequest is received from the CSMS. OnGetBaseReport(request *GetBaseReportRequest) (response *GetBaseReportResponse, err error) // OnGetReport is called on a charging station whenever a GetReportRequest is received from the CSMS. OnGetReport(request *GetReportRequest) (response *GetReportResponse, err error) // OnGetVariables is called on a charging station whenever a GetVariablesRequest is received from the CSMS. OnGetVariables(request *GetVariablesRequest) (response *GetVariablesResponse, err error) // OnReset is called on a charging station whenever a ResetRequest is received from the CSMS. OnReset(request *ResetRequest) (response *ResetResponse, err error) // OnSetNetworkProfile is called on a charging station whenever a SetNetworkProfileRequest is received from the CSMS. OnSetNetworkProfile(request *SetNetworkProfileRequest) (response *SetNetworkProfileResponse, err error) // OnSetVariables is called on a charging station whenever a SetVariablesRequest is received from the CSMS. OnSetVariables(request *SetVariablesRequest) (response *SetVariablesResponse, err error) }
Needs to be implemented by Charging stations for handling messages part of the OCPP 2.0 Provisioning profile.
type ChargingStationType ¶
type ChargingStationType struct { SerialNumber string `json:"serialNumber,omitempty" validate:"max=25"` Model string `json:"model" validate:"required,max=20"` VendorName string `json:"vendorName" validate:"required,max=50"` FirmwareVersion string `json:"firmwareVersion,omitempty" validate:"max=50"` Modem *ModemType `json:"modem,omitempty"` }
The physical system where an Electrical Vehicle (EV) can be charged.
type ComponentCriterion ¶
type ComponentCriterion string
ComponentCriterion indicates the criterion for components requested in GetReportRequest.
const ( ComponentCriterionActive ComponentCriterion = "Active" ComponentCriterionAvailable ComponentCriterion = "Available" ComponentCriterionEnabled ComponentCriterion = "Enabled" ComponentCriterionProblem ComponentCriterion = "Problem" )
type GetBaseReportFeature ¶
type GetBaseReportFeature struct{}
The CSO may trigger the CSMS to request a report from a Charging Station. The CSMS shall then request a Charging Station to send a predefined report as defined in ReportBase. The Charging Station responds with GetBaseReportResponse. The result will be returned asynchronously in one or more NotifyReportRequest messages (one for each report part).
func (GetBaseReportFeature) GetFeatureName ¶
func (f GetBaseReportFeature) GetFeatureName() string
func (GetBaseReportFeature) GetRequestType ¶
func (f GetBaseReportFeature) GetRequestType() reflect.Type
func (GetBaseReportFeature) GetResponseType ¶
func (f GetBaseReportFeature) GetResponseType() reflect.Type
type GetBaseReportRequest ¶
type GetBaseReportRequest struct { RequestID int `json:"requestId"` ReportBase ReportBaseType `json:"reportBase" validate:"required,reportBaseType"` }
The field definition of the GetBaseReport request payload sent by the CSMS to the Charging Station.
func NewGetBaseReportRequest ¶
func NewGetBaseReportRequest(requestID int, reportBase ReportBaseType) *GetBaseReportRequest
Creates a new GetBaseReportRequest, containing all required fields. There are no optional fields for this message.
func (GetBaseReportRequest) GetFeatureName ¶
func (r GetBaseReportRequest) GetFeatureName() string
type GetBaseReportResponse ¶
type GetBaseReportResponse struct { Status types.GenericDeviceModelStatus `json:"status" validate:"required,genericDeviceModelStatus"` StatusInfo *types.StatusInfo `json:"statusInfo,omitempty" validate:"omitempty"` }
This field definition of the GetBaseReport response payload, sent by the Charging Station to the CSMS in response to a GetBaseReportRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.
func NewGetBaseReportResponse ¶
func NewGetBaseReportResponse(status types.GenericDeviceModelStatus) *GetBaseReportResponse
Creates a new GetBaseReportResponse, containing all required fields. There are no optional fields for this message.
func (GetBaseReportResponse) GetFeatureName ¶
func (c GetBaseReportResponse) GetFeatureName() string
type GetReportFeature ¶
type GetReportFeature struct{}
The CSO may trigger the CSMS to request a report from a Charging Station. The CSMS shall then request a Charging Station to send a report of all Components and Variable limited to those that match ComponentCriteria and/or the list of ComponentVariables. The Charging Station responds with GetReportResponse. The result will be returned asynchronously in one or more NotifyReportRequest messages (one for each report part).
func (GetReportFeature) GetFeatureName ¶
func (f GetReportFeature) GetFeatureName() string
func (GetReportFeature) GetRequestType ¶
func (f GetReportFeature) GetRequestType() reflect.Type
func (GetReportFeature) GetResponseType ¶
func (f GetReportFeature) GetResponseType() reflect.Type
type GetReportRequest ¶
type GetReportRequest struct { RequestID *int `json:"requestId,omitempty" validate:"omitempty,gte=0"` ComponentCriteria []ComponentCriterion `json:"componentCriteria,omitempty" validate:"omitempty,max=4,dive,componentCriterion"` ComponentVariable []types.ComponentVariable `json:"componentVariable,omitempty" validate:"omitempty,dive"` }
The field definition of the GetReport request payload sent by the CSMS to the Charging Station.
func NewGetReportRequest ¶
func NewGetReportRequest() *GetReportRequest
Creates a new GetReportRequest, containing all required fields. Optional fields may be set afterwards.
func (GetReportRequest) GetFeatureName ¶
func (r GetReportRequest) GetFeatureName() string
type GetReportResponse ¶
type GetReportResponse struct {
Status types.GenericDeviceModelStatus `json:"status" validate:"required,genericDeviceModelStatus"`
}
This field definition of the GetReport response payload, sent by the Charging Station to the CSMS in response to a GetReportRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.
func NewGetReportResponse ¶
func NewGetReportResponse(status types.GenericDeviceModelStatus) *GetReportResponse
Creates a new GetReportResponse, containing all required fields. There are no optional fields for this message.
func (GetReportResponse) GetFeatureName ¶
func (c GetReportResponse) GetFeatureName() string
type GetVariableData ¶
type GetVariableResult ¶
type GetVariableResult struct { AttributeStatus GetVariableStatus `json:"attributeStatus" validate:"required,getVariableStatus"` AttributeType types.Attribute `json:"attributeType,omitempty" validate:"omitempty,attribute"` AttributeValue string `json:"attributeValue,omitempty" validate:"omitempty,max=1000"` Component types.Component `json:"component" validate:"required"` Variable types.Variable `json:"variable" validate:"required"` }
type GetVariableStatus ¶
type GetVariableStatus string
GetVariableStatus indicates the result status of getting a variable in GetVariablesResponse.
const ( GetVariableStatusAccepted GetVariableStatus = "Accepted" GetVariableStatusRejected GetVariableStatus = "Rejected" GetVariableStatusUnknownComponent GetVariableStatus = "UnknownComponent" GetVariableStatusUnknownVariable GetVariableStatus = "UnknownVariable" GetVariableStatusNotSupported GetVariableStatus = "NotSupportedAttributeType" )
type GetVariablesFeature ¶
type GetVariablesFeature struct{}
The CSO may trigger the CSMS to request to request for a number of variables in a Charging Station. The CSMS request the Charging Station for a number of variables (of one or more components) with GetVariablesRequest with a list of requested variables. The Charging Station responds with a GetVariablesResponse with the requested variables.
It is not possible to get all attributes of all variables in one call.
func (GetVariablesFeature) GetFeatureName ¶
func (f GetVariablesFeature) GetFeatureName() string
func (GetVariablesFeature) GetRequestType ¶
func (f GetVariablesFeature) GetRequestType() reflect.Type
func (GetVariablesFeature) GetResponseType ¶
func (f GetVariablesFeature) GetResponseType() reflect.Type
type GetVariablesRequest ¶
type GetVariablesRequest struct {
GetVariableData []GetVariableData `json:"getVariableData" validate:"required,min=1,dive"`
}
The field definition of the GetVariables request payload sent by the CSMS to the Charging Station.
func NewGetVariablesRequest ¶
func NewGetVariablesRequest(variableData []GetVariableData) *GetVariablesRequest
Creates a new GetVariablesRequest, containing all required fields. There are no optional fields for this message.
func (GetVariablesRequest) GetFeatureName ¶
func (r GetVariablesRequest) GetFeatureName() string
type GetVariablesResponse ¶
type GetVariablesResponse struct {
GetVariableResult []GetVariableResult `json:"getVariableResult" validate:"required,min=1,dive"`
}
This field definition of the GetVariables response payload, sent by the Charging Station to the CSMS in response to a GetVariablesRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.
func NewGetVariablesResponse ¶
func NewGetVariablesResponse(result []GetVariableResult) *GetVariablesResponse
Creates a new GetVariablesResponse, containing all required fields. There are no optional fields for this message.
func (GetVariablesResponse) GetFeatureName ¶
func (c GetVariablesResponse) GetFeatureName() string
type ModemType ¶
type ModemType struct { Iccid string `json:"iccid,omitempty" validate:"max=20"` Imsi string `json:"imsi,omitempty" validate:"max=20"` }
Defines parameters required for initiating and maintaining wireless communication with other devices.
type Mutability ¶
type Mutability string
Mutability defines the mutability of an attribute.
const ( MutabilityReadOnly Mutability = "ReadOnly" MutabilityWriteOnly Mutability = "WriteOnly" MutabilityReadWrite Mutability = "ReadWrite" )
type NetworkConnectionProfile ¶
type NetworkConnectionProfile struct { OCPPVersion OCPPVersion `json:"ocppVersion" validate:"required,ocppVersion"` // The OCPP version used for this communication function. OCPPTransport OCPPTransport `json:"ocppTransport" validate:"required,ocppTransport"` // Defines the transport protocol (only OCPP-J is supported by this library). CSMSUrl string `json:"ocppCsmsUrl" validate:"required,max=512,url"` // URL of the CSMS(s) that this Charging Station communicates with. MessageTimeout int `json:"messageTimeout" validate:"gte=-1"` // Duration in seconds before a message send by the Charging Station via this network connection times out. SecurityProfile int `json:"securityProfile"` // The security profile used when connecting to the CSMS with this NetworkConnectionProfile. OCPPInterface OCPPInterface `json:"ocppInterface" validate:"required,ocppInterface"` // Applicable Network Interface. VPN *VPN `json:"vpn,omitempty" validate:"omitempty"` // Settings to be used to set up the VPN connection. APN *APN `json:"apn,omitempty" validate:"omitempty"` // Collection of configuration data needed to make a data-connection over a cellular network. }
NetworkConnectionProfile defines the functional and technical parameters of a communication link.
type NotifyReportFeature ¶
type NotifyReportFeature struct{}
A Charging Station may send reports to the CSMS on demand, when requested to do so. After receiving a GetBaseReport from the CSMS, a Charging Station asynchronously sends the results in one or more NotifyReportRequest messages.
The CSMS responds with NotifyReportResponse for each received request.
func (NotifyReportFeature) GetFeatureName ¶
func (f NotifyReportFeature) GetFeatureName() string
func (NotifyReportFeature) GetRequestType ¶
func (f NotifyReportFeature) GetRequestType() reflect.Type
func (NotifyReportFeature) GetResponseType ¶
func (f NotifyReportFeature) GetResponseType() reflect.Type
type NotifyReportRequest ¶
type NotifyReportRequest struct { RequestID int `json:"requestId" validate:"gte=0"` // The id of the GetMonitoringRequest that requested this report. GeneratedAt *types.DateTime `json:"generatedAt" validate:"required"` // Timestamp of the moment this message was generated at the Charging Station. Tbc bool `json:"tbc,omitempty" validate:"omitempty"` // “to be continued” indicator. Indicates whether another part of the monitoringData follows in an upcoming notifyMonitoringReportRequest message. Default value when omitted is false. SeqNo int `json:"seqNo" validate:"gte=0"` // Sequence number of this message. First message starts at 0. ReportData []ReportData `json:"reportData,omitempty" validate:"omitempty,dive"` // List of ReportData }
The field definition of the NotifyReport request payload sent by the Charging Station to the CSMS.
func NewNotifyReportRequest ¶
func NewNotifyReportRequest(requestID int, generatedAt *types.DateTime, seqNo int) *NotifyReportRequest
Creates a new NotifyReportRequest, containing all required fields. Optional fields may be set afterwards.
func (NotifyReportRequest) GetFeatureName ¶
func (r NotifyReportRequest) GetFeatureName() string
type NotifyReportResponse ¶
type NotifyReportResponse struct { }
The field definition of the NotifyReport response payload, sent by the CSMS to the Charging Station in response to a NotifyReportRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.
func NewNotifyReportResponse ¶
func NewNotifyReportResponse() *NotifyReportResponse
Creates a new NotifyReportResponse. There are no optional fields for this message.
func (NotifyReportResponse) GetFeatureName ¶
func (c NotifyReportResponse) GetFeatureName() string
type OCPPTransport ¶
type OCPPTransport string
OCPP transport mechanisms. SOAP is currently not a valid value for OCPP 2.0 (and is unsupported by this library).
type RegistrationStatus ¶
type RegistrationStatus string
Result of registration in response to a BootNotification request.
type ReportBaseType ¶
type ReportBaseType string
Requested availability change in GetBaseReportRequest.
const ( ReportTypeConfigurationInventory ReportBaseType = "ConfigurationInventory" ReportTypeFullInventory ReportBaseType = "FullInventory" ReportTypeSummaryInventory ReportBaseType = "SummaryInventory" )
type ReportData ¶
type ReportData struct { Component types.Component `json:"component" validate:"required"` Variable types.Variable `json:"variable" validate:"required"` VariableAttribute []VariableAttribute `json:"variableAttribute" validate:"required,min=1,max=4,dive"` VariableCharacteristics *VariableCharacteristics `json:"variableCharacteristics,omitempty" validate:"omitempty"` }
ReportData is a struct to report components, variables and variable attributes and characteristics.
type ResetFeature ¶
type ResetFeature struct{}
The CSO may trigger the CSMS to request a Charging Station to reset itself or an EVSE. This can be used when a Charging Station is not functioning correctly, or when the configuration (e.g. network, security profiles, etc.) on the Charging Station changed, that needs an explicit reset.
The CSMS sends a ResetRequest to the Charging Station. The Charging Station replies with a ResetResponse, then proceeds to reset itself, either immediately or whenever possible.
func (ResetFeature) GetFeatureName ¶
func (f ResetFeature) GetFeatureName() string
func (ResetFeature) GetRequestType ¶
func (f ResetFeature) GetRequestType() reflect.Type
func (ResetFeature) GetResponseType ¶
func (f ResetFeature) GetResponseType() reflect.Type
type ResetRequest ¶
type ResetRequest struct { Type ResetType `json:"type" validate:"resetType"` EvseID *int `json:"evseId,omitempty" validate:"omitempty,gte=0"` }
The field definition of the Reset request payload sent by the CSMS to the Charging Station.
func NewResetRequest ¶
func NewResetRequest(t ResetType) *ResetRequest
Creates a new ResetRequest, containing all required fields. Optional fields may be set afterwards.
func (ResetRequest) GetFeatureName ¶
func (r ResetRequest) GetFeatureName() string
type ResetResponse ¶
type ResetResponse struct { Status ResetStatus `json:"status" validate:"required,resetStatus"` StatusInfo *types.StatusInfo `json:"statusInfo" validate:"omitempty"` }
This field definition of the Reset response payload, sent by the Charging Station to the CSMS in response to a ResetRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.
func NewResetResponse ¶
func NewResetResponse(status ResetStatus) *ResetResponse
Creates a new ResetResponse, containing all required fields. Optional fields may be set afterwards.
func (ResetResponse) GetFeatureName ¶
func (c ResetResponse) GetFeatureName() string
type ResetStatus ¶
type ResetStatus string
Result of a ResetRequest. This indicates whether the Charging Station is able to perform the reset.
const ( ResetStatusAccepted ResetStatus = "Accepted" ResetStatusRejected ResetStatus = "Rejected" ResetStatusScheduled ResetStatus = "Scheduled" )
type ResetType ¶
type ResetType string
ResetType indicates the type of reset that the charging station or EVSE should perform, as requested by the CSMS in a ResetRequest.
type SetNetworkProfileFeature ¶
type SetNetworkProfileFeature struct{}
The CSMS may update the connection details on the Charging Station. For instance in preparation of a migration to a new CSMS. In order to achieve this, the CSMS sends a SetNetworkProfileRequest PDU containing an updated connection profile.
The Charging station validates the content and stores the new data, eventually responding with a SetNetworkProfileResponse PDU. After completion of this use case, the Charging Station to CSMS connection data has been updated.
func (SetNetworkProfileFeature) GetFeatureName ¶
func (f SetNetworkProfileFeature) GetFeatureName() string
func (SetNetworkProfileFeature) GetRequestType ¶
func (f SetNetworkProfileFeature) GetRequestType() reflect.Type
func (SetNetworkProfileFeature) GetResponseType ¶
func (f SetNetworkProfileFeature) GetResponseType() reflect.Type
type SetNetworkProfileRequest ¶
type SetNetworkProfileRequest struct { ConfigurationSlot int `json:"configurationSlot" validate:"gte=0"` // Slot in which the configuration should be stored. ConnectionData NetworkConnectionProfile `json:"connectionData" validate:"required"` // Connection details. }
The field definition of the SetNetworkProfile request payload sent by the CSMS to the Charging Station.
func NewSetNetworkProfileRequest ¶
func NewSetNetworkProfileRequest(configurationSlot int, connectionData NetworkConnectionProfile) *SetNetworkProfileRequest
Creates a new SetNetworkProfileRequest, containing all required fields. There are no optional fields for this message.
func (SetNetworkProfileRequest) GetFeatureName ¶
func (r SetNetworkProfileRequest) GetFeatureName() string
type SetNetworkProfileResponse ¶
type SetNetworkProfileResponse struct { Status SetNetworkProfileStatus `json:"status" validate:"required,setNetworkProfileStatus"` StatusInfo *types.StatusInfo `json:"statusInfo" validate:"omitempty"` }
Field definition of the SetNetworkProfile response payload, sent by the Charging Station to the CSMS in response to a SetNetworkProfileRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.
func NewSetNetworkProfileResponse ¶
func NewSetNetworkProfileResponse(status SetNetworkProfileStatus) *SetNetworkProfileResponse
Creates a new SetNetworkProfileResponse, containing all required fields. Optional fields may be set afterwards.
func (SetNetworkProfileResponse) GetFeatureName ¶
func (c SetNetworkProfileResponse) GetFeatureName() string
type SetNetworkProfileStatus ¶
type SetNetworkProfileStatus string
Result of a SetNetworkProfileRequest.
type SetNetworkProfileType ¶
type SetNetworkProfileType string
SetNetworkProfileType indicates the type of reset that the charging station or EVSE should perform, as requested by the CSMS in a SetNetworkProfileRequest.
type SetVariableData ¶
type SetVariableData struct { AttributeType types.Attribute `json:"attributeType,omitempty" validate:"omitempty,attribute"` AttributeValue string `json:"attributeValue" validate:"required,max=1000"` Component types.Component `json:"component" validate:"required"` Variable types.Variable `json:"variable" validate:"required"` }
type SetVariableResult ¶
type SetVariableResult struct { AttributeType types.Attribute `json:"attributeType,omitempty" validate:"omitempty,attribute"` AttributeStatus SetVariableStatus `json:"attributeStatus" validate:"required,getVariableStatus"` Component types.Component `json:"component" validate:"required"` Variable types.Variable `json:"variable" validate:"required"` StatusInfo *types.StatusInfo `json:"statusInfo,omitempty" validate:"omitempty"` }
type SetVariableStatus ¶
type SetVariableStatus string
SetVariableStatus indicates the result status of setting a variable in SetVariablesResponse.
const ( SetVariableStatusAccepted SetVariableStatus = "Accepted" SetVariableStatusRejected SetVariableStatus = "Rejected" SetVariableStatusUnknownComponent SetVariableStatus = "UnknownComponent" SetVariableStatusUnknownVariable SetVariableStatus = "UnknownVariable" SetVariableStatusNotSupported SetVariableStatus = "NotSupportedAttributeType" SetVariableStatusRebootRequired SetVariableStatus = "RebootRequired" )
type SetVariablesFeature ¶
type SetVariablesFeature struct{}
A Charging Station can have a lot of variables that can be configured/changed by the CSMS.
The CSO may trigger the CSMS to request setting one or more variables in a Charging Station. The CSMS sends a SetVariablesRequest to the Charging Station, to configured/change one or more variables. The Charging Station responds with a SetVariablesResponse indicating whether it was able to executed the change(s).
func (SetVariablesFeature) GetFeatureName ¶
func (f SetVariablesFeature) GetFeatureName() string
func (SetVariablesFeature) GetRequestType ¶
func (f SetVariablesFeature) GetRequestType() reflect.Type
func (SetVariablesFeature) GetResponseType ¶
func (f SetVariablesFeature) GetResponseType() reflect.Type
type SetVariablesRequest ¶
type SetVariablesRequest struct {
SetVariableData []SetVariableData `json:"setVariableData" validate:"required,min=1,dive"` // List of Component-Variable pairs and attribute values to set.
}
The field definition of the SetVariables request payload sent by the CSMS to the Charging Station.
func NewSetVariablesRequest ¶
func NewSetVariablesRequest(variableData []SetVariableData) *SetVariablesRequest
Creates a new SetVariablesRequest, containing all required fields. There are no optional fields for this message.
func (SetVariablesRequest) GetFeatureName ¶
func (r SetVariablesRequest) GetFeatureName() string
type SetVariablesResponse ¶
type SetVariablesResponse struct {
SetVariableResult []SetVariableResult `json:"setVariableResult" validate:"required,min=1,dive"` // List of result statuses per Component-Variable.
}
This field definition of the SetVariables response payload, sent by the Charging Station to the CSMS in response to a SetVariablesRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.
func NewSetVariablesResponse ¶
func NewSetVariablesResponse(result []SetVariableResult) *SetVariablesResponse
Creates a new SetVariablesResponse, containing all required fields. There are no optional fields for this message.
func (SetVariablesResponse) GetFeatureName ¶
func (c SetVariablesResponse) GetFeatureName() string
type VPN ¶
type VPN struct { Server string `json:"server" validate:"required,max=512"` // VPN Server Address. User string `json:"user" validate:"required,max=20"` // VPN User. Group string `json:"group,omitempty" validate:"omitempty,max=20"` // VPN group. Password string `json:"password" validate:"required,max=20"` // VPN Password. Key string `json:"key" validate:"required,max=255"` // VPN shared secret. Type VPNType `json:"type" validate:"required,vpnType"` // Type of VPN. }
VPN Configuration settings.
type VariableAttribute ¶
type VariableAttribute struct { Type types.Attribute `json:"type,omitempty" validate:"omitempty,attribute"` // Actual, MinSet, MaxSet, etc. Defaults to Actual if absent. Value string `json:"value,omitempty" validate:"max=2500"` // Value of the attribute. May only be omitted when mutability is set to 'WriteOnly'. Mutability Mutability `json:"mutability,omitempty" validate:"omitempty,mutability"` // Defines the mutability of this attribute. Default is ReadWrite when omitted. Persistent bool `json:"persistent,omitempty"` // If true, value will be persistent across system reboots or power down. Default when omitted is false. Constant bool `json:"constant,omitempty"` // If true, value that will never be changed by the Charging Station at runtime. Default when omitted is false. }
VariableAttribute describes the attribute data of a variable.
func NewVariableAttribute ¶
func NewVariableAttribute() VariableAttribute
NewVariableAttribute creates a VariableAttribute struct, with all default values set.
type VariableCharacteristics ¶
type VariableCharacteristics struct { Unit string `json:"unit,omitempty" validate:"max=16"` // Unit of the variable. When the transmitted value has a unit, this field SHALL be included. DataType DataType `json:"dataType" validate:"required,dataTypeEnum"` // Data type of this variable. MinLimit *float64 `json:"minLimit,omitempty"` // Minimum possible value of this variable. MaxLimit *float64 `json:"maxLimit,omitempty"` // Maximum possible value of this variable. When the datatype of this Variable is String, OptionList, SequenceList or MemberList, this field defines the maximum length of the (CSV) string. ValuesList string `json:"valuesList,omitempty" validate:"max=1000"` // Allowed values when variable is Option/Member/SequenceList. This is a comma separated list. SupportsMonitoring bool `json:"supportsMonitoring"` // Flag indicating if this variable supports monitoring. }
VariableCharacteristics represents a fixed read-only parameters of a variable.
func NewVariableCharacteristics ¶
func NewVariableCharacteristics(dataType DataType, supportsMonitoring bool) *VariableCharacteristics
NewVariableCharacteristics returns a pointer to a new VariableCharacteristics struct.