Documentation ¶
Index ¶
- Constants
- Variables
- type Command
- type CommandStatus
- type RemoteController
- func (c *RemoteController) Dispatch(now timing.TimeUnit, command Command, id uint8, value uint16) CommandStatus
- func (c *RemoteController) ProcessBytes(now timing.TimeUnit, data []byte)
- func (c *RemoteController) SetNextActionIn(waterSection uint8, now timing.TimeUnit, nDelta uint16) CommandStatus
- func (c *RemoteController) SetOffMinutes(waterSection uint8, n uint16) CommandStatus
- func (c *RemoteController) SetOnSeconds(waterSection uint8, n uint16) CommandStatus
- func (c *RemoteController) TurnOff(now timing.TimeUnit) CommandStatus
- func (c *RemoteController) TurnOn(waterSection uint8, now timing.TimeUnit) CommandStatus
- type WaterSystem
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 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 (c *RemoteController) TurnOff(now timing.TimeUnit) CommandStatus
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.
Click to show internal directories.
Click to hide internal directories.