MCPcopy Create free account
hub / github.com/evcc-io/evcc / SetPlanStrategy

Method SetPlanStrategy

core/loadpoint_api.go:424–431  ·  view source on GitHub ↗

SetPlanStrategy sets the plan strategy

(strategy api.PlanStrategy)

Source from the content-addressed store, hash-verified

422
423// SetPlanStrategy sets the plan strategy
424func (lp *Loadpoint) SetPlanStrategy(strategy api.PlanStrategy) error {
425 lp.Lock()
426 defer lp.Unlock()
427
428 lp.log.DEBUG.Printf("set plan strategy: continuous=%v, precondition=%v", strategy.Continuous, strategy.Precondition)
429
430 return lp.setPlanStrategy(strategy)
431}
432
433// getPlanStrategy returns the plan strategy (no mutex)
434func (lp *Loadpoint) getPlanStrategy() api.PlanStrategy {

Callers

nothing calls this directly

Calls 4

LockMethod · 0.95
UnlockMethod · 0.95
setPlanStrategyMethod · 0.95
PrintfMethod · 0.80

Tested by

no test coverage detected