handlers

package
v1.0.31 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package handlers includes functions that respond to changes reported by the inverter and can update the inverter's settings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CtCoilHandler

func CtCoilHandler(ctx context.Context, wg *sync.WaitGroup, ch chan api.State)

CtCoilHandler enables or disables power flowing from the inverter to non-essential circuits depending on the battery's SoC and the input power.

func DisplayHandler

func DisplayHandler(ctx context.Context, ch chan api.State)

DisplayHandler displays the state of the inverter whenever it changes.

func Fanout

func Fanout(chans ...chan api.State) chan api.State

Fanout creates channel that receives messages and relays them to handler channels.

func ManageInverter

func ManageInverter(logfile string, delay time.Duration, runTime time.Duration, configFile string, minSoc int, ct bool) error

ManageInverter spawns handlers to respond to changes in the inverter's state.

func SocHandler

func SocHandler(ctx context.Context, wg *sync.WaitGroup, minSoc int, ch chan api.State)

SocHandler watches the battery's SoC and determines how to adjust the depth of discharge of the battery.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL