simulation

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	CommandLine string
}

func NewCommand

func NewCommand(commandLine, outputRegexp string) (*Command, error)

func (*Command) Run

func (c *Command) Run(stdin io.Reader, expand func(string) string) (string, error)

type DiskStatus

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

func NewDiskStatus

func NewDiskStatus(name string, config cfg.DiskPowerStatus) (*DiskStatus, error)

func (*DiskStatus) Get

func (s *DiskStatus) Get(expandEnv func(string) string) enum.DiskStatus

func (*DiskStatus) Standby

func (s *DiskStatus) Standby(expandEnv func(string) string) error

type Sensor

type Sensor struct {
	Name string
	// contains filtered or unexported fields
}

Sensor simulates a hardware sensor

func NewSensor

func NewSensor(name string, config cfg.Task) (*Sensor, error)

NewSensor creates a new simulated sensor

func (*Sensor) Get

func (s *Sensor) Get(expandEnv func(string) string) (int, error)

Get an integer value from the simulated sensor

func (*Sensor) GetRaw

func (s *Sensor) GetRaw(expandEnv func(string) string) (string, error)

GetRaw value from the simulated sensor

Jump to

Keyboard shortcuts

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