remote

package
v0.0.0-...-86701fc Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusOK      CommandStatus = 0
	StatusErr     CommandStatus = 1
	StatusNYI     CommandStatus = 2
	StatusUnknown CommandStatus = 255

	Unused     Command = 1
	CmdTurnOn  Command = 2
	CmdTurnOff Command = 3
	CmdSetOn   Command = 4 // Seconds
	CmdSetOff  Command = 5 // Minutes
	CmdSetNext Command = 6
)

Variables

View Source
var CmdPrefix = []byte{'C', 'M', 'D'}

Functions

This section is empty.

Types

type Command

type Command uint8

type CommandStatus

type CommandStatus uint8

type RemoteController

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

func NewRemoteController

func NewRemoteController(wsm *schedule.WaterSectionManager) *RemoteController

func (*RemoteController) Dispatch

func (c *RemoteController) Dispatch(now timing.TimeUnit, command Command, id uint8, value uint16) CommandStatus

func (*RemoteController) ProcessBytes

func (c *RemoteController) ProcessBytes(now timing.TimeUnit, data []byte)

func (*RemoteController) SetNextActionIn

func (c *RemoteController) SetNextActionIn(waterSection uint8, now timing.TimeUnit, nDelta uint16) CommandStatus

func (*RemoteController) SetOffMinutes

func (c *RemoteController) SetOffMinutes(waterSection uint8, n uint16) CommandStatus

func (*RemoteController) SetOnSeconds

func (c *RemoteController) SetOnSeconds(waterSection uint8, n uint16) CommandStatus

func (*RemoteController) TurnOff

func (*RemoteController) TurnOn

func (c *RemoteController) TurnOn(waterSection uint8, now timing.TimeUnit) CommandStatus

type WaterSystem

type WaterSystem interface {
	UpdateOnSeconds(schedule.WaterSectionID, timing.TimeUnit) bool
	UpdateOffSeconds(schedule.WaterSectionID, timing.TimeUnit) bool
	UpdateNextActionAt(schedule.WaterSectionID, timing.TimeUnit) bool
	ForceOn(schedule.WaterSectionID, timing.TimeUnit) bool
	AllOff(now timing.TimeUnit) bool
}

WaterSystem is sadly unusable because of tinygo type constraints on the AVR.

Jump to

Keyboard shortcuts

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