/* vending machine */

digraph {
  pad=0.5; bgcolor="lightgrey";
  node [shape="box"; style="filled";  fillcolor="cyan"];
  edge [labelfontsize=10; minlen=2; labeldistance=4;  ];
  VEND_IDLE -> VEND_PRE_SHOW [taillabel="EVT_SELECT_BUTTON"];
  VEND_PRE_SHOW -> VEND_IDLE [taillabel="EVT_TIMER"];
  VEND_PRE_SHOW -> VEND_DISPENSE [taillabel="EVT_PAYMENT"];
  VEND_IDLE -> VEND_WAIT_SELECT [taillabel="EVT_PAYMENT"];
  VEND_WAIT_SELECT -> VEND_DISPENSE [taillabel="EVT_SELECT_BUTTON"];
  VEND_DISPENSE -> VEND_PRODUCT_READY [taillabel="EVT_DISPENSE_COMPLETE"];
  VEND_PRODUCT_READY -> VEND_IDLE [taillabel="EVT_BIN_EMPTY"];
  VEND_IDLE [label="VEND_IDLE\ndisplay attraction mode"];
  VEND_PRE_SHOW [label="VEND_PRE_SHOW\nrequest payment"];
  VEND_WAIT_SELECT [label="VEND_WAIT_SELECT\nrequest selection"];
  VEND_DISPENSE [label="VEND_DISPENSE\noperate motor"];
  VEND_PRODUCT_READY [label="VEND_PRODUCT_READY\nuser can remove product"];
}

