Load Management and Peak Shaving (#13207)
This commit is contained in:
parent
652cab3192
commit
26973a0d2c
24 changed files with 1339 additions and 49 deletions
31
api/api.go
31
api/api.go
|
|
@ -7,7 +7,7 @@ import (
|
|||
"time"
|
||||
)
|
||||
|
||||
//go:generate mockgen -package api -destination mock.go github.com/evcc-io/evcc/api Charger,ChargeState,CurrentLimiter,PhaseSwitcher,Identifier,Meter,MeterEnergy,Vehicle,ChargeRater,Battery,Tariff,BatteryController
|
||||
//go:generate mockgen -package api -destination mock.go github.com/evcc-io/evcc/api Charger,ChargeState,CurrentLimiter,PhaseSwitcher,Identifier,Meter,MeterEnergy,PhaseCurrents,Vehicle,ChargeRater,Battery,Tariff,BatteryController,Circuit
|
||||
|
||||
// Meter provides total active power in W
|
||||
type Meter interface {
|
||||
|
|
@ -202,3 +202,32 @@ type FeatureDescriber interface {
|
|||
type CsvWriter interface {
|
||||
WriteCsv(context.Context, io.Writer) error
|
||||
}
|
||||
|
||||
// CircuitMeasurements is the measurements a circuit or load must deliver
|
||||
type CircuitMeasurements interface {
|
||||
GetChargePower() float64
|
||||
GetMaxPhaseCurrent() float64
|
||||
}
|
||||
|
||||
// CircuitLoad represents a loadpoint attached to a circuit
|
||||
type CircuitLoad interface {
|
||||
CircuitMeasurements
|
||||
GetCircuit() Circuit
|
||||
}
|
||||
|
||||
// Circuit defines the load control domain
|
||||
type Circuit interface {
|
||||
CircuitMeasurements
|
||||
GetTitle() string
|
||||
SetTitle(string)
|
||||
GetParent() Circuit
|
||||
RegisterChild(child Circuit)
|
||||
HasMeter() bool
|
||||
GetMaxPower() float64
|
||||
GetMaxCurrent() float64
|
||||
SetMaxPower(float64)
|
||||
SetMaxCurrent(float64)
|
||||
Update([]CircuitLoad) error
|
||||
ValidateCurrent(old, new float64) float64
|
||||
ValidatePower(old, new float64) float64
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue