ucevsoc

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

Documentation

Index

Constants

View Source
const (
	// EV state of charge data was updated
	//
	// Use `StateOfCharge` to get the current data
	//
	// Use Case EVSOC, Scenario 1
	DataUpdateStateOfCharge api.EventType = "DataUpdateStateOfCharge"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type UCEVSOC

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

func NewUCEVSOC

func NewUCEVSOC(service eebusapi.ServiceInterface, eventCB api.EntityEventCallback) *UCEVSOC

func (*UCEVSOC) AddFeatures

func (e *UCEVSOC) AddFeatures()

func (*UCEVSOC) AddUseCase

func (e *UCEVSOC) AddUseCase()

func (*UCEVSOC) HandleEvent

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

handle SPINE events

func (*UCEVSOC) IsUseCaseSupported

func (e *UCEVSOC) 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 (*UCEVSOC) StateOfCharge

func (e *UCEVSOC) StateOfCharge(entity spineapi.EntityRemoteInterface) (float64, error)

return the last known SoC of the connected EV

only works with a current ISO15118-2 with VAS or ISO15118-20 communication between EVSE and EV

possible errors:

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

func (*UCEVSOC) UpdateUseCaseAvailability

func (e *UCEVSOC) UpdateUseCaseAvailability(available bool)

func (*UCEVSOC) UseCaseName

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

type UCEVSOCInterface

type UCEVSOCInterface interface {
	api.UseCaseInterface

	// return the EVscurrent state of charge of the EV or an error it is unknown
	//
	// parameters:
	//   - entity: the entity of the EV
	StateOfCharge(entity spineapi.EntityRemoteInterface) (float64, error)
}

interface for the EV State Of Charge UseCase

Jump to

Keyboard shortcuts

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