41 lines
1 KiB
Go
41 lines
1 KiB
Go
package vehicle
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/evcc-io/evcc/api"
|
|
)
|
|
|
|
//go:generate go tool mockgen -package vehicle -destination mock.go -mock_names API=MockAPI github.com/evcc-io/evcc/core/vehicle API
|
|
|
|
type API interface {
|
|
// Instance returns the vehicle instance
|
|
Instance() api.Vehicle
|
|
|
|
// Name returns the vehicle name
|
|
Name() string
|
|
|
|
// GetMinSoc returns the min soc
|
|
GetMinSoc() int
|
|
// SetMinSoc sets the min soc
|
|
SetMinSoc(soc int)
|
|
// GetLimitSoc returns the limit soc
|
|
GetLimitSoc() int
|
|
// SetLimitSoc sets the limit soc
|
|
SetLimitSoc(soc int)
|
|
|
|
// GetPlanSoc returns the charge plan soc
|
|
GetPlanSoc() (time.Time, int)
|
|
// SetPlanSoc sets the charge plan time and soc
|
|
SetPlanSoc(time.Time, int) error
|
|
|
|
// GetRepeatingPlans returns every repeating plan
|
|
GetRepeatingPlans() []api.RepeatingPlan
|
|
// SetRepeatingPlans stores every repeating plan
|
|
SetRepeatingPlans([]api.RepeatingPlan) error
|
|
|
|
// GetPlanStrategy returns the plan strategy
|
|
GetPlanStrategy() api.PlanStrategy
|
|
// SetPlanStrategy sets the plan strategy
|
|
SetPlanStrategy(api.PlanStrategy) error
|
|
}
|