provisioning

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: MIT Imports: 4 Imported by: 0

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

View Source
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"
)
View Source
const BootNotificationFeatureName = "BootNotification"
View Source
const GetBaseReportFeatureName = "GetBaseReport"
View Source
const ProfileName = "provisioning"

Variables

Functions

This section is empty.

Types

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"`
}

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) (confirmation *BootNotificationResponse, 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) (confirmation *GetBaseReportResponse, 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=20"`
	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 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" validate:"gte=0"`
	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"`
}

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 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 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"
)

Jump to

Keyboard shortcuts

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