ucevcc

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: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// An EV was connected
	//
	// Use Case EVCC, Scenario 1
	EvConnected api.EventType = "EvConnected"

	// An EV was disconnected
	//
	// Note: The ev entity is no longer connected to the device!
	//
	// Use Case EVCC, Scenario 8
	EvDisconnected api.EventType = "EvDisconnected"

	// EV charge state data was updated
	//
	// Use `ChargeState` to get the current data
	DataUpdateChargeState api.EventType = "DataUpdateChargeState"

	// EV communication standard data was updated
	//
	// Use `CommunicationStandard` to get the current data
	//
	// Use Case EVCC, Scenario 2
	DataUpdateCommunicationStandard api.EventType = "DataUpdateCommunicationStandard"

	// EV asymmetric charging data was updated
	//
	// Use `AsymmetricChargingSupport` to get the current data
	DataUpdateAsymmetricChargingSupport api.EventType = "DataUpdateAsymmetricChargingSupport"

	// EV identificationdata was updated
	//
	// Use `Identifications` to get the current data
	//
	// Use Case EVCC, Scenario 4
	DataUpdateIdentifications api.EventType = "DataUpdateIdentifications"

	// EV manufacturer data was updated
	//
	// Use `ManufacturerData` to get the current data
	//
	// Use Case EVCC, Scenario 5
	DataUpdateManufacturerData api.EventType = "DataUpdateManufacturerData"

	// EV charging power limits
	//
	// Use `ChargingPowerLimits` to get the current data
	//
	// Use Case EVCC, Scenario 6
	DataUpdateCurrentLimits api.EventType = "DataUpdateCurrentLimits"

	// EV permitted power limits updated
	//
	// Use `IsInSleepMode` to get the current data
	//
	// Use Case EVCC, Scenario 7
	DataUpdateIsInSleepMode api.EventType = "DataUpdateIsInSleepMode"
)
View Source
const (
	UCEVCCCommunicationStandardUnknown model.DeviceConfigurationKeyValueStringType = "unknown"
)

value if the UCEVCC communication standard is unknown

Variables

This section is empty.

Functions

This section is empty.

Types

type UCEVCC

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

func NewUCEVCC

func NewUCEVCC(service serviceapi.ServiceInterface, eventCB api.EntityEventCallback) *UCEVCC

func (*UCEVCC) AddFeatures

func (e *UCEVCC) AddFeatures()

func (*UCEVCC) AddUseCase

func (e *UCEVCC) AddUseCase()

func (*UCEVCC) AsymmetricChargingSupport

func (e *UCEVCC) AsymmetricChargingSupport(entity spineapi.EntityRemoteInterface) (bool, error)

return if the EV supports asymmetric charging

possible errors:

  • ErrDataNotAvailable if that information is not (yet) available

func (*UCEVCC) ChargeState

func (e *UCEVCC) ChargeState(entity spineapi.EntityRemoteInterface) (api.EVChargeStateType, error)

return the current charge state of the EV

func (*UCEVCC) ChargingPowerLimits

func (e *UCEVCC) ChargingPowerLimits(entity spineapi.EntityRemoteInterface) (float64, float64, float64, error)

return the minimum, maximum charging and, standby power of the connected EV

possible errors:

  • ErrDataNotAvailable if no such measurement is (yet) available
  • and others

func (*UCEVCC) CommunicationStandard

return the current communication standard type used to communicate between EVSE and EV

if an EV is connected via IEC61851, no ISO15118 specific data can be provided! sometimes the connection starts with IEC61851 before it switches to ISO15118, and sometimes it falls back again. so the error return is never absolut for the whole connection time, except if the use case is not supported

the values are not constant and can change due to communication problems, bugs, and sometimes communication starts with IEC61851 before it switches to ISO

possible errors:

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

func (*UCEVCC) EVConnected

func (e *UCEVCC) EVConnected(entity spineapi.EntityRemoteInterface) bool

return if an EV is connected

this includes all required features and minimal data being available

func (*UCEVCC) HandleEvent

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

handle SPINE events

func (*UCEVCC) HandleResponse

func (e *UCEVCC) HandleResponse(responseMsg api.ResponseMessage)

func (*UCEVCC) Identifications

func (e *UCEVCC) Identifications(entity spineapi.EntityRemoteInterface) ([]api.IdentificationItem, error)

return the identifications of the currently connected EV or nil if not available

possible errors:

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

func (*UCEVCC) IsInSleepMode

func (e *UCEVCC) IsInSleepMode(
	entity spineapi.EntityRemoteInterface,
) (bool, error)

is the EV in sleep mode returns operatingState, lastErrorCode, error

func (*UCEVCC) IsUseCaseSupported

func (e *UCEVCC) 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 (*UCEVCC) ManufacturerData

func (e *UCEVCC) ManufacturerData(
	entity spineapi.EntityRemoteInterface,
) (
	api.ManufacturerData,
	error,
)

the manufacturer data of an EVSE returns deviceName, serialNumber, error

func (*UCEVCC) UpdateUseCaseAvailability

func (e *UCEVCC) UpdateUseCaseAvailability(available bool)

func (*UCEVCC) UseCaseName

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

type UCEVCCInterface

type UCEVCCInterface interface {
	api.UseCaseInterface

	// return the current charge state of the EV
	//
	// parameters:
	//   - entity: the entity of the EV
	ChargeState(entity spineapi.EntityRemoteInterface) (api.EVChargeStateType, error)

	// return if the EV is connected
	//
	// parameters:
	//   - entity: the entity of the EV
	EVConnected(entity spineapi.EntityRemoteInterface) bool

	// return the current communication standard type used to communicate between EVSE and EV
	//
	// parameters:
	//   - entity: the entity of the EV
	CommunicationStandard(entity spineapi.EntityRemoteInterface) (model.DeviceConfigurationKeyValueStringType, error)

	// return if the EV supports asymmetric charging
	//
	// parameters:
	//   - entity: the entity of the EV
	AsymmetricChargingSupport(entity spineapi.EntityRemoteInterface) (bool, error)

	// return the identifications of the currently connected EV or nil if not available
	// these can be multiple, e.g. PCID, Mac Address, RFID
	//
	// parameters:
	//   - entity: the entity of the EV
	Identifications(entity spineapi.EntityRemoteInterface) ([]api.IdentificationItem, error)

	// the manufacturer data of an EVSE
	// returns deviceName, serialNumber, error
	//
	// parameters:
	//   - entity: the entity of the EV
	ManufacturerData(entity spineapi.EntityRemoteInterface) (api.ManufacturerData, error)

	// return the minimum, maximum charging and, standby power of the connected EV
	//
	// parameters:
	//   - entity: the entity of the EV
	ChargingPowerLimits(entity spineapi.EntityRemoteInterface) (float64, float64, float64, error)

	// is the EV in sleep mode
	//
	// parameters:
	//   - entity: the entity of the EV
	IsInSleepMode(entity spineapi.EntityRemoteInterface) (bool, error)
}

interface for the EV Commissioning and Configuration UseCase

Jump to

Keyboard shortcuts

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