Documentation ¶
Index ¶
- Constants
- Variables
- func Enum(ctx context.Context) error
- type CoinAcceptor
- func (ca *CoinAcceptor) AcceptMax(max currency.Amount) engine.Doer
- func (ca *CoinAcceptor) CommandExpansionIdentification() error
- func (ca *CoinAcceptor) CommandFeatureEnable(requested Features) error
- func (ca *CoinAcceptor) ExpansionDiagStatus(result *DiagResult) error
- func (ca *CoinAcceptor) NewCoinType(accept, dispense uint16) engine.Doer
- func (ca *CoinAcceptor) NewDispense(nominal currency.Nominal, count uint8) engine.Doer
- func (ca *CoinAcceptor) NewGive(requestAmount currency.Amount, over bool, success *currency.NominalGroup) engine.Doer
- func (ca *CoinAcceptor) NewGiveLeastOver(requestAmount currency.Amount, success *currency.NominalGroup) engine.Doer
- func (ca *CoinAcceptor) NewPayout(amount currency.Amount, success *currency.NominalGroup) engine.Doer
- func (ca *CoinAcceptor) Run(ctx context.Context, alive *alive.Alive, fun func(money.PollItem) bool)
- func (ca *CoinAcceptor) SupportedNominals() []currency.Nominal
- func (ca *CoinAcceptor) TubeStatus() error
- func (ca *CoinAcceptor) Tubes() *currency.NominalGroup
- type CoinRouting
- type Coiner
- type DiagResult
- type DiagStatus
- type Features
- type Stub
- func (Stub) AcceptMax(currency.Amount) engine.Doer
- func (Stub) ExpansionDiagStatus(*DiagResult) error
- func (Stub) NewGive(currency.Amount, bool, *currency.NominalGroup) engine.Doer
- func (Stub) Run(ctx context.Context, alive *alive.Alive, fun func(money.PollItem) bool)
- func (Stub) SupportedNominals() []currency.Nominal
- func (Stub) TubeStatus() error
- func (Stub) Tubes() *currency.NominalGroup
Constants ¶
View Source
const (
TypeCount = 16
)
Variables ¶
Functions ¶
Types ¶
type CoinAcceptor ¶
func (*CoinAcceptor) CommandExpansionIdentification ¶
func (ca *CoinAcceptor) CommandExpansionIdentification() error
func (*CoinAcceptor) CommandFeatureEnable ¶
func (ca *CoinAcceptor) CommandFeatureEnable(requested Features) error
func (*CoinAcceptor) ExpansionDiagStatus ¶
func (ca *CoinAcceptor) ExpansionDiagStatus(result *DiagResult) error
CommandExpansionSendDiagStatus returns: - `nil` if command is not supported by device, result is not modified - otherwise returns nil or MDB/parse error, result set to valid DiagResult
func (*CoinAcceptor) NewCoinType ¶
func (ca *CoinAcceptor) NewCoinType(accept, dispense uint16) engine.Doer
func (*CoinAcceptor) NewDispense ¶
MDB command DISPENSE (0d)
func (*CoinAcceptor) NewGive ¶
func (ca *CoinAcceptor) NewGive(requestAmount currency.Amount, over bool, success *currency.NominalGroup) engine.Doer
High-level dispense wrapper. Handles: - built-in payout or dispense-by-coin using expend strategy - give smallest amount >= requested
func (*CoinAcceptor) NewGiveLeastOver ¶
func (ca *CoinAcceptor) NewGiveLeastOver(requestAmount currency.Amount, success *currency.NominalGroup) engine.Doer
func (*CoinAcceptor) NewPayout ¶
func (ca *CoinAcceptor) NewPayout(amount currency.Amount, success *currency.NominalGroup) engine.Doer
MDB command PAYOUT (0f02)
func (*CoinAcceptor) SupportedNominals ¶
func (ca *CoinAcceptor) SupportedNominals() []currency.Nominal
func (*CoinAcceptor) TubeStatus ¶
func (ca *CoinAcceptor) TubeStatus() error
func (*CoinAcceptor) Tubes ¶
func (ca *CoinAcceptor) Tubes() *currency.NominalGroup
type CoinRouting ¶
type CoinRouting uint8
const ( RoutingCashBox CoinRouting = 0 RoutingTubes CoinRouting = 1 RoutingNotUsed CoinRouting = 2 RoutingReject CoinRouting = 3 )
func (CoinRouting) String ¶
func (i CoinRouting) String() string
type Coiner ¶
type Coiner interface { AcceptMax(currency.Amount) engine.Doer Run(context.Context, *alive.Alive, func(money.PollItem) bool) ExpansionDiagStatus(*DiagResult) error SupportedNominals() []currency.Nominal NewGive(currency.Amount, bool, *currency.NominalGroup) engine.Doer TubeStatus() error Tubes() *currency.NominalGroup }
type DiagResult ¶
type DiagResult []DiagStatus
func (DiagResult) Error ¶
func (dr DiagResult) Error() string
func (DiagResult) OK ¶
func (dr DiagResult) OK() bool
type DiagStatus ¶
type DiagStatus uint16
const ( DiagPoweringUp DiagStatus = 0x0100 DiagPoweringDown DiagStatus = 0x0200 DiagOK DiagStatus = 0x0300 DiagKeypadShifted DiagStatus = 0x0400 DiagManualActive DiagStatus = 0x0510 DiagNewInventoryInformation DiagStatus = 0x0520 DiagInhibited DiagStatus = 0x0600 DiagGeneralError DiagStatus = 0x1000 DiagGeneralChecksum1 DiagStatus = 0x1001 DiagGeneralChecksum2 DiagStatus = 0x1002 DiagGeneralVoltage DiagStatus = 0x1003 DiagDiscriminatorError DiagStatus = 0x1100 DiagDiscriminatorFlightOpen DiagStatus = 0x1110 DiagDiscriminatorReturnOpen DiagStatus = 0x1111 DiagDiscriminatorJam DiagStatus = 0x1130 DiagDiscriminatorBelowStandard DiagStatus = 0x1141 DiagDiscriminatorSensorA DiagStatus = 0x1150 DiagDiscriminatorSensorB DiagStatus = 0x1151 DiagDiscriminatorSensorC DiagStatus = 0x1152 DiagDiscriminatorTemperature DiagStatus = 0x1153 DiagDiscriminatorOptics DiagStatus = 0x1154 DiagAccepterError DiagStatus = 0x1200 DiagAccepterJam DiagStatus = 0x1230 DiagAccepterAlarm DiagStatus = 0x1231 DiagAccepterEmpty DiagStatus = 0x1240 DiagAccepterExitBeforeEnter DiagStatus = 0x1250 DiagSeparatorError DiagStatus = 0x1300 DiagSeparatorSortSensor DiagStatus = 0x1310 DiagDispenserError DiagStatus = 0x1400 DiagStorageError DiagStatus = 0x1500 DiagStorageCassetteRemoved DiagStatus = 0x1502 DiagStorageCashboxSensor DiagStatus = 0x1503 DiagStorageAmbientLight DiagStatus = 0x1504 )
func (DiagStatus) String ¶
func (i DiagStatus) String() string
type Stub ¶
type Stub struct{}
func (Stub) ExpansionDiagStatus ¶
func (Stub) ExpansionDiagStatus(*DiagResult) error
func (Stub) SupportedNominals ¶
func (Stub) TubeStatus ¶
func (Stub) TubeStatus() error { return errors.NotSupportedf("coin.Stub.TubeStatus") }
func (Stub) Tubes ¶
func (Stub) Tubes() *currency.NominalGroup
Click to show internal directories.
Click to hide internal directories.