diagnostics

package
v0.18.2 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

The diagnostics functional block contains OCPP 2.0 features than enable remote diagnostics of problems with a charging station.

Index

Constants

View Source
const (
	LogTypeDiagnostics        LogType   = "DiagnosticsLog"   // This contains the field definition of a diagnostics log file
	LogTypeSecurity           LogType   = "SecurityLog"      // Sent by the CSMS to the Charging Station to request that the Charging Station uploads the security log
	LogStatusAccepted         LogStatus = "Accepted"         // Accepted this log upload. This does not mean the log file is uploaded is successfully, the Charging Station will now start the log file upload.
	LogStatusRejected         LogStatus = "Rejected"         // Log update request rejected.
	LogStatusAcceptedCanceled LogStatus = "AcceptedCanceled" // Accepted this log upload, but in doing this has canceled an ongoing log file upload.
)
View Source
const ClearVariableMonitoringFeatureName = "ClearVariableMonitoring"
View Source
const CustomerInformationFeatureName = "CustomerInformation"
View Source
const GetLogFeatureName = "GetLog"
View Source
const GetMonitoringReportFeatureName = "GetMonitoringReport"
View Source
const LogStatusNotificationFeatureName = "LogStatusNotification"
View Source
const NotifyCustomerInformationFeatureName = "NotifyCustomerInformation"
View Source
const NotifyEventFeatureName = "NotifyEvent"
View Source
const NotifyMonitoringReportFeatureName = "NotifyMonitoringReport"
View Source
const ProfileName = "diagnostics"
View Source
const SetMonitoringBaseFeatureName = "SetMonitoringBase"
View Source
const SetMonitoringLevelFeatureName = "SetMonitoringLevel"
View Source
const SetVariableMonitoringFeatureName = "SetVariableMonitoring"

Variables

Functions

This section is empty.

Types

type CSMSHandler

type CSMSHandler interface {
	// OnLogStatusNotification is called on the CSMS whenever a LogStatusNotificationRequest is received from a Charging Station.
	OnLogStatusNotification(chargingStationID string, request *LogStatusNotificationRequest) (response *LogStatusNotificationResponse, err error)
	// OnNotifyCustomerInformation is called on the CSMS whenever a NotifyCustomerInformationRequest is received from a Charging Station.
	OnNotifyCustomerInformation(chargingStationID string, request *NotifyCustomerInformationRequest) (response *NotifyCustomerInformationResponse, err error)
	// OnNotifyEvent is called on the CSMS whenever a NotifyEventRequest is received from a Charging Station.
	OnNotifyEvent(chargingStationID string, request *NotifyEventRequest) (response *NotifyEventResponse, err error)
	// OnNotifyMonitoringReport is called on the CSMS whenever a NotifyMonitoringReportRequest is received from a Charging Station.
	OnNotifyMonitoringReport(chargingStationID string, request *NotifyMonitoringReportRequest) (response *NotifyMonitoringReportResponse, err error)
}

Needs to be implemented by a CSMS for handling messages part of the OCPP 2.0 Diagnostics profile.

type ChargingStationHandler

type ChargingStationHandler interface {
	// OnClearVariableMonitoring is called on a charging station whenever a ClearVariableMonitoringRequest is received from the CSMS.
	OnClearVariableMonitoring(request *ClearVariableMonitoringRequest) (response *ClearVariableMonitoringResponse, err error)
	// OnCustomerInformation is called on a charging station whenever a CustomerInformationRequest is received from the CSMS.
	OnCustomerInformation(request *CustomerInformationRequest) (response *CustomerInformationResponse, err error)
	// OnGetLog is called on a charging station whenever a GetLogRequest is received from the CSMS.
	OnGetLog(request *GetLogRequest) (response *GetLogResponse, err error)
	// OnGetMonitoringReport is called on a charging station whenever a GetMonitoringReportRequest is received from the CSMS.
	OnGetMonitoringReport(request *GetMonitoringReportRequest) (response *GetMonitoringReportResponse, err error)
	// OnSetMonitoringBase is called on a charging station whenever a SetMonitoringBaseRequest is received from the CSMS.
	OnSetMonitoringBase(request *SetMonitoringBaseRequest) (response *SetMonitoringBaseResponse, err error)
	// OnSetMonitoringLevel is called on a charging station whenever a SetMonitoringLevelRequest is received from the CSMS.
	OnSetMonitoringLevel(request *SetMonitoringLevelRequest) (response *SetMonitoringLevelResponse, err error)
	// OnSetVariableMonitoring is called on a charging station whenever a SetVariableMonitoringRequest is received from the CSMS.
	OnSetVariableMonitoring(request *SetVariableMonitoringRequest) (response *SetVariableMonitoringResponse, err error)
}

Needs to be implemented by Charging stations for handling messages part of the OCPP 2.0 Diagnostics profile.

type ClearMonitoringResult

type ClearMonitoringResult struct {
	ID     int                   `json:"id" validate:"required,gte=0"`
	Status ClearMonitoringStatus `json:"status" validate:"required,clearMonitoringStatus"`
}

type ClearMonitoringStatus

type ClearMonitoringStatus string

Status contained inside a ClearMonitoringResult struct.

const (
	ClearMonitoringStatusAccepted ClearMonitoringStatus = "Accepted"
	ClearMonitoringStatusRejected ClearMonitoringStatus = "Rejected"
	ClearMonitoringStatusNotFound ClearMonitoringStatus = "NotFound"
)

type ClearVariableMonitoringFeature

type ClearVariableMonitoringFeature struct{}

The CSMS asks the Charging Station to clear/remove a display message that has been configured in the Charging Station. The Charging station checks for a message with the requested ID and removes it. The Charging station then responds with a ClearVariableMonitoringResponse. The response payload indicates whether the Charging Station was able to remove the message from display or not.

func (ClearVariableMonitoringFeature) GetFeatureName

func (f ClearVariableMonitoringFeature) GetFeatureName() string

func (ClearVariableMonitoringFeature) GetRequestType

func (f ClearVariableMonitoringFeature) GetRequestType() reflect.Type

func (ClearVariableMonitoringFeature) GetResponseType

func (f ClearVariableMonitoringFeature) GetResponseType() reflect.Type

type ClearVariableMonitoringRequest

type ClearVariableMonitoringRequest struct {
	ID []int `json:"id" validate:"required,min=1,dive,gte=0"` // List of the monitors to be cleared, identified by their Id.
}

The field definition of the ClearVariableMonitoring request payload sent by the CSMS to the Charging Station.

func NewClearVariableMonitoringRequest

func NewClearVariableMonitoringRequest(id []int) *ClearVariableMonitoringRequest

Creates a new ClearVariableMonitoringRequest, containing all required fields. There are no optional fields for this message.

func (ClearVariableMonitoringRequest) GetFeatureName

func (r ClearVariableMonitoringRequest) GetFeatureName() string

type ClearVariableMonitoringResponse

type ClearVariableMonitoringResponse struct {
	ClearMonitoringResult []ClearMonitoringResult `json:"clearMonitoringResult" validate:"required,min=1,dive"` // List of result statuses per monitor.
}

This field definition of the ClearVariableMonitoring response payload, sent by the Charging Station to the CSMS in response to a ClearVariableMonitoringRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.

func NewClearVariableMonitoringResponse

func NewClearVariableMonitoringResponse(result []ClearMonitoringResult) *ClearVariableMonitoringResponse

Creates a new ClearVariableMonitoringResponse, containing all required fields. There are no optional fields for this message.

func (ClearVariableMonitoringResponse) GetFeatureName

func (c ClearVariableMonitoringResponse) GetFeatureName() string

type CustomerInformationFeature

type CustomerInformationFeature struct{}

CSMS can request a Charging Station to clear its Authorization Cache. The CSMS SHALL send a CustomerInformationRequest payload for clearing the Charging Station’s Authorization Cache. Upon receipt of a CustomerInformationRequest, the Charging Station SHALL respond with a CustomerInformationResponse payload. The response payload SHALL indicate whether the Charging Station was able to clear its Authorization Cache.

func (CustomerInformationFeature) GetFeatureName

func (f CustomerInformationFeature) GetFeatureName() string

func (CustomerInformationFeature) GetRequestType

func (f CustomerInformationFeature) GetRequestType() reflect.Type

func (CustomerInformationFeature) GetResponseType

func (f CustomerInformationFeature) GetResponseType() reflect.Type

type CustomerInformationRequest

type CustomerInformationRequest struct {
	RequestID           int                        `json:"requestId" validate:"gte=0"`
	Report              bool                       `json:"report"`
	Clear               bool                       `json:"clear"`
	CustomerIdentifier  string                     `json:"customerIdentifier,omitempty" validate:"max=64"`
	IdToken             *types.IdToken             `json:"idToken,omitempty" validate:"omitempty,dive"`
	CustomerCertificate *types.CertificateHashData `json:"customerCertificate,omitempty" validate:"omitempty,dive"`
}

The field definition of the CustomerInformation request payload sent by the CSMS to the Charging Station.

func NewCustomerInformationRequest

func NewCustomerInformationRequest(requestId int, report bool, clear bool) *CustomerInformationRequest

Creates a new CustomerInformationRequest, containing all required fields. Additional optional fields may be set afterwards.

func (CustomerInformationRequest) GetFeatureName

func (r CustomerInformationRequest) GetFeatureName() string

type CustomerInformationResponse

type CustomerInformationResponse struct {
	Status     CustomerInformationStatus `json:"status" validate:"required,customerInformationStatus"`
	StatusInfo *types.StatusInfo         `json:"statusInfo,omitempty" validate:"omitempty"`
}

This field definition of the CustomerInformation response payload, sent by the Charging Station to the CSMS in response to a CustomerInformationRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.

func NewCustomerInformationResponse

func NewCustomerInformationResponse(status CustomerInformationStatus) *CustomerInformationResponse

Creates a new CustomerInformationResponse, containing all required fields. Additional optional fields may be set afterwards.

func (CustomerInformationResponse) GetFeatureName

func (c CustomerInformationResponse) GetFeatureName() string

type CustomerInformationStatus

type CustomerInformationStatus string

Status returned in response to CustomerInformationRequest.

const (
	CustomerInformationStatusAccepted CustomerInformationStatus = "Accepted"
	CustomerInformationStatusRejected CustomerInformationStatus = "Rejected"
	CustomerInformationStatusInvalid  CustomerInformationStatus = "Invalid"
)

type EventData

type EventData struct {
	EventID               int               `json:"eventId" validate:"gte=0"`
	Timestamp             *types.DateTime   `json:"timestamp" validate:"required"`
	Trigger               EventTrigger      `json:"trigger" validate:"required,eventTrigger"`
	Cause                 *int              `json:"cause,omitempty" validate:"omitempty"`
	ActualValue           string            `json:"actualValue" validate:"required,max=2500"`
	TechCode              string            `json:"techCode,omitempty" validate:"omitempty,max=50"`
	TechInfo              string            `json:"techInfo,omitempty" validate:"omitempty,max=500"`
	Cleared               bool              `json:"cleared,omitempty"`
	TransactionID         string            `json:"transactionId,omitempty" validate:"omitempty,max=36"`
	VariableMonitoringID  *int              `json:"variableMonitoringId,omitempty" validate:"omitempty"`
	EventNotificationType EventNotification `json:"eventNotificationType" validate:"required,eventNotification"`
	Component             types.Component   `json:"component" validate:"required"`
	Variable              types.Variable    `json:"variable" validate:"required"`
}

An EventData element contains only the Component, Variable and VariableMonitoring data that caused an event.

type EventNotification

type EventNotification string

EventNotification specifies the event notification type of the message.

const (
	EventHardWiredNotification EventNotification = "HardWiredNotification" // The software implemented by the manufacturer triggered a hardwired notification.
	EventHardWiredMonitor      EventNotification = "HardWiredMonitor"      // Triggered by a monitor, which is hardwired by the manufacturer.
	EventPreconfiguredMonitor  EventNotification = "PreconfiguredMonitor"  // Triggered by a monitor, which is preconfigured by the manufacturer.
	EventCustomMonitor         EventNotification = "CustomMonitor"         // Triggered by a monitor, which is set with the setvariablemonitoringrequest message by the Charging Station Operator.
)

type EventTrigger

type EventTrigger string

EventTrigger defines the type of monitor that triggered an event.

const (
	EventTriggerAlerting EventTrigger = "Alerting" // Monitored variable has passed an Alert or Critical threshold.
	EventTriggerDelta    EventTrigger = "Delta"    // Delta Monitored Variable value has changed by more than specified amount.
	EventTriggerPeriodic EventTrigger = "Periodic" // Periodic Monitored Variable has been sampled for reporting at the specified interval.
)

type GetLogFeature

type GetLogFeature struct{}

The CSMS can request a Charging Station to upload a file with log information to a given location (URL). The format of this log file is not prescribed. The Charging Station responds with GetLogResponse. It then attempts to upload a log file asynchronously and gives information about the status of the upload by sending status notifications to the CSMS.

func (GetLogFeature) GetFeatureName

func (f GetLogFeature) GetFeatureName() string

func (GetLogFeature) GetRequestType

func (f GetLogFeature) GetRequestType() reflect.Type

func (GetLogFeature) GetResponseType

func (f GetLogFeature) GetResponseType() reflect.Type

type GetLogRequest

type GetLogRequest struct {
	LogType       LogType       `json:"logType" validate:"required,logType"`
	RequestID     int           `json:"requestId" validate:"gte=0"`
	Retries       *int          `json:"retries,omitempty" validate:"omitempty,gte=0"`
	RetryInterval *int          `json:"retryInterval,omitempty" validate:"omitempty,gte=0"`
	Log           LogParameters `json:"log" validate:"required"`
}

The field definition of the GetLog request payload sent by the CSMS to the Charging Station.

func NewGetLogRequest

func NewGetLogRequest(logType LogType, requestID int, logParameters LogParameters) *GetLogRequest

Creates a new GetLogRequest, containing all required fields. Optional fields may be set afterwards.

func (GetLogRequest) GetFeatureName

func (r GetLogRequest) GetFeatureName() string

type GetLogResponse

type GetLogResponse struct {
	Status   LogStatus `json:"status" validate:"required,logStatus"`            // This field indicates whether the Charging Station was able to accept the request.
	Filename string    `json:"filename,omitempty" validate:"omitempty,max=256"` // This contains the name of the log file that will be uploaded. This field is not present when no logging information is available.
}

This field definition of the GetLog response payload, sent by the Charging Station to the CSMS in response to a GetLogRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.

func NewGetLogResponse

func NewGetLogResponse(status LogStatus) *GetLogResponse

Creates a new GetLogResponse, containing all required fields. Optional fields may be set afterwards.

func (GetLogResponse) GetFeatureName

func (c GetLogResponse) GetFeatureName() string

type GetMonitoringReportFeature

type GetMonitoringReportFeature struct{}

A CSMS can request the Charging Station to send a report about configured monitoring settings per component and variable. Optionally, this list can be filtered on monitoringCriteria and componentVariables. The CSMS sends a GetMonitoringReportRequest to the Charging Station. The Charging Station then responds with a GetMonitoringReportResponse. Asynchronously, the Charging Station will then send a NotifyMonitoringReportRequest to the CSMS for each report part.

func (GetMonitoringReportFeature) GetFeatureName

func (f GetMonitoringReportFeature) GetFeatureName() string

func (GetMonitoringReportFeature) GetRequestType

func (f GetMonitoringReportFeature) GetRequestType() reflect.Type

func (GetMonitoringReportFeature) GetResponseType

func (f GetMonitoringReportFeature) GetResponseType() reflect.Type

type GetMonitoringReportRequest

type GetMonitoringReportRequest struct {
	RequestID          *int                      `json:"requestId,omitempty" validate:"omitempty,gte=0"`                                  // The Id of the request.
	MonitoringCriteria []MonitoringCriteriaType  `json:"monitoringCriteria,omitempty" validate:"omitempty,max=3,dive,monitoringCriteria"` // This field contains criteria for components for which a monitoring report is requested.
	ComponentVariable  []types.ComponentVariable `json:"componentVariable,omitempty" validate:"omitempty,dive"`                           // This field specifies the components and variables for which a monitoring report is requested.
}

The field definition of the GetMonitoringReport request payload sent by the CSMS to the Charging Station.

func NewGetMonitoringReportRequest

func NewGetMonitoringReportRequest() *GetMonitoringReportRequest

Creates a new GetMonitoringReportRequest. All fields are optional and may be set afterwards.

func (GetMonitoringReportRequest) GetFeatureName

func (r GetMonitoringReportRequest) GetFeatureName() string

type GetMonitoringReportResponse

type GetMonitoringReportResponse struct {
	Status types.GenericDeviceModelStatus `json:"status" validate:"required,genericDeviceModelStatus"` // This field indicates whether the Charging Station was able to accept the request.
}

This field definition of the GetMonitoringReport response payload, sent by the Charging Station to the CSMS in response to a GetMonitoringReportRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.

func NewGetMonitoringReportResponse

func NewGetMonitoringReportResponse(status types.GenericDeviceModelStatus) *GetMonitoringReportResponse

Creates a new GetMonitoringReportResponse, containing all required fields. There are no optional fields for this message.

func (GetMonitoringReportResponse) GetFeatureName

func (c GetMonitoringReportResponse) GetFeatureName() string

type LogParameters

type LogParameters struct {
	RemoteLocation  string          `json:"remoteLocation" validate:"required,max=512,url"`
	OldestTimestamp *types.DateTime `json:"oldestTimestamp,omitempty" validate:"omitempty"`
	LatestTimestamp *types.DateTime `json:"latestTimestamp,omitempty" validate:"omitempty"`
}

LogParameters specifies the requested log and the location to which the log should be sent. It is used in GetLogRequest.

type LogStatus

type LogStatus string

LogStatus represents the status returned by a Charging Station in a GetLogResponse.

type LogStatusNotificationFeature

type LogStatusNotificationFeature struct{}

A Charging Station shall send LogStatusNotification requests to update the CSMS with the current status of a log-upload procedure. The CSMS shall respond with a LogStatusNotificationResponse acknowledging the status update request.

After a successful log upload, the The Charging Station returns to Idle status.

func (LogStatusNotificationFeature) GetFeatureName

func (f LogStatusNotificationFeature) GetFeatureName() string

func (LogStatusNotificationFeature) GetRequestType

func (f LogStatusNotificationFeature) GetRequestType() reflect.Type

func (LogStatusNotificationFeature) GetResponseType

func (f LogStatusNotificationFeature) GetResponseType() reflect.Type

type LogStatusNotificationRequest

type LogStatusNotificationRequest struct {
	Status    UploadLogStatus `json:"status" validate:"required,uploadLogStatus"`
	RequestID int             `json:"requestId" validate:"gte=0"`
}

The field definition of the LogStatusNotification request payload sent by a Charging Station to the CSMS.

func NewLogStatusNotificationRequest

func NewLogStatusNotificationRequest(status UploadLogStatus, requestID int) *LogStatusNotificationRequest

Creates a new LogStatusNotificationRequest, containing all required fields. There are no optional fields for this message.

func (LogStatusNotificationRequest) GetFeatureName

func (r LogStatusNotificationRequest) GetFeatureName() string

type LogStatusNotificationResponse

type LogStatusNotificationResponse struct {
}

This field definition of the LogStatusNotification response payload, sent by the CSMS to the Charging Station in response to a LogStatusNotificationRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.

func NewLogStatusNotificationResponse

func NewLogStatusNotificationResponse() *LogStatusNotificationResponse

Creates a new LogStatusNotificationResponse, which doesn't contain any required or optional fields.

func (LogStatusNotificationResponse) GetFeatureName

func (c LogStatusNotificationResponse) GetFeatureName() string

type LogType

type LogType string

LogType represents the type of log file that the Charging Station should send. It is used in GetLogRequest.

type MonitorType

type MonitorType string

MonitorType specifies the type of this monitor.

const (
	MonitorUpperThreshold       MonitorType = "UpperThreshold"       // Triggers an event notice when the actual value of the Variable rises above monitorValue.
	MonitorLowerThreshold       MonitorType = "LowerThreshold"       // Triggers an event notice when the actual value of the Variable drops below monitorValue.
	MonitorDelta                MonitorType = "Delta"                // Triggers an event notice when the actual value has changed more than plus or minus monitorValue since the time that this monitor was set or since the last time this event notice was sent, whichever was last.
	MonitorPeriodic             MonitorType = "Periodic"             // Triggers an event notice every monitorValue seconds interval, starting from the time that this monitor was set.
	MonitorPeriodicClockAligned MonitorType = "PeriodicClockAligned" // Triggers an event notice every monitorValue seconds interval, starting from the nearest clock-aligned interval after this monitor was set.
)

type MonitoringBase

type MonitoringBase string

Monitoring base to be set within the Charging Station.

const (
	MonitoringBaseAll            MonitoringBase = "All"
	MonitoringBaseFactoryDefault MonitoringBase = "FactoryDefault"
	MonitoringBaseHardWiredOnly  MonitoringBase = "HardWiredOnly"
)

type MonitoringCriteriaType

type MonitoringCriteriaType string

Monitoring criteria contained in GetMonitoringReportRequest.

const (
	MonitoringCriteriaThresholdMonitoring MonitoringCriteriaType = "ThresholdMonitoring"
	MonitoringCriteriaDeltaMonitoring     MonitoringCriteriaType = "DeltaMonitoring"
	MonitoringCriteriaPeriodicMonitoring  MonitoringCriteriaType = "PeriodicMonitoring"
)

type MonitoringData

type MonitoringData struct {
	Component          types.Component      `json:"component" validate:"required"`
	Variable           types.Variable       `json:"variable" validate:"required"`
	VariableMonitoring []VariableMonitoring `json:"variableMonitoring" validate:"required,min=1,dive"`
}

MonitoringData holds parameters of SetVariableMonitoring request.

type NotifyCustomerInformationFeature

type NotifyCustomerInformationFeature struct{}

The CSMS may send a message to the Charging Station to retrieve raw customer information, for example to be compliant with local privacy laws. The Charging Station notifies the CSMS by sending one or more reports. For each report, the Charging station shall send a NotifyCustomerInformationRequest to the CSMS.

The CSMS responds with a NotifyCustomerInformationResponse message to the Charging Station for each received NotifyCustomerInformationRequest.

func (NotifyCustomerInformationFeature) GetFeatureName

func (f NotifyCustomerInformationFeature) GetFeatureName() string

func (NotifyCustomerInformationFeature) GetRequestType

func (f NotifyCustomerInformationFeature) GetRequestType() reflect.Type

func (NotifyCustomerInformationFeature) GetResponseType

func (f NotifyCustomerInformationFeature) GetResponseType() reflect.Type

type NotifyCustomerInformationRequest

type NotifyCustomerInformationRequest struct {
	Data        string         `json:"data" validate:"required,max=512"`   // (Part of) the requested data. No format specified in which the data is returned. Should be human readable.
	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.
	GeneratedAt types.DateTime `json:"generatedAt" validate:"required"`    // Timestamp of the moment this message was generated at the Charging Station.
	RequestID   int            `json:"requestId" validate:"gte=0"`         // The Id of the request.
}

The field definition of the NotifyCustomerInformation request payload sent by a Charging Station to the CSMS.

func NewNotifyCustomerInformationRequest

func NewNotifyCustomerInformationRequest(Data string, seqNo int, generatedAt types.DateTime, requestID int) *NotifyCustomerInformationRequest

Creates a new NotifyCustomerInformationRequest, containing all required fields. Optional fields may be set afterwards.

func (NotifyCustomerInformationRequest) GetFeatureName

func (r NotifyCustomerInformationRequest) GetFeatureName() string

type NotifyCustomerInformationResponse

type NotifyCustomerInformationResponse struct {
}

This field definition of the NotifyCustomerInformation response payload, sent by the CSMS to the Charging Station in response to a NotifyCustomerInformationRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.

func NewNotifyCustomerInformationResponse

func NewNotifyCustomerInformationResponse() *NotifyCustomerInformationResponse

Creates a new NotifyCustomerInformationResponse, which doesn't contain any required or optional fields.

func (NotifyCustomerInformationResponse) GetFeatureName

func (c NotifyCustomerInformationResponse) GetFeatureName() string

type NotifyEventFeature

type NotifyEventFeature struct{}

The NotifyEvent feature gives Charging Stations the ability to notify the CSMS (periodically) about monitoring events. If a threshold or a delta value has exceeded, the Charging Station sends a NotifyEventRequest to the CSMS. A request reports every Component/Variable for which a VariableMonitoring setting was triggered. Only the VariableMonitoring settings that are responsible for triggering an event are included. The monitoring setting(s) might have been configured explicitly via a SetVariableMonitoring message or it might be "hard-wired" in the Charging Station’s firmware.

The CSMS responds to the request with a NotifyEventResponse.

func (NotifyEventFeature) GetFeatureName

func (f NotifyEventFeature) GetFeatureName() string

func (NotifyEventFeature) GetRequestType

func (f NotifyEventFeature) GetRequestType() reflect.Type

func (NotifyEventFeature) GetResponseType

func (f NotifyEventFeature) GetResponseType() reflect.Type

type NotifyEventRequest

type NotifyEventRequest struct {
	GeneratedAt *types.DateTime `json:"generatedAt" validate:"required"`          // Timestamp of the moment this message was generated at the Charging Station.
	SeqNo       int             `json:"seqNo" validate:"gte=0"`                   // Sequence number of this message. First message starts at 0.
	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.
	EventData   []EventData     `json:"eventData" validate:"required,min=1,dive"` // The list of EventData will usually contain one eventData element, but the Charging Station may decide to group multiple events in one notification.
}

The field definition of the NotifyEvent request payload sent by a Charging Station to the CSMS.

func NewNotifyEventRequest

func NewNotifyEventRequest(generatedAt *types.DateTime, seqNo int, eventData []EventData) *NotifyEventRequest

Creates a new NotifyEventRequest, containing all required fields. Optional fields may be set afterwards.

func (NotifyEventRequest) GetFeatureName

func (r NotifyEventRequest) GetFeatureName() string

type NotifyEventResponse

type NotifyEventResponse struct {
}

This field definition of the NotifyEvent response payload, sent by the CSMS to the Charging Station in response to a NotifyEventRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.

func NewNotifyEventResponse

func NewNotifyEventResponse() *NotifyEventResponse

Creates a new NotifyEventResponse, which doesn't contain any required or optional fields.

func (NotifyEventResponse) GetFeatureName

func (c NotifyEventResponse) GetFeatureName() string

type NotifyMonitoringReportFeature

type NotifyMonitoringReportFeature struct{}

The NotifyMonitoringReport feature is used by a Charging Station to send a report to the CSMS about configured monitoring settings per component and variable. Optionally, this list can be filtered on monitoringCriteria and componentVariables. After responding to a GetMonitoringReportRequest, a Charging Station will send one or more NotifyMonitoringReportRequest asynchronously to the CSMS, until all data of the monitoring report has been sent.

The CSMS responds with a NotifyMonitoringReportResponse for every received received request.

func (NotifyMonitoringReportFeature) GetFeatureName

func (f NotifyMonitoringReportFeature) GetFeatureName() string

func (NotifyMonitoringReportFeature) GetRequestType

func (f NotifyMonitoringReportFeature) GetRequestType() reflect.Type

func (NotifyMonitoringReportFeature) GetResponseType

func (f NotifyMonitoringReportFeature) GetResponseType() reflect.Type

type NotifyMonitoringReportRequest

type NotifyMonitoringReportRequest struct {
	RequestID   int              `json:"requestId" validate:"gte=0"`                  // The id of the GetMonitoringRequest that requested this report.
	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.
	GeneratedAt *types.DateTime  `json:"generatedAt" validate:"required"`             // Timestamp of the moment this message was generated at the Charging Station.
	Monitor     []MonitoringData `json:"monitor,omitempty" validate:"omitempty,dive"` // List of MonitoringData containing monitoring settings.
}

The field definition of the NotifyMonitoringReport request payload sent by a Charging Station to the CSMS.

func NewNotifyMonitoringReportRequest

func NewNotifyMonitoringReportRequest(requestID int, seqNo int, generatedAt *types.DateTime, monitorData []MonitoringData) *NotifyMonitoringReportRequest

Creates a new NotifyMonitoringReportRequest, containing all required fields. Optional fields may be set afterwards.

func (NotifyMonitoringReportRequest) GetFeatureName

func (r NotifyMonitoringReportRequest) GetFeatureName() string

type NotifyMonitoringReportResponse

type NotifyMonitoringReportResponse struct {
}

This field definition of the NotifyMonitoringReport response payload, sent by the CSMS to the Charging Station in response to a NotifyMonitoringReportRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.

func NewNotifyMonitoringReportResponse

func NewNotifyMonitoringReportResponse() *NotifyMonitoringReportResponse

Creates a new NotifyMonitoringReportResponse, which doesn't contain any required or optional fields.

func (NotifyMonitoringReportResponse) GetFeatureName

func (c NotifyMonitoringReportResponse) GetFeatureName() string

type SetMonitoringBaseFeature

type SetMonitoringBaseFeature struct{}

A CSMS has the ability to request the Charging Station to activate a set of preconfigured monitoring settings, as denoted by the value of MonitoringBase. This is achieved by sending a SetMonitoringBaseRequest to the charging station. The charging station will respond with a SetMonitoringBaseResponse message.

It is up to the manufacturer of the Charging Station to define which monitoring settings are activated by All, FactoryDefault and HardWiredOnly.

func (SetMonitoringBaseFeature) GetFeatureName

func (f SetMonitoringBaseFeature) GetFeatureName() string

func (SetMonitoringBaseFeature) GetRequestType

func (f SetMonitoringBaseFeature) GetRequestType() reflect.Type

func (SetMonitoringBaseFeature) GetResponseType

func (f SetMonitoringBaseFeature) GetResponseType() reflect.Type

type SetMonitoringBaseRequest

type SetMonitoringBaseRequest struct {
	MonitoringBase MonitoringBase `json:"monitoringBase" validate:"required,monitoringBase"` // Specifies which monitoring base will be set.
}

The field definition of the SetMonitoringBase request payload sent by the CSMS to the Charging Station.

func NewSetMonitoringBaseRequest

func NewSetMonitoringBaseRequest(monitoringBase MonitoringBase) *SetMonitoringBaseRequest

Creates a new SetMonitoringBaseRequest, containing all required fields. There are no optional fields for this message.

func (SetMonitoringBaseRequest) GetFeatureName

func (r SetMonitoringBaseRequest) GetFeatureName() string

type SetMonitoringBaseResponse

type SetMonitoringBaseResponse struct {
	Status     types.GenericDeviceModelStatus `json:"status" validate:"required,genericDeviceModelStatus"` // Indicates whether the Charging Station was able to accept the request.
	StatusInfo *types.StatusInfo              `json:"statusInfo,omitempty" validate:"omitempty"`           // Detailed status information.
}

This field definition of the SetMonitoringBase response payload, sent by the Charging Station to the CSMS in response to a SetMonitoringBaseRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.

func NewSetMonitoringBaseResponse

func NewSetMonitoringBaseResponse(status types.GenericDeviceModelStatus) *SetMonitoringBaseResponse

Creates a new SetMonitoringBaseResponse, containing all required fields. Optional fields may be set afterwards.

func (SetMonitoringBaseResponse) GetFeatureName

func (c SetMonitoringBaseResponse) GetFeatureName() string

type SetMonitoringData

type SetMonitoringData struct {
	ID          *int            `json:"id,omitempty" validate:"omitempty"`    // An id SHALL only be given to replace an existing monitor. The Charging Station handles the generation of id’s for new monitors.
	Transaction bool            `json:"transaction,omitempty"`                // Monitor only active when a transaction is ongoing on a component relevant to this transaction.
	Value       float64         `json:"value"`                                // Value for threshold or delta monitoring. For Periodic or PeriodicClockAligned this is the interval in seconds.
	Type        MonitorType     `json:"type" validate:"required,monitorType"` // The type of this monitor, e.g. a threshold, delta or periodic monitor.
	Severity    int             `json:"severity" validate:"min=0,max=9"`      // The severity that will be assigned to an event that is triggered by this monitor. The severity range is 0-9, with 0 as the highest and 9 as the lowest severity level.
	Component   types.Component `json:"component" validate:"required"`        // Component for which monitor is set.
	Variable    types.Variable  `json:"variable" validate:"required"`         // Variable for which monitor is set.
}

Hold parameters of a SetVariableMonitoring request.

type SetMonitoringLevelFeature

type SetMonitoringLevelFeature struct{}

It may be desirable to restrict the reporting of monitoring events, to only those monitors with a severity number lower than or equal to a certain severity. For example when the data-traffic between Charging Station and CSMS needs to limited for some reason.

The CSMS can control which events it will to be notified of by the Charging Station with the SetMonitoringLevelRequest message. The charging station responds with a SetMonitoringLevelResponse. Monitoring events, reported later on via NotifyEventRequest messages, will be restricted according to the set monitoring level.

func (SetMonitoringLevelFeature) GetFeatureName

func (f SetMonitoringLevelFeature) GetFeatureName() string

func (SetMonitoringLevelFeature) GetRequestType

func (f SetMonitoringLevelFeature) GetRequestType() reflect.Type

func (SetMonitoringLevelFeature) GetResponseType

func (f SetMonitoringLevelFeature) GetResponseType() reflect.Type

type SetMonitoringLevelRequest

type SetMonitoringLevelRequest struct {
	// Severity levels have the following meaning:
	//
	//  - 0 Danger:
	// Indicates lives are potentially in danger. Urgent attention
	// is needed and action should be taken immediately.
	//  - 1 Hardware Failure:
	// Indicates that the Charging Station is unable to continue regular operations due to Hardware issues.
	//  - 2 System Failure:
	// Indicates that the Charging Station is unable to continue regular operations due to software or minor hardware
	// issues.
	//  - 3 Critical:
	// Indicates a critical error.
	//  - 4 Error:
	// Indicates a non-urgent error.
	//  - 5 Alert:
	// Indicates an alert event. Default severity for any type of monitoring event.
	//  - 6 Warning:
	// Indicates a warning event.
	//  - 7 Notice:
	// Indicates an unusual event.
	//  - 8 Informational:
	// Indicates a regular operational event. May be used for reporting, measuring throughput, etc.
	//  - 9 Debug:
	// Indicates information useful to developers for debugging, not useful during operations.
	Severity int `json:"severity" validate:"min=0,max=9"`
}

The field definition of the SetMonitoringLevel request payload sent by the CSMS to the Charging Station.

func NewSetMonitoringLevelRequest

func NewSetMonitoringLevelRequest(severity int) *SetMonitoringLevelRequest

Creates a new SetMonitoringLevelRequest, containing all required fields. There are no optional fields for this message.

func (SetMonitoringLevelRequest) GetFeatureName

func (r SetMonitoringLevelRequest) GetFeatureName() string

type SetMonitoringLevelResponse

type SetMonitoringLevelResponse struct {
	Status     types.GenericDeviceModelStatus `json:"status" validate:"required,genericDeviceModelStatus"` // Indicates whether the Charging Station was able to accept the request.
	StatusInfo *types.StatusInfo              `json:"statusInfo,omitempty" validate:"omitempty"`           // Detailed status information.
}

This field definition of the SetMonitoringLevel response payload, sent by the Charging Station to the CSMS in response to a SetMonitoringLevelRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.

func NewSetMonitoringLevelResponse

func NewSetMonitoringLevelResponse(status types.GenericDeviceModelStatus) *SetMonitoringLevelResponse

Creates a new SetMonitoringLevelResponse, containing all required fields. Optional fields may be set afterwards.

func (SetMonitoringLevelResponse) GetFeatureName

func (c SetMonitoringLevelResponse) GetFeatureName() string

type SetMonitoringResult

type SetMonitoringResult struct {
	ID         *int                `json:"id,omitempty" validate:"omitempty"`              // Id given to the VariableMonitor by the Charging Station. The Id is only returned when status is accepted.
	Status     SetMonitoringStatus `json:"status" validate:"required,setMonitoringStatus"` // Status is OK if a value could be returned. Otherwise this will indicate the reason why a value could not be returned.
	Type       MonitorType         `json:"type" validate:"required,monitorType"`           // The type of this monitor, e.g. a threshold, delta or periodic monitor.
	Severity   int                 `json:"severity" validate:"min=0,max=9"`                // The severity that will be assigned to an event that is triggered by this monitor. The severity range is 0-9, with 0 as the highest and 9 as the lowest severity level.
	Component  types.Component     `json:"component" validate:"required"`                  // Component for which status is returned.
	Variable   types.Variable      `json:"variable" validate:"required"`                   // Variable for which status is returned.
	StatusInfo *types.StatusInfo   `json:"statusInfo,omitempty" validate:"omitempty"`      // Detailed status information.
}

Holds the result of SetVariableMonitoring request.

type SetMonitoringStatus

type SetMonitoringStatus string

Status contained inside a SetMonitoringResult struct.

const (
	SetMonitoringStatusAccepted               SetMonitoringStatus = "Accepted"
	SetMonitoringStatusUnknownComponent       SetMonitoringStatus = "UnknownComponent"
	SetMonitoringStatusUnknownVariable        SetMonitoringStatus = "UnknownVariable"
	SetMonitoringStatusUnsupportedMonitorType SetMonitoringStatus = "UnsupportedMonitorType"
	SetMonitoringStatusRejected               SetMonitoringStatus = "Rejected"
	SetMonitoringStatusDuplicate              SetMonitoringStatus = "Duplicate"
)

type SetVariableMonitoringFeature

type SetVariableMonitoringFeature struct{}

The CSMS may request the Charging Station to set monitoring triggers on Variables. Multiple triggers can be set for upper or lower thresholds, delta changes or periodic reporting.

To achieve this, the CSMS sends a SetVariableMonitoringRequest to the Charging Station. The Charging Station responds with a SetVariableMonitoringResponse.

func (SetVariableMonitoringFeature) GetFeatureName

func (f SetVariableMonitoringFeature) GetFeatureName() string

func (SetVariableMonitoringFeature) GetRequestType

func (f SetVariableMonitoringFeature) GetRequestType() reflect.Type

func (SetVariableMonitoringFeature) GetResponseType

func (f SetVariableMonitoringFeature) GetResponseType() reflect.Type

type SetVariableMonitoringRequest

type SetVariableMonitoringRequest struct {
	MonitoringData []SetMonitoringData `json:"setMonitoringData" validate:"required,min=1,dive"` // List of MonitoringData containing monitoring settings.
}

The field definition of the SetVariableMonitoring request payload sent by the CSMS to the Charging Station.

func NewSetVariableMonitoringRequest

func NewSetVariableMonitoringRequest(data []SetMonitoringData) *SetVariableMonitoringRequest

Creates a new SetVariableMonitoringRequest, containing all required fields. There are no optional fields for this message.

func (SetVariableMonitoringRequest) GetFeatureName

func (r SetVariableMonitoringRequest) GetFeatureName() string

type SetVariableMonitoringResponse

type SetVariableMonitoringResponse struct {
	MonitoringResult []SetMonitoringResult `json:"setMonitoringResult" validate:"required,min=1,dive"` //  List of result statuses per monitor.
}

This field definition of the SetVariableMonitoring response payload, sent by the Charging Station to the CSMS in response to a SetVariableMonitoringRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.

func NewSetVariableMonitoringResponse

func NewSetVariableMonitoringResponse(result []SetMonitoringResult) *SetVariableMonitoringResponse

Creates a new SetVariableMonitoringResponse, containing all required fields. There are no optional fields for this message.

func (SetVariableMonitoringResponse) GetFeatureName

func (c SetVariableMonitoringResponse) GetFeatureName() string

type UploadLogStatus

type UploadLogStatus string

UploadLogStatus represents the current status of the log-upload procedure, reported by a Charging Station in a LogStatusNotificationRequest.

const (
	UploadLogStatusBadMessage       UploadLogStatus = "BadMessage"            // A badly formatted packet or other protocol incompatibility was detected.
	UploadLogStatusIdle             UploadLogStatus = "Idle"                  // The Charging Station is not uploading a log file. Idle SHALL only be used when the message was triggered by a TriggerMessageRequest.
	UploadLogStatusNotSupportedOp   UploadLogStatus = "NotSupportedOperation" // The server does not support the operation.
	UploadLogStatusPermissionDenied UploadLogStatus = "PermissionDenied"      // Insufficient permissions to perform the operation.
	UploadLogStatusUploaded         UploadLogStatus = "Uploaded"              // File has been uploaded successfully.
	UploadLogStatusUploadFailure    UploadLogStatus = "UploadFailure"         // Failed to upload the requested file.
	UploadLogStatusUploading        UploadLogStatus = "Uploading"             // File is being uploaded.
)

type VariableMonitoring

type VariableMonitoring struct {
	ID          int         `json:"id" validate:"gte=0"`                  // Identifies the monitor.
	Transaction bool        `json:"transaction"`                          // Monitor only active when a transaction is ongoing on a component relevant to this transaction.
	Value       float64     `json:"value"`                                // Value for threshold or delta monitoring. For Periodic or PeriodicClockAligned this is the interval in seconds.
	Type        MonitorType `json:"type" validate:"required,monitorType"` // The type of this monitor, e.g. a threshold, delta or periodic monitor.
	Severity    int         `json:"severity" validate:"min=0,max=9"`      // The severity that will be assigned to an event that is triggered by this monitor. The severity range is 0-9, with 0 as the highest and 9 as the lowest severity level.
}

VariableMonitoring describes a monitoring setting for a variable.

func NewVariableMonitoring

func NewVariableMonitoring(id int, transaction bool, value float64, t MonitorType, severity int) VariableMonitoring

NewVariableMonitoring is a utility function for creating a VariableMonitoring struct.

Jump to

Keyboard shortcuts

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