meter

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 3 Imported by: 4

Documentation

Overview

The Meter values functional block contains OCPP 2.0 features for sending meter values to the CSMS.

Index

Constants

View Source
const MeterValuesFeatureName = "MeterValues"
View Source
const ProfileName = "meter"

Variables

Functions

This section is empty.

Types

type CSMSHandler

type CSMSHandler interface {
	// OnMeterValues is called on the CSMS whenever a MeterValuesRequest is received from a charging station.
	OnMeterValues(chargingStationID string, request *MeterValuesRequest) (response *MeterValuesResponse, err error)
}

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

type ChargingStationHandler

type ChargingStationHandler interface {
}

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

type MeterValuesFeature

type MeterValuesFeature struct{}

The message is used to sample the electrical meter or other sensor/transducer hardware to provide information about the Charging Stations' Meter Values, outside of a transaction. The Charging Station is configured to send Meter values every XX seconds.

The Charging Station samples the electrical meter or other sensor/transducer hardware to provide information about its Meter Values. Depending on configuration settings, the Charging Station MAY send a MeterValues request, for offloading Meter Values to the CSMS. Upon receipt of a MeterValuesRequest message, the CSMS responds with a MeterValuesResponse message

The MeterValuesRequest and MeterValuesResponse messages are deprecated in OCPP 2.0. It is advised to start using Device Management Monitoring instead, see the diagnostics functional block.

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 {
	EvseID     int                `json:"evseId" validate:"gte=0"` // This contains a number (>0) designating an EVSE of the Charging Station. ‘0’ (zero) is used to designate the main power meter.
	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 Central System.

func NewMeterValuesRequest

func NewMeterValuesRequest(evseID 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 MeterValuesResponse

type MeterValuesResponse struct {
}

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

func NewMeterValuesResponse

func NewMeterValuesResponse() *MeterValuesResponse

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

func (MeterValuesResponse) GetFeatureName

func (c MeterValuesResponse) GetFeatureName() string

Jump to

Keyboard shortcuts

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