Documentation ¶
Overview ¶
Package bill incapsulates work with bill validators.
Index ¶
- Constants
- func Enum(ctx context.Context) error
- type BillCommand
- type BillValidator
- func (bv *BillValidator) BillReset() (err error)
- func (bv *BillValidator) BillRun(alive *alive.Alive, returnEvent func(money.ValidatorEvent))
- func (bv *BillValidator) BillStacked() bool
- func (bv *BillValidator) DisableAccept()
- func (bv *BillValidator) EscrowAmount() currency.Amount
- func (bv *BillValidator) EscrowNominal() currency.Nominal
- func (bv *BillValidator) GetState() BllStateType
- func (bv *BillValidator) SendCommand(cmd BillCommand)
- func (bv *BillValidator) SupportedNominals() []currency.Nominal
- type Biller
- type BllStateType
- type Stub
- func (Stub) BillReset() error
- func (Stub) BillRun(*alive.Alive, func(money.ValidatorEvent))
- func (Stub) BillStacked() bool
- func (Stub) DisableAccept()
- func (Stub) EscrowAmount() currency.Amount
- func (Stub) EscrowNominal() currency.Nominal
- func (Stub) GetState() BllStateType
- func (Stub) SendCommand(BillCommand)
- func (Stub) SupportedNominals() []currency.Nominal
Constants ¶
View Source
const ( StatusDefectiveMotor byte = 0x01 StatusSensorProblem byte = 0x02 StatusValidatorBusy byte = 0x03 StatusROMChecksumError byte = 0x04 StatusValidatorJammed byte = 0x05 StatusValidatorWasReset byte = 0x06 StatusBillRemoved byte = 0x07 StatusCashboxOutOfPosition byte = 0x08 StatusValidatorDisabled byte = 0x09 StatusInvalidEscrowRequest byte = 0x0a StatusBillRejected byte = 0x0b StatusCreditedBillRemoval byte = 0x0c )
bill poll status
View Source
const ( StatusRoutingBillStacked byte = 0x80 | (iota << 4) StatusRoutingEscrowPosition StatusRoutingBillReturned StatusRoutingBillToRecycler StatusRoutingDisabledBillRejected StatusRoutingBillToRecyclerManualFill StatusRoutingManualDispense StatusRoutingTransferredFromRecyclerToCashbox )
bill poll routing status
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BillCommand ¶ added in v0.230424.2
type BillCommand byte
const ( Stop BillCommand ExecuteStop Accept ExecuteAccept Reject ExecuteReject )
type BillValidator ¶
type BillValidator struct { mdb.Device // dynamic state useful for external code EscrowBill currency.Nominal // assume only one bill may be in escrow position // contains filtered or unexported fields }
func (*BillValidator) BillReset ¶ added in v0.230424.2
func (bv *BillValidator) BillReset() (err error)
func (*BillValidator) BillRun ¶ added in v0.230424.2
func (bv *BillValidator) BillRun(alive *alive.Alive, returnEvent func(money.ValidatorEvent))
прием банкнот ( если не принимал ранее). останавливаем по времени.
func (*BillValidator) BillStacked ¶ added in v0.230424.2
func (bv *BillValidator) BillStacked() bool
func (*BillValidator) DisableAccept ¶ added in v0.230424.2
func (bv *BillValidator) DisableAccept()
func (*BillValidator) EscrowAmount ¶
func (bv *BillValidator) EscrowAmount() currency.Amount
func (*BillValidator) EscrowNominal ¶ added in v0.230424.2
func (bv *BillValidator) EscrowNominal() currency.Nominal
func (*BillValidator) GetState ¶ added in v0.230424.2
func (bv *BillValidator) GetState() BllStateType
func (*BillValidator) SendCommand ¶ added in v0.230424.2
func (bv *BillValidator) SendCommand(cmd BillCommand)
func (*BillValidator) SupportedNominals ¶
func (bv *BillValidator) SupportedNominals() []currency.Nominal
type Biller ¶
type Biller interface { SupportedNominals() []currency.Nominal EscrowAmount() currency.Amount EscrowNominal() currency.Nominal SendCommand(BillCommand) BillRun(*alive.Alive, func(money.ValidatorEvent)) BillReset() error BillStacked() bool GetState() BllStateType DisableAccept() }
type BllStateType ¶ added in v0.230424.2
type BllStateType byte
const ( Broken BllStateType WaitConfigure )
func (BllStateType) String ¶ added in v0.230424.2
func (b BllStateType) String() string
type Stub ¶
type Stub struct{}
func (Stub) BillRun ¶ added in v0.230424.2
func (Stub) BillRun(*alive.Alive, func(money.ValidatorEvent))
func (Stub) BillStacked ¶ added in v0.230424.2
func (Stub) DisableAccept ¶ added in v0.230424.2
func (Stub) DisableAccept()
func (Stub) EscrowAmount ¶
func (Stub) EscrowNominal ¶ added in v0.230424.2
func (Stub) GetState ¶ added in v0.230424.2
func (Stub) GetState() BllStateType
func (Stub) SendCommand ¶ added in v0.230424.2
func (Stub) SendCommand(BillCommand)
func (Stub) SupportedNominals ¶
Click to show internal directories.
Click to hide internal directories.