parameterlimit

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

func NewStore

func NewStore(
	alarmsSendDuration time.Duration,
	getParameterValue func(name string, unit parameterunit.ParameterUnit) float64,
) *Store

NewStore creates a new parameter limit store

func (*Store) Add

func (pls *Store) Add(name string, unit parameterunit.ParameterUnit, minLimit, maxLimit float64, logFormat string)

Add adds a new parameter with given attributes to the store

func (*Store) AlarmPending

func (pls *Store) AlarmPending() bool

AlarmPending returns whether an alarm currently exists

func (*Store) FormatLog

func (pls *Store) FormatLog() (headline string, value string)

FormatLog format all entries of limit store to a list with a headline with separator semicolon, so it can be used to write a file in csv format.

func (*Store) Send

func (pls *Store) Send(sendAlarm func(string, string) error) error

Send formats all alarms and alarm status and send with the given function

Jump to

Keyboard shortcuts

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