Documentation ¶
Overview ¶
Package evend incapsulates common parts of MDB protocol for eVend machine devices like conveyor, hopper, cup dispenser, elevator, etc.
Index ¶
- Constants
- func Enum(ctx context.Context) error
- type DeviceConveyor
- type DeviceCup
- type DeviceElevator
- type DeviceErrorCode
- type DeviceEspresso
- type DeviceHopper
- type DeviceMixer
- type DeviceMultiHopper
- type DeviceValve
- func (self *DeviceValve) NewPump(start bool) engine.Doer
- func (self *DeviceValve) NewPumpEspresso(start bool) engine.Doer
- func (self *DeviceValve) NewValveBoiler(open bool) engine.Doer
- func (self *DeviceValve) NewValveCold(open bool) engine.Doer
- func (self *DeviceValve) NewValveHot(open bool) engine.Doer
- type ErrWaterTemperature
- type Generic
- func (gen *Generic) Diagnostic() (byte, error)
- func (gen *Generic) FIXME_initIO(ctx context.Context) error
- func (gen *Generic) Init(ctx context.Context, address uint8, name string, proto evendProtocol)
- func (gen *Generic) Name() string
- func (gen *Generic) NewAction(tag string, args ...byte) engine.Doer
- func (gen *Generic) NewErrPollProblem(p mdb.Packet) error
- func (gen *Generic) NewErrPollUnexpected(p mdb.Packet) error
- func (gen *Generic) NewWaitDone(tag string, timeout time.Duration) engine.Doer
- func (gen *Generic) NewWaitReady(tag string) engine.Doer
- func (gen *Generic) WithRestart(d engine.Doer) *engine.RestartError
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 ¶
Types ¶
type DeviceConveyor ¶
type DeviceCup ¶
type DeviceCup struct { Generic // contains filtered or unexported fields }
func (*DeviceCup) NewDispense ¶
func (*DeviceCup) NewDispenseProper ¶
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 (devEspr *DeviceEspresso) NewGrind() engine.Doer
func (*DeviceEspresso) NewPress ¶
func (devEspr *DeviceEspresso) NewPress() engine.Doer
func (*DeviceEspresso) NewRelease ¶
func (devEspr *DeviceEspresso) NewRelease() engine.Doer
type DeviceHopper ¶
type DeviceHopper struct {
Generic
}
type DeviceMixer ¶
type DeviceMixer struct { Generic // contains filtered or unexported fields }
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) 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 ¶
func (*ErrWaterTemperature) Error ¶
func (e *ErrWaterTemperature) Error() string
type Generic ¶
type Generic struct {
// contains filtered or unexported fields
}
func (*Generic) Diagnostic ¶
func (*Generic) FIXME_initIO ¶
FIXME_initIO Enum, remove IO from Init
func (*Generic) NewWaitDone ¶
NewWaitDone proto1/2 agnostic, use it after action
func (*Generic) NewWaitReady ¶
NewWaitReady proto1/2 agnostic, use it before action
func (*Generic) WithRestart ¶
func (gen *Generic) WithRestart(d engine.Doer) *engine.RestartError
Source Files ¶
Click to show internal directories.
Click to hide internal directories.