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

Method SetLimitSoc

core/loadpoint_api.go:305–316  ·  view source on GitHub ↗

SetLimitSoc sets the session soc limit

(soc int)

Source from the content-addressed store, hash-verified

303
304// SetLimitSoc sets the session soc limit
305func (lp *Loadpoint) SetLimitSoc(soc int) {
306 lp.Lock()
307 defer lp.Unlock()
308
309 lp.log.DEBUG.Println("set session soc limit:", soc)
310
311 // apply immediately
312 if lp.limitSoc != soc {
313 lp.setLimitSoc(soc)
314 lp.requestUpdate()
315 }
316}
317
318// GetLimitEnergy returns the session limit energy
319func (lp *Loadpoint) GetLimitEnergy() float64 {

Callers 1

Calls 5

LockMethod · 0.95
UnlockMethod · 0.95
setLimitSocMethod · 0.95
requestUpdateMethod · 0.95
PrintlnMethod · 0.80

Tested by

no test coverage detected