evsoc

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2024 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// Update of the list of remote entities supporting the Use Case
	//
	// Use `RemoteEntities` to get the current data
	UseCaseSupportUpdate api.EventType = "cem-evsoc-UseCaseSupportUpdate"

	// EV state of charge data was updated
	//
	// Use `StateOfCharge` to get the current data
	//
	// Use Case EVSOC, Scenario 1
	DataUpdateStateOfCharge api.EventType = "cem-evsoc-DataUpdateStateOfCharge"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EVSOC

type EVSOC struct {
	*usecase.UseCaseBase
}

func NewEVSOC

func NewEVSOC(localEntity spineapi.EntityLocalInterface, eventCB api.EntityEventCallback) *EVSOC

func (*EVSOC) AddFeatures

func (e *EVSOC) AddFeatures()

func (*EVSOC) HandleEvent

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

handle SPINE events

func (*EVSOC) StateOfCharge

func (e *EVSOC) 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 (*EVSOC) UpdateUseCaseAvailability

func (e *EVSOC) UpdateUseCaseAvailability(available bool)

Jump to

Keyboard shortcuts

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