Curtailment: report curtailed percent instead of bool (#32010)
This commit is contained in:
parent
435ed72a56
commit
608aa36629
19 changed files with 178 additions and 56 deletions
|
|
@ -208,8 +208,8 @@ type Dimmer interface {
|
|||
|
||||
// Curtailer provides EEG §9 curtailment
|
||||
type Curtailer interface {
|
||||
Curtailed() (bool, error) // curtailed if feed-in is limited to less than nominal (<100%)
|
||||
SetCurtailPercent(int) error // limit feed-in to the given percent of nominal (0..100, 100 = uncurtailed)
|
||||
CurtailedPercent() (int, error) // feed-in limit as percent of nominal (0..100, 100 = uncurtailed)
|
||||
SetCurtailPercent(int) error // limit feed-in to the given percent of nominal (0..100, 100 = uncurtailed)
|
||||
}
|
||||
|
||||
// ChargeController allows to start/stop the charging session on the vehicle side
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ func (i *iCurrentGetter) GetMaxCurrent() (float64, error) {
|
|||
return i.currentGetter0()
|
||||
}
|
||||
|
||||
func Curtailer(curtailer0 func() (bool, error), curtailer1 func(int) error) api.Curtailer {
|
||||
func Curtailer(curtailer0 func() (int, error), curtailer1 func(int) error) api.Curtailer {
|
||||
if curtailer0 == nil || curtailer1 == nil {
|
||||
return nil
|
||||
}
|
||||
|
|
@ -181,11 +181,11 @@ func Curtailer(curtailer0 func() (bool, error), curtailer1 func(int) error) api.
|
|||
}
|
||||
|
||||
type iCurtailer struct {
|
||||
curtailer0 func() (bool, error)
|
||||
curtailer0 func() (int, error)
|
||||
curtailer1 func(int) error
|
||||
}
|
||||
|
||||
func (i *iCurtailer) Curtailed() (bool, error) {
|
||||
func (i *iCurtailer) CurtailedPercent() (int, error) {
|
||||
return i.curtailer0()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue