Documentation ¶
Overview ¶
The firmware functional block contains OCPP 2.0 features that enable firmware updates on a charging station.
Index ¶
Constants ¶
const FirmwareStatusNotificationFeatureName = "FirmwareStatusNotification"
const ProfileName = "firmware"
Variables ¶
var Profile = ocpp.NewProfile( ProfileName, FirmwareStatusNotificationFeature{}, )
Functions ¶
This section is empty.
Types ¶
type CSMSHandler ¶
type CSMSHandler interface { // OnFirmwareStatusNotification is called on the CSMS whenever a FirmwareStatusNotificationRequest is received from a charging station. OnFirmwareStatusNotification(chargingStationID string, request *FirmwareStatusNotificationRequest) (confirmation *FirmwareStatusNotificationResponse, err error) }
Needs to be implemented by a CSMS for handling messages part of the OCPP 2.0 Firmware profile.
type ChargingStationHandler ¶
type ChargingStationHandler interface { }
Needs to be implemented by Charging stations for handling messages part of the OCPP 2.0 Firmware profile.
type FirmwareStatus ¶
type FirmwareStatus string
Status reported in FirmwareStatusNotificationRequest.
const ( FirmwareStatusDownloaded FirmwareStatus = "Downloaded" FirmwareStatusDownloadFailed FirmwareStatus = "DownloadFailed" FirmwareStatusDownloading FirmwareStatus = "Downloading" FirmwareStatusIdle FirmwareStatus = "Idle" FirmwareStatusInstallationFailed FirmwareStatus = "InstallationFailed" FirmwareStatusInstalling FirmwareStatus = "Installing" FirmwareStatusInstalled FirmwareStatus = "Installed" )
type FirmwareStatusNotificationFeature ¶
type FirmwareStatusNotificationFeature struct{}
The Charging Station sends a notification to inform the CSMS about the progress of the downloading and installation of a firmware update. The Charging Station SHALL only send the status Idle after receipt of a TriggerMessage for a Firmware Status Notification, when it is not busy downloading/installing firmware. The FirmwareStatusNotification requests SHALL be sent to keep the CSMS updated with the status of the update process.
func (FirmwareStatusNotificationFeature) GetFeatureName ¶
func (f FirmwareStatusNotificationFeature) GetFeatureName() string
func (FirmwareStatusNotificationFeature) GetRequestType ¶
func (f FirmwareStatusNotificationFeature) GetRequestType() reflect.Type
func (FirmwareStatusNotificationFeature) GetResponseType ¶
func (f FirmwareStatusNotificationFeature) GetResponseType() reflect.Type
type FirmwareStatusNotificationRequest ¶
type FirmwareStatusNotificationRequest struct { Status FirmwareStatus `json:"status" validate:"required,firmwareStatus"` RequestID int `json:"requestId" validate:"gte=0"` }
The field definition of the FirmwareStatusNotification request payload sent by the Charging Station to the CSMS.
func NewFirmwareStatusNotificationRequest ¶
func NewFirmwareStatusNotificationRequest(status FirmwareStatus, requestId int) *FirmwareStatusNotificationRequest
Creates a new FirmwareStatusNotificationRequest, containing all required fields.
func (FirmwareStatusNotificationRequest) GetFeatureName ¶
func (r FirmwareStatusNotificationRequest) GetFeatureName() string
type FirmwareStatusNotificationResponse ¶
type FirmwareStatusNotificationResponse struct { }
This field definition of the FirmwareStatusNotification response payload, sent by the CSMS to the Charging Station in response to a FirmwareStatusNotificationRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.
func NewFirmwareStatusNotificationResponse ¶
func NewFirmwareStatusNotificationResponse() *FirmwareStatusNotificationResponse
Creates a new FirmwareStatusNotificationResponse, which doesn't contain any required or optional fields.
func (FirmwareStatusNotificationResponse) GetFeatureName ¶
func (c FirmwareStatusNotificationResponse) GetFeatureName() string