Documentation ¶
Overview ¶
Contains support for firmware update management and diagnostic log file download.
Index ¶
- Constants
- Variables
- type CentralSystemHandler
- type ChargePointHandler
- type DiagnosticsStatus
- type DiagnosticsStatusNotificationConfirmation
- type DiagnosticsStatusNotificationFeature
- type DiagnosticsStatusNotificationRequest
- type FirmwareStatus
- type FirmwareStatusNotificationConfirmation
- type FirmwareStatusNotificationFeature
- type FirmwareStatusNotificationRequest
- type GetDiagnosticsConfirmation
- type GetDiagnosticsFeature
- type GetDiagnosticsRequest
- type UpdateFirmwareConfirmation
- type UpdateFirmwareFeature
- type UpdateFirmwareRequest
Constants ¶
const DiagnosticsStatusNotificationFeatureName = "DiagnosticsStatusNotification"
const FirmwareStatusNotificationFeatureName = "FirmwareStatusNotification"
const GetDiagnosticsFeatureName = "GetDiagnostics"
const ProfileName = "FirmwareManagement"
The profile name
const UpdateFirmwareFeatureName = "UpdateFirmware"
Variables ¶
var Profile = ocpp.NewProfile( ProfileName, GetDiagnosticsFeature{}, DiagnosticsStatusNotificationFeature{}, FirmwareStatusNotificationFeature{}, UpdateFirmwareFeature{})
Provides support for firmware update management and diagnostic log file download.
Functions ¶
This section is empty.
Types ¶
type CentralSystemHandler ¶
type CentralSystemHandler interface { OnDiagnosticsStatusNotification(chargePointId string, request *DiagnosticsStatusNotificationRequest) (confirmation *DiagnosticsStatusNotificationConfirmation, err error) OnFirmwareStatusNotification(chargePointId string, request *FirmwareStatusNotificationRequest) (confirmation *FirmwareStatusNotificationConfirmation, err error) }
Needs to be implemented by Central systems for handling messages part of the OCPP 1.6 FirmwareManagement profile.
type ChargePointHandler ¶
type ChargePointHandler interface { OnGetDiagnostics(request *GetDiagnosticsRequest) (confirmation *GetDiagnosticsConfirmation, err error) OnUpdateFirmware(request *UpdateFirmwareRequest) (confirmation *UpdateFirmwareConfirmation, err error) }
Needs to be implemented by Charge points for handling messages part of the OCPP 1.6 FirmwareManagement profile.
type DiagnosticsStatus ¶
type DiagnosticsStatus string
Status reported in DiagnosticsStatusNotificationRequest.
const ( DiagnosticsStatusIdle DiagnosticsStatus = "Idle" DiagnosticsStatusUploaded DiagnosticsStatus = "Uploaded" DiagnosticsStatusUploadFailed DiagnosticsStatus = "UploadFailed" DiagnosticsStatusUploading DiagnosticsStatus = "Uploading" )
type DiagnosticsStatusNotificationConfirmation ¶
type DiagnosticsStatusNotificationConfirmation struct { }
This field definition of the DiagnosticsStatusNotification confirmation payload, sent by the Central System to the Charge Point in response to a DiagnosticsStatusNotificationRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.
func NewDiagnosticsStatusNotificationConfirmation ¶
func NewDiagnosticsStatusNotificationConfirmation() *DiagnosticsStatusNotificationConfirmation
Creates a new DiagnosticsStatusNotificationConfirmation, which doesn't contain any required or optional fields.
func (DiagnosticsStatusNotificationConfirmation) GetFeatureName ¶
func (c DiagnosticsStatusNotificationConfirmation) GetFeatureName() string
type DiagnosticsStatusNotificationFeature ¶
type DiagnosticsStatusNotificationFeature struct{}
The Charge Point sends a notification to inform the Central System that the upload of diagnostics is busy or has finished successfully or failed. The Charge Point SHALL only send the status Idle after receipt of a TriggerMessage for a Diagnostics Status Notification, when it is not busy uploading diagnostics.
func (DiagnosticsStatusNotificationFeature) GetFeatureName ¶
func (f DiagnosticsStatusNotificationFeature) GetFeatureName() string
func (DiagnosticsStatusNotificationFeature) GetRequestType ¶
func (f DiagnosticsStatusNotificationFeature) GetRequestType() reflect.Type
func (DiagnosticsStatusNotificationFeature) GetResponseType ¶
func (f DiagnosticsStatusNotificationFeature) GetResponseType() reflect.Type
type DiagnosticsStatusNotificationRequest ¶
type DiagnosticsStatusNotificationRequest struct {
Status DiagnosticsStatus `json:"status" validate:"required,diagnosticsStatus"`
}
The field definition of the DiagnosticsStatusNotification request payload sent by the Charge Point to the Central System.
func NewDiagnosticsStatusNotificationRequest ¶
func NewDiagnosticsStatusNotificationRequest(status DiagnosticsStatus) *DiagnosticsStatusNotificationRequest
Creates a new DiagnosticsStatusNotificationRequest, containing all required fields.
func (DiagnosticsStatusNotificationRequest) GetFeatureName ¶
func (r DiagnosticsStatusNotificationRequest) GetFeatureName() string
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 FirmwareStatusNotificationConfirmation ¶
type FirmwareStatusNotificationConfirmation struct { }
This field definition of the FirmwareStatusNotification confirmation payload, sent by the Central System to the Charge Point in response to a FirmwareStatusNotificationRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.
func NewFirmwareStatusNotificationConfirmation ¶
func NewFirmwareStatusNotificationConfirmation() *FirmwareStatusNotificationConfirmation
Creates a new FirmwareStatusNotificationConfirmation, which doesn't contain any required or optional fields.
func (FirmwareStatusNotificationConfirmation) GetFeatureName ¶
func (c FirmwareStatusNotificationConfirmation) GetFeatureName() string
type FirmwareStatusNotificationFeature ¶
type FirmwareStatusNotificationFeature struct{}
The Charge Point sends a notification to inform the Central System about the progress of the downloading and installation of a firmware update. The Charge Point 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 Central System 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,firmwareStatus16"`
}
The field definition of the FirmwareStatusNotification request payload sent by the Charge Point to the Central System.
func NewFirmwareStatusNotificationRequest ¶
func NewFirmwareStatusNotificationRequest(status FirmwareStatus) *FirmwareStatusNotificationRequest
Creates a new FirmwareStatusNotificationRequest, containing all required fields.
func (FirmwareStatusNotificationRequest) GetFeatureName ¶
func (r FirmwareStatusNotificationRequest) GetFeatureName() string
type GetDiagnosticsConfirmation ¶
type GetDiagnosticsConfirmation struct {
FileName string `json:"fileName,omitempty" validate:"max=255"`
}
This field definition of the GetDiagnostics confirmation payload, sent by the Charge Point to the Central System in response to a GetDiagnosticsRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.
func NewGetDiagnosticsConfirmation ¶
func NewGetDiagnosticsConfirmation() *GetDiagnosticsConfirmation
Creates a new GetDiagnosticsConfirmation, containing all required fields. Optional fields may be set afterwards.
func (GetDiagnosticsConfirmation) GetFeatureName ¶
func (c GetDiagnosticsConfirmation) GetFeatureName() string
type GetDiagnosticsFeature ¶
type GetDiagnosticsFeature struct{}
Central System can request a Charge Point for diagnostic information. The Central System SHALL send a GetDiagnosticsRequest for getting diagnostic information of a Charge Point with a location where the Charge Point MUST upload its diagnostic data to and optionally a begin and end time for the requested diagnostic information. The Charge Point SHALL respond with a GetDiagnosticsConfirmation stating the name of the file containing the diagnostic information that will be uploaded. Charge Point SHALL upload a single file. Format of the diagnostics file is not prescribed. If no diagnostics file is available, then GetDiagnosticsConfirmation SHALL NOT contain a file name. During uploading of a diagnostics file, the Charge Point MUST send DiagnosticsStatusNotificationRequests to keep the Central System updated with the status of the upload process.
func (GetDiagnosticsFeature) GetFeatureName ¶
func (f GetDiagnosticsFeature) GetFeatureName() string
func (GetDiagnosticsFeature) GetRequestType ¶
func (f GetDiagnosticsFeature) GetRequestType() reflect.Type
func (GetDiagnosticsFeature) GetResponseType ¶
func (f GetDiagnosticsFeature) GetResponseType() reflect.Type
type GetDiagnosticsRequest ¶
type GetDiagnosticsRequest struct { Location string `json:"location" validate:"required,uri"` Retries *int `json:"retries,omitempty" validate:"omitempty,gte=0"` RetryInterval *int `json:"retryInterval,omitempty" validate:"omitempty,gte=0"` StartTime *types.DateTime `json:"startTime,omitempty"` StopTime *types.DateTime `json:"stopTime,omitempty"` }
The field definition of the GetDiagnostics request payload sent by the Central System to the Charge Point.
func NewGetDiagnosticsRequest ¶
func NewGetDiagnosticsRequest(location string) *GetDiagnosticsRequest
Creates a new GetDiagnosticsRequest, containing all required fields. Optional fields may be set afterwards.
func (GetDiagnosticsRequest) GetFeatureName ¶
func (r GetDiagnosticsRequest) GetFeatureName() string
type UpdateFirmwareConfirmation ¶
type UpdateFirmwareConfirmation struct { }
This field definition of the UpdateFirmware confirmation payload, sent by the Charge Point to the Central System in response to a UpdateFirmwareRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.
func NewUpdateFirmwareConfirmation ¶
func NewUpdateFirmwareConfirmation() *UpdateFirmwareConfirmation
Creates a new UpdateFirmwareConfirmation, containing all required fields. There are no optional fields for this message.
func (UpdateFirmwareConfirmation) GetFeatureName ¶
func (c UpdateFirmwareConfirmation) GetFeatureName() string
type UpdateFirmwareFeature ¶
type UpdateFirmwareFeature struct{}
Central System can notify a Charge Point that it needs to update its firmware. The Central System SHALL send an UpdateFirmwareRequest to instruct the Charge Point to install new firmware. The payload SHALL contain a date and time after which the Charge Point is allowed to retrieve the new firmware and the location from which the firmware can be downloaded. The Charge Point SHALL respond with a UpdateFirmwareConfirmation. The Charge Point SHOULD start retrieving the firmware as soon as possible after retrieve-date. During downloading and installation of the firmware, the Charge Point MUST send FirmwareStatusNotificationRequest payloads to keep the Central System updated with the status of the update process. The Charge Point SHALL, if the new firmware image is "valid", install the new firmware as soon as it is able to. If it is not possible to continue charging during installation of firmware, it is RECOMMENDED to wait until Charging Session has ended (Charge Point idle) before commencing installation. It is RECOMMENDED to set connectors that are not in use to UNAVAILABLE while the Charge Point waits for the Session to end.
func (UpdateFirmwareFeature) GetFeatureName ¶
func (f UpdateFirmwareFeature) GetFeatureName() string
func (UpdateFirmwareFeature) GetRequestType ¶
func (f UpdateFirmwareFeature) GetRequestType() reflect.Type
func (UpdateFirmwareFeature) GetResponseType ¶
func (f UpdateFirmwareFeature) GetResponseType() reflect.Type
type UpdateFirmwareRequest ¶
type UpdateFirmwareRequest struct { Location string `json:"location" validate:"required,uri"` Retries *int `json:"retries,omitempty" validate:"omitempty,gte=0"` RetrieveDate *types.DateTime `json:"retrieveDate" validate:"required"` RetryInterval *int `json:"retryInterval,omitempty" validate:"omitempty,gte=0"` }
The field definition of the UpdateFirmware request payload sent by the Central System to the Charge Point.
func NewUpdateFirmwareRequest ¶
func NewUpdateFirmwareRequest(location string, retrieveDate *types.DateTime) *UpdateFirmwareRequest
Creates a new UpdateFirmwareRequest, which doesn't contain any required or optional fields.
func (UpdateFirmwareRequest) GetFeatureName ¶
func (r UpdateFirmwareRequest) GetFeatureName() string