core

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Contains the Basic Charge Point functionality comparable with ntxcp 1.5.

Index

Constants

View Source
const (
	ResetTypeHard       ResetType   = "Hard"
	ResetTypeSoft       ResetType   = "Soft"
	ResetStatusAccepted ResetStatus = "Accepted"
	ResetStatusRejected ResetStatus = "Rejected"
)
View Source
const (
	NoError                     DingxGatewayErrorCode = "NoError"
	ServiceConnectionFailure    DingxGatewayErrorCode = "ServiceConnectionFailure"
	DingxGatewayStatusAvailable DingxGatewayStatus    = "Available"
	DingxGatewayStatusPreparing DingxGatewayStatus    = "Preparing"
	DingxGatewayStatusFinishing DingxGatewayStatus    = "Finishing"
	DingxGatewayStatusFaulted   DingxGatewayStatus    = "Faulted"
)
View Source
const BootNotificationFeatureName = "BootNotification"
View Source
const CaptureProcessFeatureName = "CaptureProcess"
View Source
const ChangeConfigurationFeatureName = "ChangeConfiguration"
View Source
const ClearCacheFeatureName = "ClearCache"
View Source
const DataTransferFeatureName = "DataTransfer"
View Source
const GetConfigurationFeatureName = "GetConfiguration"
View Source
const HeartbeatFeatureName = "Heartbeat"
View Source
const MeterValuesFeatureName = "MeterValues"
View Source
const ProcessValuesFeatureName = "ProcessValues"
View Source
const ResetFeatureName = "Reset"
View Source
const StatusNotificationFeatureName = "StatusNotification"

Variables

Provides support for Basic Charge Point functionality comparable with ntxcp 1.5.

View Source
var ProfileName = "Core"

THe profile name

Functions

This section is empty.

Types

type BootNotificationConfirmation

type BootNotificationConfirmation struct {
	CurrentTime *types.DateTime    `json:"currentTime" validate:"required"`
	Interval    int                `json:"interval" validate:"gte=0"`
	Status      RegistrationStatus `json:"status" validate:"required,registrationStatus16"`
}

This field definition of the BootNotification confirmation payload, sent by the Ding.X Control Center to the Charge Point in response to a BootNotificationRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.

func NewBootNotificationConfirmation

func NewBootNotificationConfirmation(currentTime *types.DateTime, interval int, status RegistrationStatus) *BootNotificationConfirmation

Creates a new BootNotificationConfirmation. There are no optional fields for this message.

func (BootNotificationConfirmation) GetFeatureName

func (c BootNotificationConfirmation) GetFeatureName() string

type BootNotificationFeature

type BootNotificationFeature struct{}

After each (re)boot, a Charge Point SHALL send a request to the Ding.X Control Center with information about its configuration (e.g. version, vendor, etc.). The Ding.X Control Center SHALL respond to indicate whether it will accept the Charge Point. Between the physical power-on/reboot and the successful completion of a BootNotification, where Ding.X Control Center returns Accepted or Pending, the Charge Point SHALL NOT send any other request to the Ding.X Control Center. When the Ding.X Control Center responds with a BootNotification.conf with a status Accepted, the Charge Point 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 Ding.X Control Center’s current time. If that interval value is zero, the Charge Point chooses a waiting interval on its own, in a way that avoids flooding the Ding.X Control Center with requests. If the Ding.X Control Center returns the Pending status, the communication channel SHOULD NOT be closed by either the Charge Point or the Ding.X Control Center. The Ding.X Control Center MAY send request messages to retrieve information from the Charge Point 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 {
	DingXGatewayModel string `json:"dingXGatewayModel,omitempty" validate:"max=64"`
	FirmwareVersion   string `json:"firmwareVersion,omitempty" validate:"max=10"`
}

The field definition of the BootNotification request payload sent by the Charge Point to the Ding.X Control Center.

func NewBootNotificationRequest

func NewBootNotificationRequest(gatewayModel 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 CaptureProcessConfirmation

type CaptureProcessConfirmation struct {
	Status       CaptureProcessStatus `json:"status" validate:"required,captureProcessStatus"`
	ProcessValue []types.ProcessValue `json:"processValue"`
}

This field definition of the CaptureProcess confirmation payload, sent by the Gateway to the Control Center in response to a CaptureProcessRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.

func NewCaptureProcessConfirmation

func NewCaptureProcessConfirmation(status CaptureProcessStatus, processValue []types.ProcessValue) *CaptureProcessConfirmation

func (CaptureProcessConfirmation) GetFeatureName

func (c CaptureProcessConfirmation) GetFeatureName() string

type CaptureProcessFeature

type CaptureProcessFeature struct{}

func (CaptureProcessFeature) GetFeatureName

func (f CaptureProcessFeature) GetFeatureName() string

func (CaptureProcessFeature) GetRequestType

func (f CaptureProcessFeature) GetRequestType() reflect.Type

func (CaptureProcessFeature) GetResponseType

func (f CaptureProcessFeature) GetResponseType() reflect.Type

type CaptureProcessRequest

type CaptureProcessRequest struct {
	ServiceId    string      `json:"serviceId" validate:"required,max=36"`
	DatapointIds []string    `json:"datapointIds,omitempty"`
	Params       []Parameter `json:"params,omitempty"`
}

The field definition of the CaptureProcess request payload sent by the Control Center to the Gateway.

func NewCaptureProcessRequest

func NewCaptureProcessRequest(serviceId string, datapointIds []string) *CaptureProcessRequest

func (CaptureProcessRequest) GetFeatureName

func (r CaptureProcessRequest) GetFeatureName() string

type CaptureProcessStatus

type CaptureProcessStatus string

Result of CaptureProcessRequest.

const (
	CaptureProcessStatusAccepted   CaptureProcessStatus = "Accepted"
	CaptureProcessStatusRejected   CaptureProcessStatus = "Rejected"
	CaptureProcessStatusInProgress CaptureProcessStatus = "InProgress"
	CaptureProcessStatusError      CaptureProcessStatus = "Error"
	CaptureProcessStatusPending    CaptureProcessStatus = "Pending"
	CaptureProcessStatusCompleted  CaptureProcessStatus = "Completed"
	CaptureProcessStatusCancelled  CaptureProcessStatus = "Cancelled"
	CaptureProcessStatusOnHold     CaptureProcessStatus = "OnHold"
)

type ChangeConfigurationConfirmation

type ChangeConfigurationConfirmation struct {
	Status ConfigurationStatus `json:"status" validate:"required,configurationStatus"`
}

This field definition of the ChangeConfiguration confirmation payload, sent by the Charge Point to the Ding.X Control Center in response to a ChangeConfigurationRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.

func NewChangeConfigurationConfirmation

func NewChangeConfigurationConfirmation(status ConfigurationStatus) *ChangeConfigurationConfirmation

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

func (ChangeConfigurationConfirmation) GetFeatureName

func (c ChangeConfigurationConfirmation) GetFeatureName() string

type ChangeConfigurationFeature

type ChangeConfigurationFeature struct{}

Ding.X Control Center can request a Charge Point to change configuration parameters, by sending a ChangeConfigurationRequest. This request contains a key-value pair, where "key" is the name of the configuration setting to change and "value" contains the new setting for the configuration setting. A Charge Point SHALL reply with a ChangeConfigurationConfirmation indicating whether it was able to apply the change to its configuration. The Charge Point SHALL set the status field in the ChangeConfiguration.conf according to the following rules: - If the change was applied successfully, and the change if effective immediately, the Charge Point SHALL respond with a status 'Accepted'. - If the change was applied successfully, but a reboot is needed to make it effective, the Charge Point SHALL respond with status 'RebootRequired'. - If "key" does not correspond to a configuration setting supported by Charge Point, it SHALL respond with a status 'NotSupported'. - If the Charge Point did not set the configuration, and none of the previous statuses applies, the Charge Point SHALL respond with status 'Rejected'.

If a key value is defined as a CSL, it MAY be accompanied with a [KeyName]MaxLength key, indicating the max length of the CSL in items. If this key is not set, a safe value of 1 (one) item SHOULD be assumed.

func (ChangeConfigurationFeature) GetFeatureName

func (f ChangeConfigurationFeature) GetFeatureName() string

func (ChangeConfigurationFeature) GetRequestType

func (f ChangeConfigurationFeature) GetRequestType() reflect.Type

func (ChangeConfigurationFeature) GetResponseType

func (f ChangeConfigurationFeature) GetResponseType() reflect.Type

type ChangeConfigurationRequest

type ChangeConfigurationRequest struct {
	Key   string `json:"key" validate:"required,max=50"`
	Value string `json:"value" validate:"required,max=500"`
}

The field definition of the ChangeConfiguration request payload sent by the Ding.X Control Center to the Charge Point.

func NewChangeConfigurationRequest

func NewChangeConfigurationRequest(key string, value string) *ChangeConfigurationRequest

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

func (ChangeConfigurationRequest) GetFeatureName

func (r ChangeConfigurationRequest) GetFeatureName() string

type ClearCacheConfirmation

type ClearCacheConfirmation struct {
	Status ClearCacheStatus `json:"status" validate:"required,cacheStatus16"`
}

This field definition of the ClearCache confirmation payload, sent by the Charge Point to the Ding.X Control Center in response to a ClearCacheRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.

func NewClearCacheConfirmation

func NewClearCacheConfirmation(status ClearCacheStatus) *ClearCacheConfirmation

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

func (ClearCacheConfirmation) GetFeatureName

func (c ClearCacheConfirmation) GetFeatureName() string

type ClearCacheFeature

type ClearCacheFeature struct{}

Ding.X Control Center can request a Charge Point to clear its Authorization Cache. The Ding.X Control Center SHALL send a ClearCacheRequest PDU for clearing the Charge Point’s Authorization Cache. Upon receipt of a ClearCacheRequest, the Charge Point SHALL respond with a ClearCacheConfirmation PDU. The response PDU SHALL indicate whether the Charge Point was able to clear its Authorization Cache.

func (ClearCacheFeature) GetFeatureName

func (f ClearCacheFeature) GetFeatureName() string

func (ClearCacheFeature) GetRequestType

func (f ClearCacheFeature) GetRequestType() reflect.Type

func (ClearCacheFeature) GetResponseType

func (f ClearCacheFeature) GetResponseType() reflect.Type

type ClearCacheRequest

type ClearCacheRequest struct {
}

The field definition of the ClearCache request payload sent by the Ding.X Control Center to the Charge Point.

func NewClearCacheRequest

func NewClearCacheRequest() *ClearCacheRequest

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

func (ClearCacheRequest) GetFeatureName

func (r ClearCacheRequest) GetFeatureName() string

type ClearCacheStatus

type ClearCacheStatus string

Status returned in response to ClearCacheRequest.

const (
	ClearCacheStatusAccepted ClearCacheStatus = "Accepted"
	ClearCacheStatusRejected ClearCacheStatus = "Rejected"
)

type ConfigurationKey

type ConfigurationKey struct {
	Key      string  `json:"key" validate:"required,max=50"`
	Readonly bool    `json:"readonly"`
	Value    *string `json:"value,omitempty" validate:"omitempty,max=2000"`
}

Contains information about a specific configuration key. It is returned in GetConfigurationConfirmation

type ConfigurationStatus

type ConfigurationStatus string

Status in ChangeConfigurationConfirmation.

const (
	ConfigurationStatusAccepted       ConfigurationStatus = "Accepted"
	ConfigurationStatusRejected       ConfigurationStatus = "Rejected"
	ConfigurationStatusRebootRequired ConfigurationStatus = "RebootRequired"
	ConfigurationStatusNotSupported   ConfigurationStatus = "NotSupported"
)

type DataTransferConfirmation

type DataTransferConfirmation struct {
	Status DataTransferStatus `json:"status" validate:"required,dataTransferStatus16"`
	Data   interface{}        `json:"data,omitempty"`
}

This field definition of the DataTransfer confirmation payload, sent by an endpoint in response to a DataTransferRequest, coming from the other endpoint. In case the request was invalid, or couldn't be processed, an error will be sent instead.

func NewDataTransferConfirmation

func NewDataTransferConfirmation(status DataTransferStatus) *DataTransferConfirmation

Creates a new DataTransferConfirmation. Optional fields may be set afterwards.

func (DataTransferConfirmation) GetFeatureName

func (c DataTransferConfirmation) GetFeatureName() string

type DataTransferFeature

type DataTransferFeature struct{}

If a Charge Point needs to send information to the Ding.X Control Center for a function not supported by ntxcp, it SHALL use a DataTransfer message. The same functionality may also be offered the other way around, allowing a Ding.X Control Center to send arbitrary custom commands to a Charge Point.

func (DataTransferFeature) GetFeatureName

func (f DataTransferFeature) GetFeatureName() string

func (DataTransferFeature) GetRequestType

func (f DataTransferFeature) GetRequestType() reflect.Type

func (DataTransferFeature) GetResponseType

func (f DataTransferFeature) GetResponseType() reflect.Type

type DataTransferRequest

type DataTransferRequest struct {
	VendorId  string      `json:"vendorId" validate:"required,max=255"`
	MessageId string      `json:"messageId,omitempty" validate:"max=50"`
	Data      interface{} `json:"data,omitempty"`
}

The field definition of the DataTransfer request payload sent by an endpoint to ther other endpoint.

func NewDataTransferRequest

func NewDataTransferRequest(vendorId string) *DataTransferRequest

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

func (DataTransferRequest) GetFeatureName

func (r DataTransferRequest) GetFeatureName() string

type DataTransferStatus

type DataTransferStatus string

Status in DataTransferConfirmation messages.

const (
	DataTransferStatusAccepted         DataTransferStatus = "Accepted"
	DataTransferStatusRejected         DataTransferStatus = "Rejected"
	DataTransferStatusUnknownMessageId DataTransferStatus = "UnknownMessageId"
	DataTransferStatusUnknownVendorId  DataTransferStatus = "UnknownVendorId"
)

type DingxControlCenterHandler

type DingxControlCenterHandler interface {
	OnBootNotification(dingxGatewayId string, request *BootNotificationRequest) (confirmation *BootNotificationConfirmation, err error)
	OnDataTransfer(dingxGatewayId string, request *DataTransferRequest) (confirmation *DataTransferConfirmation, err error)
	OnHeartbeat(dingxGatewayId string, request *HeartbeatRequest) (confirmation *HeartbeatConfirmation, err error)
	OnMeterValues(dingxGatewayId string, request *MeterValuesRequest) (confirmation *MeterValuesConfirmation, err error)
	OnStatusNotification(dingxGatewayId string, request *StatusNotificationRequest) (confirmation *StatusNotificationConfirmation, err error)
}

Needs to be implemented by Central systems for handling messages part of the ntxcp 1.0 Core profile.

type DingxGatewayErrorCode

type DingxGatewayErrorCode string

Charge Point status reported in StatusNotificationRequest.

type DingxGatewayHandler

type DingxGatewayHandler interface {
	OnChangeConfiguration(request *ChangeConfigurationRequest) (confirmation *ChangeConfigurationConfirmation, err error)
	OnClearCache(request *ClearCacheRequest) (confirmation *ClearCacheConfirmation, err error)
	OnDataTransfer(request *DataTransferRequest) (confirmation *DataTransferConfirmation, err error)
	OnGetConfiguration(request *GetConfigurationRequest) (confirmation *GetConfigurationConfirmation, err error)
	OnReset(request *ResetRequest) (confirmation *ResetConfirmation, err error)
	OnCaptureProcess(request *CaptureProcessRequest) (confirmation *CaptureProcessConfirmation, err error)
}

Needs to be implemented by Charge points for handling messages part of the ntxcp 1.0 Core profile.

type DingxGatewayStatus

type DingxGatewayStatus string

Status reported in StatusNotificationRequest. A status can be reported for the Charge Point main controller (serviceId = "") or for a specific connector. Status for the Charge Point main controller is a subset of the enumeration: Available, Unavailable or Faulted.

type GetConfigurationConfirmation

type GetConfigurationConfirmation struct {
	ConfigurationKey []ConfigurationKey `json:"configurationKey,omitempty" validate:"omitempty,dive"`
	UnknownKey       []string           `json:"unknownKey,omitempty" validate:"omitempty,dive,max=50"`
}

TODO: validation of cardinalities for the two fields should be handled somewhere (#configurationKey + #unknownKey > 0) TODO: add uniqueness of configurationKey in slice, once PR is merged (https://github.com/go-playground/validator/pull/496) This field definition of the GetConfiguration confirmation payload, sent by the Charge Point to the Ding.X Control Center in response to a GetConfigurationRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.

func NewGetConfigurationConfirmation

func NewGetConfigurationConfirmation(configurationKey []ConfigurationKey) *GetConfigurationConfirmation

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

func (GetConfigurationConfirmation) GetFeatureName

func (c GetConfigurationConfirmation) GetFeatureName() string

type GetConfigurationFeature

type GetConfigurationFeature struct{}

To retrieve the value of configuration settings, the Ding.X Control Center SHALL send a GetConfigurationRequest to the Charge Point. If the list of keys in the request is empty or missing (it is optional), the Charge Point SHALL return a list of all configuration settings in GetConfigurationConfirmation. Otherwise Charge Point SHALL return a list of recognized keys and their corresponding values and read-only state. Unrecognized keys SHALL be placed in the response payload as part of the optional unknown key list element of GetConfigurationConfirmation. The number of configuration keys requested in a single payload MAY be limited by the Charge Point. This maximum can be retrieved by reading the configuration key GetConfigurationMaxKeys.

func (GetConfigurationFeature) GetFeatureName

func (f GetConfigurationFeature) GetFeatureName() string

func (GetConfigurationFeature) GetRequestType

func (f GetConfigurationFeature) GetRequestType() reflect.Type

func (GetConfigurationFeature) GetResponseType

func (f GetConfigurationFeature) GetResponseType() reflect.Type

type GetConfigurationRequest

type GetConfigurationRequest struct {
	Key []string `json:"key,omitempty" validate:"omitempty,unique,dive,max=50"`
}

The field definition of the GetConfiguration request payload sent by the Ding.X Control Center to the Charge Point.

func NewGetConfigurationRequest

func NewGetConfigurationRequest(keys []string) *GetConfigurationRequest

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

func (GetConfigurationRequest) GetFeatureName

func (r GetConfigurationRequest) GetFeatureName() string

type HeartbeatConfirmation

type HeartbeatConfirmation struct {
	CurrentTime *types.DateTime `json:"currentTime" validate:"required"`
}

This field definition of the Heartbeat confirmation payload, sent by the Ding.X Control Center to the Charge Point in response to a HeartbeatRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.

func NewHeartbeatConfirmation

func NewHeartbeatConfirmation(currentTime *types.DateTime) *HeartbeatConfirmation

Creates a new HeartbeatConfirmation, containing all required fields.

func (HeartbeatConfirmation) GetFeatureName

func (c HeartbeatConfirmation) GetFeatureName() string

type HeartbeatFeature

type HeartbeatFeature struct{}

To let the Ding.X Control Center know that a Charge Point is still connected, a Charge Point sends a heartbeat after a configurable time interval. The Charge Point SHALL send a HeartbeatRequest for ensuring that the Ding.X Control Center knows that a Charge Point is still alive. Upon receipt of a Heartbeat.req PDU, the Ding.X Control Center SHALL respond with a HeartbeatConfirmation. The response payload SHALL contain the current time of the Ding.X Control Center, which is RECOMMENDED to be used by the Charge Point to synchronize its internal clock. The Charge Point MAY skip sending a HeartbeatRequest when another payload has been sent to the Ding.X Control Center within the configured heartbeat interval. This implies that a Ding.X Control Center SHOULD assume availability of a Charge Point whenever a request has been received, the same way as it would have, when it received a HeartbeatRequest. With JSON over WebSocket, sending heartbeats is not mandatory. However, for time synchronization it is advised to at least send one heartbeat per 24 hour.

func (HeartbeatFeature) GetFeatureName

func (f HeartbeatFeature) GetFeatureName() string

func (HeartbeatFeature) GetRequestType

func (f HeartbeatFeature) GetRequestType() reflect.Type

func (HeartbeatFeature) GetResponseType

func (f HeartbeatFeature) GetResponseType() reflect.Type

type HeartbeatRequest

type HeartbeatRequest struct {
}

The field definition of the Heartbeat request payload sent by the Charge Point to the Ding.X Control Center.

func NewHeartbeatRequest

func NewHeartbeatRequest() *HeartbeatRequest

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

func (HeartbeatRequest) GetFeatureName

func (r HeartbeatRequest) GetFeatureName() string

type MeterValuesConfirmation

type MeterValuesConfirmation struct {
}

This field definition of the Authorize confirmation payload, sent by the Charge Point to the Ding.X Control Center in response to an AuthorizeRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.

func NewMeterValuesConfirmation

func NewMeterValuesConfirmation() *MeterValuesConfirmation

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

func (MeterValuesConfirmation) GetFeatureName

func (c MeterValuesConfirmation) GetFeatureName() string

type MeterValuesFeature

type MeterValuesFeature struct{}

A Charge Point MAY sample the electrical meter or other sensor/transducer hardware to provide extra information about its meter values. It is up to the Charge Point to decide when it will send meter values. This can be configured using the ChangeConfiguration message to specify data acquisition intervals and specify data to be acquired & reported. The Charge Point SHALL send a MeterValuesRequest for offloading meter values. The request PDU SHALL contain for each sample: 1. The id of the Connector from which samples were taken. If the connectorId is 0, it is associated with the entire Charge Point. If the connectorId is 0 and the Measurand is energy related, the sample SHOULD be taken from the main energy meter. 2. The transactionId of the transaction to which these values are related, if applicable. If there is no transaction in progress or if the values are taken from the main meter, then transaction id may be omitted. 3. One or more meterValue elements, of type MeterValue, each representing a set of one or more data values taken at a particular point in time. Each MeterValue element contains a timestamp and a set of one or more individual sampledValue elements, all captured at the same point in time. Each sampledValue element contains a single value datum. The nature of each sampledValue is determined by the optional measurand, context, location, unit, phase, and format fields. The optional measurand field specifies the type of value being measured/reported. The optional context field specifies the reason/event triggering the reading. The optional location field specifies where the measurement is taken (e.g. Inlet, Outlet). The optional phase field specifies to which phase or phases of the electric installation the value applies. The Charging Point SHALL report all phase number dependent values from the electrical meter (or grid connection when absent) point of view. For individual connector phase rotation information, the Ding.X Control Center MAY query the ConnectorPhaseRotation configuration key on the Charging Point via GetConfiguration. The Charge Point SHALL report the phase rotation in respect to the grid connection. Possible values per connector are: NotApplicable, Unknown, RST, RTS, SRT, STR, TRS and TSR. see section Standard Configuration Key Names & Values for more information. The EXPERIMENTAL optional format field specifies whether the data is represented in the normal (default) form as a simple numeric value ("Raw"), or as “SignedData”, an opaque digitally signed binary data block, represented as hex data. This experimental field may be deprecated and subsequently removed in later versions, when a more mature solution alternative is provided. To retain backward compatibility, the default values of all of the optional fields on a sampledValue element are such that a value without any additional fields will be interpreted, as a register reading of active import energy in Wh (Watt-hour) units. Upon receipt of a MeterValuesRequest, the Ding.X Control Center SHALL respond with a MeterValuesConfirmation. It is likely that The Ding.X Control Center applies sanity checks to the data contained in a MeterValuesRequest it received. The outcome of such sanity checks SHOULD NOT ever cause the Ding.X Control Center to not respond with a MeterValuesConfirmation. Failing to respond with a MeterValues.conf will only cause the Charge Point to try the same message again as specified in Error responses to transaction-related messages.

func (MeterValuesFeature) GetFeatureName

func (f MeterValuesFeature) GetFeatureName() string

func (MeterValuesFeature) GetRequestType

func (f MeterValuesFeature) GetRequestType() reflect.Type

func (MeterValuesFeature) GetResponseType

func (f MeterValuesFeature) GetResponseType() reflect.Type

type MeterValuesRequest

type MeterValuesRequest struct {
	ConnectorId   int                `json:"connectorId" validate:"gte=0"`
	TransactionId *int               `json:"transactionId,omitempty"`
	MeterValue    []types.MeterValue `json:"meterValue" validate:"required,min=1,dive"`
}

The field definition of the MeterValues request payload sent by the Charge Point to the Ding.X Control Center.

func NewMeterValuesRequest

func NewMeterValuesRequest(connectorId int, meterValues []types.MeterValue) *MeterValuesRequest

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

func (MeterValuesRequest) GetFeatureName

func (r MeterValuesRequest) GetFeatureName() string

type Parameter added in v1.4.0

type Parameter struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type RegistrationStatus

type RegistrationStatus string

Result of registration in response to a BootNotification request.

const (
	RegistrationStatusAccepted RegistrationStatus = "Accepted"
	RegistrationStatusPending  RegistrationStatus = "Pending"
	RegistrationStatusRejected RegistrationStatus = "Rejected"
)

type ResetConfirmation

type ResetConfirmation struct {
	Status ResetStatus `json:"status" validate:"required,resetStatus16"`
}

This field definition of the Reset confirmation payload, sent by the Charge Point to the Ding.X Control Center in response to a ResetRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.

func NewResetConfirmation

func NewResetConfirmation(status ResetStatus) *ResetConfirmation

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

func (ResetConfirmation) GetFeatureName

func (c ResetConfirmation) GetFeatureName() string

type ResetFeature

type ResetFeature struct{}

The Ding.X Control Center SHALL send a ResetRequest for requesting a Charge Point to reset itself. The Ding.X Control Center can request a hard or a soft reset. Upon receipt of a ResetRequest, the Charge Point SHALL respond with a ResetConfirmation message. The response SHALL include whether the Charge Point will attempt to reset itself. After receipt of a ResetRequest, The Charge Point SHALL send a StopTransactionRequest for any ongoing transaction before performing the reset. If the Charge Point fails to receive a StopTransactionConfirmation form the Ding.X Control Center, it shall queue the StopTransactionRequest. At receipt of a soft reset, the Charge Point SHALL stop ongoing transactions gracefully and send StopTransactionRequest for every ongoing transaction. It should then restart the application software (if possible, otherwise restart the processor/controller). At receipt of a hard reset the Charge Point SHALL restart (all) the hardware, it is not required to gracefully stop ongoing transaction. If possible the Charge Point sends a StopTransactionRequest for previously ongoing transactions after having restarted and having been accepted by the Ding.X Control Center via a BootNotificationConfirmation. This is a last resort solution for a not correctly functioning Charge Points, by sending a "hard" reset, (queued) information might get lost.

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:"required,resetType16"`
}

The field definition of the Reset request payload sent by the Ding.X Control Center to the Charge Point.

func NewResetRequest

func NewResetRequest(resetType ResetType) *ResetRequest

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

func (ResetRequest) GetFeatureName

func (r ResetRequest) GetFeatureName() string

type ResetStatus

type ResetStatus string

Result of ResetRequest.

type ResetType

type ResetType string

Type of reset requested by ResetRequest.

type StatusNotificationConfirmation

type StatusNotificationConfirmation struct {
}

This field definition of the StatusNotification confirmation payload, sent by the Ding.X Control Center to the Charge Point in response to a StatusNotificationRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.

func NewStatusNotificationConfirmation

func NewStatusNotificationConfirmation() *StatusNotificationConfirmation

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

func (StatusNotificationConfirmation) GetFeatureName

func (c StatusNotificationConfirmation) GetFeatureName() string

type StatusNotificationFeature

type StatusNotificationFeature struct{}

A Charge Point sends a notification to the Ding.X Control Center to inform the Ding.X Control Center about a status change or an error within the Charge Point. Refer to the official ntxcp specification for a full list of status changes that may trigger such a message. To limit the number of transitions, the Charge Point MAY omit sending a StatusNotificationRequest if it was active for less time than defined in the optional configuration key MinimumStatusDuration. This way, a Charge Point MAY choose not to send certain StatusNotificationRequest payloads. The Charge Point MAY send a StatusNotificationRequest to inform the Ding.X Control Center of fault conditions. When the 'status' field is not Faulted, the condition should be considered a warning since charging operations are still possible. When a Charge Point is configured with StopTransactionOnEVSideDisconnect set to false, a transaction is running and the EV becomes disconnected on EV side, then a StatusNotificationRequest with the state: SuspendedEV SHOULD be send to the Ding.X Control Center, with the 'errorCode' field set to: 'NoError'. The Charge Point SHOULD add additional information in the 'info' field, Notifying the Ding.X Control Center with the reason of suspension: 'EV side disconnected'. The current transaction is not stopped. When a Charge Point is configured with StopTransactionOnEVSideDisconnect set to true, a transaction is running and the EV becomes disconnected on EV side, then a StatusNotificationRequest with the state: 'Finishing' SHOULD be send to the Ding.X Control Center, with the 'errorCode' field set to: 'NoError'. The Charge Point SHOULD add additional information in the 'info' field, Notifying the Ding.X Control Center with the reason of stopping: 'EV side disconnected'. The current transaction is stopped. When a Charge Point connects to a Ding.X Control Center after having been offline, it updates the Ding.X Control Center about its status according to the following rules: 1. The Charge Point SHOULD send a StatusNotificationRequest with its current status if the status changed while the Charge Point was offline. 2. The Charge Point MAY send a StatusNotificationRequest to report an error that occurred while the Charge Point was offline. 3. The Charge Point SHOULD NOT send StatusNotificationRequest payloads for historical status change events that happened while the Charge Point was offline and that do not inform the Ding.X Control Center of Charge Point errors or the Charge Point’s current status. 4. The StatusNotificationRequest messages MUST be sent in the order in which the events that they describe occurred. Upon receipt of a StatusNotificationRequest, the Ding.X Control Center SHALL respond with a StatusNotificationConfirmation.

func (StatusNotificationFeature) GetFeatureName

func (f StatusNotificationFeature) GetFeatureName() string

func (StatusNotificationFeature) GetRequestType

func (f StatusNotificationFeature) GetRequestType() reflect.Type

func (StatusNotificationFeature) GetResponseType

func (f StatusNotificationFeature) GetResponseType() reflect.Type

type StatusNotificationRequest

type StatusNotificationRequest struct {
	ServiceId       string                `json:"serviceId"`
	ErrorCode       DingxGatewayErrorCode `json:"errorCode" validate:"required,dingxGatewayErrorCode"`
	Info            string                `json:"info,omitempty" validate:"max=50"`
	Status          DingxGatewayStatus    `json:"status" validate:"required,dingxGatewayStatus"`
	Timestamp       *types.DateTime       `json:"timestamp,omitempty" validate:"omitempty"`
	VendorId        string                `json:"vendorId,omitempty" validate:"max=255"`
	VendorErrorCode string                `json:"vendorErrorCode,omitempty" validate:"max=50"`
}

The field definition of the StatusNotification request payload sent by the Charge Point to the Ding.X Control Center.

func NewStatusNotificationRequest

func NewStatusNotificationRequest(serviceId string, errorCode DingxGatewayErrorCode, status DingxGatewayStatus) *StatusNotificationRequest

Creates a new StatusNotificationRequest, containing all required fields. Optional fields may be set directly on the created request.

func (StatusNotificationRequest) GetFeatureName

func (r StatusNotificationRequest) GetFeatureName() string

Jump to

Keyboard shortcuts

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