evok

package
v0.0.0-...-0e7f851 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Actuators

type Actuators struct {
	Pump   Device `yaml:"pump"`
	Switch Device `yaml:"switch"`
	Flow   Device `yaml:"flow"`
}

type Client

type Client struct {
	Sensors   Sensors
	Actuators Actuators
	// contains filtered or unexported fields
}

func NewClient

func NewClient(address string, sensors Sensors, actuators Actuators) *Client

func (*Client) ExposeSensorsOnHTTP

func (c *Client) ExposeSensorsOnHTTP(w http.ResponseWriter, r *http.Request)

func (*Client) GetActuators

func (c *Client) GetActuators() *Actuators

func (*Client) GetSensors

func (c *Client) GetSensors() *Sensors

func (*Client) HandleWebsocketConnection

func (c *Client) HandleWebsocketConnection()

func (*Client) InitializeSensorsValues

func (c *Client) InitializeSensorsValues() error

func (*Client) SetValue

func (c *Client) SetValue(dev, circuit string, value float64) error

type Device

type Device struct {
	Value   float64 `json:"value,omitempty" yaml:"value,omitempty"`
	Circuit string  `json:"circuit" yaml:"circuit"`
	Dev     string  `json:"dev" yaml:"dev"`
}

type Sensors

type Sensors struct {
	SolarUp  Device `yaml:"solarUp"`
	SolarIn  Device `yaml:"solarIn"`
	SolarOut Device `yaml:"solarOut"`
	TankUp   Device `yaml:"tankUp"`
}

Jump to

Keyboard shortcuts

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