Allow to define supported phases at vehicle level (#2209)

This commit is contained in:
andig 2022-01-16 09:31:52 +01:00 • committed by GitHub
parent 4a78afe9f3
commit cd42f20a51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 125 additions and 5 deletions

View file

@ -9,7 +9,7 @@ import (
"github.com/fatih/structs"
)
//go:generate mockgen -package mock -destination ../mock/mock_api.go github.com/evcc-io/evcc/api Charger,ChargeState,ChargePhases,Identifier,Meter,MeterEnergy,Vehicle,ChargeRater,Battery
//go:generate mockgen -package mock -destination ../mock/mock_api.go github.com/evcc-io/evcc/api Charger,ChargeState,ChargePhases,Identifier,Meter,MeterEnergy,Vehicle,VehiclePhases,ChargeRater,Battery
// ChargeMode are charge modes modeled after OpenWB
type ChargeMode string
@ -170,6 +170,11 @@ type VehiclePosition interface {
Position() (float64, float64, error)
}
// VehiclePhases returns the number of supported phases
type VehiclePhases interface {
Phases() int
}
// VehicleStartCharge starts the charging session on the vehicle side
type VehicleStartCharge interface {
StartCharge() error