api

package
v0.0.0-...-a8dc8ba Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoolProvider

type BoolProvider func(context.Context) (bool, error)

type BoolSetter

type BoolSetter func(context.Context, bool) error

type ChargeController

type ChargeController interface {
	MaxCurrent(current int64) error
}

ChargeController provides controlling of the charger's max allowed power

type ChargeMode

type ChargeMode string

ChargeMode are charge modes modeled after OpenWB

const (
	ModeOff   ChargeMode = "off"
	ModeNow   ChargeMode = "now"
	ModeMinPV ChargeMode = "minpv"
	ModePV    ChargeMode = "pv"
)

type ChargeStatus

type ChargeStatus string

ChargeStatus is the EVSE models charging status from A to F

const (
	StatusNone ChargeStatus = ""
	StatusA    ChargeStatus = "A" // Fzg. angeschlossen: nein    Laden möglich: nein
	StatusB    ChargeStatus = "B" // Fzg. angeschlossen:   ja    Laden möglich: nein
	StatusC    ChargeStatus = "C" // Fzg. angeschlossen:   ja    Laden möglich:   ja
	StatusD    ChargeStatus = "D" // Fzg. angeschlossen:   ja    Laden möglich:   ja
	StatusE    ChargeStatus = "E" // Fzg. angeschlossen:   ja    Laden möglich: nein
	StatusF    ChargeStatus = "F" // Fzg. angeschlossen:   ja    Laden möglich: nein
)

type Charger

type Charger interface {
	Status() (ChargeStatus, error)
	Enabled() (bool, error)
	Enable(enable bool) error
	ActualCurrent() (int64, error)
}

Charger is able to provide current charging status and to enable/disabler charging

type FloatProvider

type FloatProvider func(context.Context) (float64, error)

type FloatSetter

type FloatSetter func(context.Context, float64) error

type IntProvider

type IntProvider func(context.Context) (int64, error)

type IntSetter

type IntSetter func(context.Context, int64) error

type LoadPoint

type LoadPoint interface {
	Update()
	CurrentChargeMode() ChargeMode
	ChargeMode(mode ChargeMode) error
}

LoadPoint ties charger and meter together and contains the controller logic

type Logger

type Logger interface {
	Println(v ...interface{})
	Printf(format string, v ...interface{})
}

type Meter

type Meter interface {
	CurrentPower() (float64, error)
}

Meter is able to provide current power at metering point

type StringProvider

type StringProvider func(context.Context) (string, error)

type StringSetter

type StringSetter func(context.Context, string) error

Directories

Path Synopsis
Package mock_api is a generated GoMock package.
Package mock_api is a generated GoMock package.

Jump to

Keyboard shortcuts

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