evend

package
v0.210504.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: CC0-1.0 Imports: 14 Imported by: 0

Documentation

Overview

Package evend incapsulates common parts of MDB protocol for eVend machine devices like conveyor, hopper, cup dispenser, elevator, etc.

Index

Constants

View Source
const (
	DefaultReadyTimeout = 5 * time.Second
	DefaultResetDelay   = 2100 * time.Millisecond
)
View Source
const ConveyorDefaultTimeout = 30 * time.Second
View Source
const ConveyorMinTimeout = 1 * time.Second
View Source
const DefaultCupAssertBusyDelay = 30 * time.Millisecond
View Source
const DefaultCupDispenseTimeout = 10 * time.Second
View Source
const DefaultCupEnsureTimeout = 70 * time.Second
View Source
const DefaultEspressoTimeout = 30 * time.Second
View Source
const DefaultHopperRunTimeout = 200 * time.Millisecond
View Source
const DefaultShakeSpeed uint8 = 100
View Source
const HopperTimeout = 1 * time.Second

Variables

This section is empty.

Functions

func Enum

func Enum(ctx context.Context) error

Register devices

Types

type DeviceConveyor

type DeviceConveyor struct {
	Generic

	DoSetSpeed engine.FuncArg
	// contains filtered or unexported fields
}

type DeviceCup

type DeviceCup struct {
	Generic
}

func (*DeviceCup) NewDispense

func (self *DeviceCup) NewDispense() engine.Doer

func (*DeviceCup) NewDispenseProper

func (self *DeviceCup) NewDispenseProper() engine.Doer

func (*DeviceCup) NewEnsure

func (self *DeviceCup) NewEnsure() engine.Doer

func (*DeviceCup) NewLight

func (self *DeviceCup) NewLight(on bool) engine.Doer

type DeviceElevator

type DeviceElevator struct {
	Generic
	// contains filtered or unexported fields
}

type DeviceErrorCode

type DeviceErrorCode byte

func (DeviceErrorCode) Error

func (c DeviceErrorCode) Error() string

type DeviceEspresso

type DeviceEspresso struct {
	Generic
	// contains filtered or unexported fields
}

func (*DeviceEspresso) NewGrind

func (self *DeviceEspresso) NewGrind() engine.Doer

func (*DeviceEspresso) NewHeat

func (self *DeviceEspresso) NewHeat(on bool) engine.Doer

func (*DeviceEspresso) NewPress

func (self *DeviceEspresso) NewPress() engine.Doer

func (*DeviceEspresso) NewRelease

func (self *DeviceEspresso) NewRelease() engine.Doer

type DeviceHopper

type DeviceHopper struct {
	Generic
}

type DeviceMixer

type DeviceMixer struct {
	Generic
	// contains filtered or unexported fields
}

func (*DeviceMixer) NewFan

func (self *DeviceMixer) NewFan(on bool) engine.Doer

type DeviceMultiHopper

type DeviceMultiHopper struct {
	Generic
}

type DeviceValve

type DeviceValve struct {
	Generic

	DoSetTempHot   engine.FuncArg
	DoPourCold     engine.Doer
	DoPourHot      engine.Doer
	DoPourEspresso engine.Doer
	// contains filtered or unexported fields
}

func (*DeviceValve) NewPump

func (self *DeviceValve) NewPump(start bool) engine.Doer

func (*DeviceValve) NewPumpEspresso

func (self *DeviceValve) NewPumpEspresso(start bool) engine.Doer

func (*DeviceValve) NewValveBoiler

func (self *DeviceValve) NewValveBoiler(open bool) engine.Doer

func (*DeviceValve) NewValveCold

func (self *DeviceValve) NewValveCold(open bool) engine.Doer

func (*DeviceValve) NewValveHot

func (self *DeviceValve) NewValveHot(open bool) engine.Doer

type ErrWaterTemperature

type ErrWaterTemperature struct {
	Source  string
	Current int16
	Target  int16
}

func (*ErrWaterTemperature) Error

func (e *ErrWaterTemperature) Error() string

type Generic

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

func (*Generic) Diagnostic

func (self *Generic) Diagnostic() (byte, error)

func (*Generic) FIXME_initIO

func (self *Generic) FIXME_initIO(ctx context.Context) error

FIXME Enum, remove IO from Init

func (*Generic) Init

func (self *Generic) Init(ctx context.Context, address uint8, name string, proto evendProtocol)

func (*Generic) Name added in v0.200320.0

func (self *Generic) Name() string

func (*Generic) NewAction

func (self *Generic) NewAction(tag string, args ...byte) engine.Doer

func (*Generic) NewErrPollProblem

func (self *Generic) NewErrPollProblem(p mdb.Packet) error

func (*Generic) NewErrPollUnexpected

func (self *Generic) NewErrPollUnexpected(p mdb.Packet) error

func (*Generic) NewWaitDone

func (self *Generic) NewWaitDone(tag string, timeout time.Duration) engine.Doer

proto1/2 agnostic, use it after action

func (*Generic) NewWaitReady

func (self *Generic) NewWaitReady(tag string) engine.Doer

proto1/2 agnostic, use it before action

func (*Generic) WithRestart

func (self *Generic) WithRestart(d engine.Doer) *engine.RestartError

Directories

Path Synopsis
Separate package to for hardware/evend related config structure.
Separate package to for hardware/evend related config structure.

Jump to

Keyboard shortcuts

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