device

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Actuator

type Actuator interface {
	On() error
	Off() error
}

Actuator represents a device that can be switched on and off.

type Hydrometer

type Hydrometer interface {
	Sensor
	GetGravity() (float64, error)
}

Hydrometer represents a device that can read specific gravity.

type Sensor

type Sensor interface {
	GetID() string
}

type TemperatureController

type TemperatureController interface {
	Run(ctx context.Context, setPoint float64) error
}

type Thermometer

type Thermometer interface {
	Sensor
	GetTemperature() (float64, error)
}

Thermometer represents a device that can read temperatures.

type ThermometerAndHydrometer

type ThermometerAndHydrometer interface {
	Sensor
	Thermometer
	Hydrometer
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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