Vending Machine/Cashless Device: Difference between revisions

From Nottinghack Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:
The specification defines 3 levels of cashless devices, with more more features the higher the level.  The Vending Machine (VMC) also has a level, and a device and VMC can only communicate using the highest commonly supported level.  As our VMC is only level 1, we only need to implement a level 1 cashless device.
The specification defines 3 levels of cashless devices, with more more features the higher the level.  The Vending Machine (VMC) also has a level, and a device and VMC can only communicate using the highest commonly supported level.  As our VMC is only level 1, we only need to implement a level 1 cashless device.


The cashless device is basically a state machine with 5 states (7 for level 2 and 3 machines).  These states are:
[[File:State-machine.png|700px|right|frame|A (slightly simplified) diagram of the state machine, with commands sent from/to the VMC in capitals.
]]
 
The cashless device ( is basically a state machine with 5 states (7 for level 2 and 3 machines).  These states are:


# Inactive
# Inactive
Line 11: Line 14:
# Vend
# Vend


[[File:State-machine.png|700px]]
When turned on, the cashlss device enters state 1.  Almost all state transistions are initiated by the VMC, with the exception of 3 -> 4, which is initiated by the cashless device on a valid card read.

Revision as of 17:01, 12 August 2011

The MDB spec already takes into accoutn cashless devices, so we simply have to build a device that conforms to the spec.

The specification defines 3 levels of cashless devices, with more more features the higher the level. The Vending Machine (VMC) also has a level, and a device and VMC can only communicate using the highest commonly supported level. As our VMC is only level 1, we only need to implement a level 1 cashless device.

A (slightly simplified) diagram of the state machine, with commands sent from/to the VMC in capitals.

The cashless device ( is basically a state machine with 5 states (7 for level 2 and 3 machines). These states are:

  1. Inactive
  2. Disabled
  3. Enabled
  4. Session Idle
  5. Vend

When turned on, the cashlss device enters state 1. Almost all state transistions are initiated by the VMC, with the exception of 3 -> 4, which is initiated by the cashless device on a valid card read.