Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInterrupted = fmt.Errorf("scheduler interrupted, ignore like EPIPE")
Functions ¶
This section is empty.
Types ¶
type DeviceOfflineError ¶
type DeviceOfflineError struct {
Device Devicer
}
func (DeviceOfflineError) Error ¶
func (oe DeviceOfflineError) Error() string
type Event ¶
type Event struct {
Input InputEvent
Amount currency.Amount
// Order != nil only for EventAccept created by a remote (tele) order.
// RU: заказ передаётся внутри события. глобал VMC.User пишет только горутина UI,
// иначе RefreshUserPresets успевает обнулить SelectedItem до готовки.
Order *menu_config.UIMenuStruct
Kind EventKind
}
type InputEvent ¶
func (*InputEvent) IsDigit ¶
func (e *InputEvent) IsDigit() bool
func (*InputEvent) IsDot ¶
func (e *InputEvent) IsDot() bool
func (*InputEvent) IsTuneKey ¶ added in v0.230424.2
func (e *InputEvent) IsTuneKey() bool
func (*InputEvent) IsZero ¶
func (e *InputEvent) IsZero() bool
type UIer ¶
type UIer interface {
Loop(context.Context)
// FrontSelectShowZero(context.Context)
GetUiState() uint32
CreateEvent(EventKind)
// CreateOrderEvent delivers a remote order together with the accept event.
// key identifies the order for duplicate detection. returned reason is
// empty when the order was accepted for execution.
CreateOrderEvent(order menu_config.UIMenuStruct, key string) (reason string)
PauseStateMashine(v bool)
Scheduler
}
type UiState ¶ added in v0.230424.2
type UiState uint32
const ( StateDefault UiState = iota StateBoot // 1 t=onstart +onstartOk=FrontHello +onstartError+retry=Boot +retryMax=Broken StateBroken // 2 t=tele/input +inputService=ServiceBegin StateLocked // 3 t=tele StateFrontBegin // 4 t=checkVariables +=FrontHello StateFrontSelect // 5 t=input/money/timeout +inputService=ServiceBegin +input=... +money=... +inputAccept=FrontAccept +timeout=FrontTimeout StatePrepare // 6 StateFrontTune // 7 t=input/money/timeout +inputTune=FrontTune ->FrontSelect StateFrontAccept // 8 t=engine.Exec(Item) +OK=FrontEnd +err=Broken StateFrontTimeout // 9 t=saveMoney ->FrontEnd StateFrontEnd // 10 ->FrontBegin StateServiceBegin // 11 t=input/timeout ->ServiceAuth StateServiceAuth // 12 +inputAccept+OK=ServiceMenu StateServiceMenu // 13 StateServiceInventory // 14 StateServiceTest StateServiceReboot StateServiceNetwork StateServiceMoneyLoad StateServiceReport StateServiceEnd // 20 +askReport=ServiceReport ->FrontBegin StateStop // 21 StateFrontLock StateOnStart StateDoesNotChange )
Click to show internal directories.
Click to hide internal directories.