uccevc

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// EV provided an energy demand
	//
	// Use `EnergyDemand` to get the current data
	DataUpdateEnergyDemand api.EventType = "DataUpdateEnergyDemand"

	// EV provided a charge plan constraints
	//
	// Use `TimeSlotConstraints` to get the current data
	DataUpdateTimeSlotConstraints api.EventType = "DataUpdateTimeSlotConstraints"

	// EV incentive table data updated
	//
	// Use `IncentiveConstraints` to get the current data
	DataUpdateIncentiveTable api.EventType = "DataUpdateIncentiveTable"

	// EV requested an incentive table, call to WriteIncentiveTableDescriptions required
	DataRequestedIncentiveTableDescription api.EventType = "DataRequestedIncentiveTableDescription"

	// EV requested power limits, call to WritePowerLimits and WriteIncentives required
	DataRequestedPowerLimitsAndIncentives api.EventType = "DataRequestedPowerLimitsAndIncentives"

	// EV provided a charge plan
	//
	// Use `ChargePlanConstraints` to get the current data
	DataUpdateChargePlanConstraints api.EventType = "DataUpdateChargePlanConstraints"

	// EV provided a charge plan
	//
	// Use `ChargePlan` to get the current data
	DataUpdateChargePlan api.EventType = "DataUpdateChargePlan"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type UCCEVC

type UCCEVC struct {
	// contains filtered or unexported fields
}

func NewUCCEVC

func NewUCCEVC(service eebusapi.ServiceInterface, eventCB api.EntityEventCallback) *UCCEVC

func (*UCCEVC) AddFeatures

func (e *UCCEVC) AddFeatures()

func (*UCCEVC) AddUseCase

func (e *UCCEVC) AddUseCase()

func (*UCCEVC) ChargePlan

func (e *UCCEVC) ChargePlan(entity spineapi.EntityRemoteInterface) (api.ChargePlan, error)

func (*UCCEVC) ChargePlanConstraints

func (e *UCCEVC) ChargePlanConstraints(entity spineapi.EntityRemoteInterface) ([]api.DurationSlotValue, error)

func (*UCCEVC) ChargeStrategy

func (e *UCCEVC) ChargeStrategy(entity spineapi.EntityRemoteInterface) api.EVChargeStrategyType

returns the current charging strategy

func (*UCCEVC) EnergyDemand

func (e *UCCEVC) EnergyDemand(entity spineapi.EntityRemoteInterface) (api.Demand, error)

returns the current energy demand in Wh and the duration

func (*UCCEVC) HandleEvent

func (e *UCCEVC) HandleEvent(payload spineapi.EventPayload)

handle SPINE events

func (*UCCEVC) IncentiveConstraints

func (e *UCCEVC) IncentiveConstraints(entity spineapi.EntityRemoteInterface) (api.IncentiveSlotConstraints, error)

returns the minimum and maximum number of incentive slots allowed

func (*UCCEVC) IsUseCaseSupported

func (e *UCCEVC) IsUseCaseSupported(entity spineapi.EntityRemoteInterface) (bool, error)

returns if the entity supports the usecase

possible errors:

  • ErrDataNotAvailable if that information is not (yet) available
  • and others

func (*UCCEVC) TimeSlotConstraints

func (e *UCCEVC) TimeSlotConstraints(entity spineapi.EntityRemoteInterface) (api.TimeSlotConstraints, error)

returns the constraints for the time slots

func (*UCCEVC) UpdateUseCaseAvailability

func (e *UCCEVC) UpdateUseCaseAvailability(available bool)

func (*UCCEVC) UseCaseName

func (c *UCCEVC) UseCaseName() model.UseCaseNameType

func (*UCCEVC) WriteIncentiveTableDescriptions

func (e *UCCEVC) WriteIncentiveTableDescriptions(entity spineapi.EntityRemoteInterface, data []api.IncentiveTariffDescription) error

inform the EVSE about used currency and boundary units

SPINE UC CoordinatedEVCharging 2.4.3

func (*UCCEVC) WriteIncentives

func (e *UCCEVC) WriteIncentives(entity spineapi.EntityRemoteInterface, data []api.DurationSlotValue) error

send incentives to the EV if no data is provided, default incentives with the same price for 7 days will be sent

func (*UCCEVC) WritePowerLimits

func (e *UCCEVC) WritePowerLimits(entity spineapi.EntityRemoteInterface, data []api.DurationSlotValue) error

send power limits to the EV if no data is provided, default power limits with the max possible value for 7 days will be sent

type UCCEVCInterface

type UCCEVCInterface interface {
	api.UseCaseInterface

	// returns the current charging stratey
	//
	// parameters:
	//   - entity: the entity of the EV
	//
	// returns EVChargeStrategyTypeUnknown if it could not be determined, e.g.
	// if the vehicle communication is via IEC61851 or the EV doesn't provide
	// any information about its charging mode or plan
	ChargeStrategy(remoteEntity spineapi.EntityRemoteInterface) api.EVChargeStrategyType

	// returns the current energy demand
	//
	// parameters:
	//   - entity: the entity of the EV
	//
	// return values:
	//   - EVDemand: details about the actual demands from the EV
	//   - error: if no data is available
	//
	// if duration is 0, direct charging is active, otherwise timed charging is active
	EnergyDemand(remoteEntity spineapi.EntityRemoteInterface) (api.Demand, error)

	TimeSlotConstraints(entity spineapi.EntityRemoteInterface) (api.TimeSlotConstraints, error)

	// send power limits to the EV
	//
	// parameters:
	//   - entity: the entity of the EV
	//   - data: the power limits
	//
	// if no data is provided, default power limits with the max possible value for 7 days will be sent
	WritePowerLimits(entity spineapi.EntityRemoteInterface, data []api.DurationSlotValue) error

	// return the current incentive constraints
	//
	// parameters:
	//   - entity: the entity of the EV
	IncentiveConstraints(entity spineapi.EntityRemoteInterface) (api.IncentiveSlotConstraints, error)

	// send new incentives to the EV
	//
	// parameters:
	//   - entity: the entity of the EV
	//   - data: the incentive descriptions
	WriteIncentiveTableDescriptions(entity spineapi.EntityRemoteInterface, data []api.IncentiveTariffDescription) error

	// send incentives to the EV
	//
	// parameters:
	//   - entity: the entity of the EV
	//   - data: the incentives
	//
	// if no data is provided, default incentives with the same price for 7 days will be sent
	WriteIncentives(entity spineapi.EntityRemoteInterface, data []api.DurationSlotValue) error

	// return the current charge plan constraints
	//
	// parameters:
	//   - entity: the entity of the EV
	ChargePlanConstraints(entity spineapi.EntityRemoteInterface) ([]api.DurationSlotValue, error)

	// return the current charge plan of the EV
	//
	// parameters:
	//   - entity: the entity of the EV
	ChargePlan(entity spineapi.EntityRemoteInterface) (api.ChargePlan, error)
}

interface for the Coordinated EV Charging UseCase

Jump to

Keyboard shortcuts

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