+++ /dev/null
-:Address ErroHello cruel world!
-
-UCC Coke Machine controller is alive!
-
-
-door1
-:s
-slot 0 b3M*
-
-
-
-
-��\12 :full 03 sold
-slot 1 :full 30 sold
-slot 2 :full 21 sold
-slot 3 :full 20 sold
-slot 4 :full 20 sold
-slot 5 :full 22 sold
-slot 6 `\ 4ludme
- 8 :full 28 sold
-
-:Min4
-:
-:
-:n6 foo
-ok
-
-:s
-slot 0 b3M*
-
-
-
-
-
-��\12 :full 03 sold
-slot 1 :full 30 sold
-slot 2 :full 21 sold
-slot 3 :full 20 sold
-slot 4 :full 20 sold
-slot 5 :full 22 sold
-slot 6 foo :full 28 sold
-
-:Min4n0 fg
-:s
-slot 0 b3M*
-
-
-
-
-
-
-
-
-
-
-
-��\12 :full 03 sold
-slot 1 :full 30 sold
-slot 2 :full 21 sold
-slot 3 :full 20 sold
-slot 4 :full 20 sold
-slot 5 :full 22 sold
-slot 6 foo :full 28 sold
-
-:Min4d7
-:s
-slot 0 b3M*
-
-
-
-
-
-
-
-
-
-
-
-��\12 :full 03 sold
-slot 1 :full 30 sold
-slot 2 :full 21 sold
-slot 3 :full 20 sold
-slot 4 :full 20 sold
-slot 5 :full 22 sold
-slot 6 foo :full 28 sold
-
-:Min4d7
-:d7
-ok
-
-:s7
-ok
-
-:s
-slot 0 b3M*
-
-
-
-
-
-��\12 :full 03 sold
-slot 1 :full 30 sold
-slot 2 :full 21 sold
-slot 3 :full 20 sold
-slot 4 :full 20 sold
-slot 5 :full 22 sold
-slot 6 foo :full 28 sold
-
-:Min4d7
-:d7
-ok
-
-:s
-slot 0 b3M*
-
-s+--------------------[Modem and dialing parameter setup]---------------------+
-s| |
-s| A - Init string ......... |
-s| B - Reset string ........ ^M~ATZ^M~ |
-s| C - Dialing prefix #1.... ATDT |
-s| D - Dialing suffix #1.... ^M |
- | E - Dialing prefix #2.... ATDP |
-:| F - Dialing suffix #2.... ^M |
-slot 1 :full 30 sold
-slot 2 :full 21 sold
-slot 3 :full 20 sold
-slot 4 :full 20 sold
-slot 5 :full 22 sold
-slot 6 foo :full 28 sold
-
-:Min4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Hello cruel world!
-
-UCC Coke Machine controller is alive!
-
-
-door1
-:p
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- CTRL-A Z for help | 9600 8N1 | NOR | Minicom 2.4 | VT102 | Offline
-root@sonata:/home/tpg# picocom
-No port given
-root@sonata:/home/tpg# picocom /dev/ttyUSB0
-picocom v1.4
-
-port is : /dev/ttyUSB0
-flowcontrol : none
-baudrate is : 9600
-parity is : none
-databits are : 8
-escape is : C-a
-noinit is : no
-noreset is : no
-nolock is : no
-send_cmd is : ascii_xfr -s -v -l10
-receive_cmd is : rz -vv
-
-Terminal ready
-
-:
-:s
-slot 0 b3M*
- ��\12 :full 03 sold
-slot 1 :full 30 sold
-slot 2 :full 21 sold
-slot 3 :full 20 sold
-slot 4 :full 20 sold
-slot 5 :full 22 sold
-slot 6 foo :full 28 sold
-
-:d7
-ok
-
-:s
-slot 0 b3M*
- ��\12 :full 03 sold
-slot 1 :full 30 sold
-slot 2 :full 21 sold
-slot 3 :full 20 sold
-slot 4 :full 20 sold
-slot 5 :full 22 sold
-slot 6 foo :full 28 sold
-
-:Address Erro
-Thanks for using picocom
-root@sonata:/home/tpg# picocom /dev/ttyUSB0
-picocom v1.4
-
-port is : /dev/ttyUSB0
-flowcontrol : none
-baudrate is : 9600
-parity is : none
-databits are : 8
-escape is : C-a
-noinit is : no
-noreset is : no
-nolock is : no
-send_cmd is : ascii_xfr -s -v -l10
-receive_cmd is : rz -vv
-
-Terminal ready
-
-:s
-slot 0 \ 1 :full 00 sold
-slot 1 \ 2@\10�PY�" ' :full 10 sold
-slot 2 :full 00 sold
-slot 3 :full 00 sold
-slot 4 \ 2 :full 00 sold
-slot 5 :full 02 sold
-slot 6 `\14lU�lng\eK8 :full 08 sold
-
-:d7
-ok
-
-:s
-slot 0 \ 1 :full 00 sold
-slot 1 \ 2@\10�PY�" ' :full 10 sold
-slot 2 :full 00 sold
-slot 3 :full 00 sold
-slot 4 \ 2 :full 00 sold
-slot 5 :full 02 sold
-slot 6 `\14lU�lng\eK8 :full 08 sold
-
-:d7
-ok
-
-:d7
-ok
-
-:d7
-ok
-
-:s
-slot 0 \ 1 :full 00 sold
-slot 1 \ 2@\10�PY�" ' :full 10 sold
-slot 2 :full 00 sold
-slot 3 :full 00 sold
-slot 4 \ 2 :full 00 sold
-slot 5 :full 02 sold
-slot 6 `\14lU�lng\eK8 :full 08 sold
-
-:n6 coke
-ok
-
-:s
-slot 0 \ 1 :full 00 sold
-slot 1 \ 2@\10�PY�" ' :full 10 sold
-slot 2 :full 00 sold
-slot 3 :full 00 sold
-slot 4 \ 2 :full 00 sold
-slot 5 :full 02 sold
-slot 6 coke :full 08 sold
-
-:n0 screaming sofa\7f\7fd
-ok
-
-:s
-slot 0 screaming sofa\7f\7fd :full 00 sold
-slot 1 d :full 7F sold
-slot 2 :full 20 sold
-slot 3 :full 20 sold
-slot 4 :full 20 sold
-slot 5 :full 20 sold
-slot 6 :full 20 sold
-
-:n0 screaming soda
-ok
-
-:s
-slot 0 screaming soda :full 00 sold
-slot 1 :full 20 sold
-slot 2 :full 20 sold
-slot 3 :full 20 sold
-slot 4 :full 20 sold
-slot 5 :full 20 sold
-slot 6 :full 20 sold
-
-:n0 soda
-ok
-
-:s
-slot 0 soda :full 00 sold
-slot 1 :full 20 sold
-slot 2 :full 20 sold
-slot 3 :full 20 sold
-slot 4 :full 20 sold
-slot 5 :full 20 sold
-slot 6 :full 20 sold
-
-:\e[5~d7
-:d7
-ok
-
-:d7
-ok
-
-:s
-slot 0 soda :full 00 sold
-slot 1 " :full 20 sold
-slot 2 " :full 20 sold
-slot 3 " :full 20 sold
-slot 4 " :full 20 sold
-slot 5 " :full 20 sold
-slot 6 " :full 20 sold
-
-:Address ErrHello cruel world!
-
-UCC Coke Machine controller is alive!
-
-
-door1
-:s
-slot 0 ��(\1e�\ 1g�E :full 01 sold
-slot 1 \ 2@\12�PY� $' :full 10 sold
-slot 2 :full 00 sold
-slot 3 :full 00 sold
-slot 4 \ 2 :full 20 sold
-slot 5 @l�����A :full 02 sold
-slot 6 `\ 4lU�l~g\eK8 :full 08 sold
-
-:n0 sod
-ok
-
-:s
-slot 0 sod :full 01 sold
-slot 1 \ 2@\12�PY� $' :full 10 sold
-slot 2 :full 00 sold
-slot 3 :full 00 sold
-slot 4 \ 2 :full 20 sold
-slot 5 @l�����A :full 02 sold
-slot 6 `\ 4lU�l~g\eK8 :full 08 sold
-
-:n1 green
-ok
-
-:s
-slot 0 sod :full 01 sold
-slot 1 green :full 10 sold
-slot 2 :full 00 sold
-slot 3 :full 00 sold
-slot 4 \ 2 :full 20 sold
-slot 5 @l�����A :full 02 sold
-slot 6 `\ 4lU�l~g\eK8 :full 08 sold
-
-:n6 coke
-ok
-
-:s
-slot 0 sod :full 01 sold
-slot 1 green :full 10 sold
-slot 2 :full 00 sold
-slot 3 :full 00 sold
-slot 4 \ 2 :full 20 sold
-slot 5 @l�����A :full 02 sold
-slot 6 coke :full 08 sold
-
-:n5 null coke
-ok
-
-:s
-slot 0 sod :full 01 sold
-slot 1 green :full 10 sold
-slot 2 :full 00 sold
-slot 3 :full 00 sold
-slot 4 \ 2 :full 20 sold
-slot 5 null coke :full 02 sold
-slot 6 coke :full 08 sold
-
-:n2 solo
-ok
-
-:
-:n3 orange
-ok
-
-:n4 lemondae
-ok
-
-:n4 lemondde
-ok
-
-:n4 lemonade
-ok
-
-:s
-slot 0 sod :full 01 sold
-slot 1 green :full 10 sold
-slot 2 solo :full 00 sold
-slot 3 orange :full 00 sold
-slot 4 lemonade :full 20 sold
-slot 5 null coke :full 02 sold
-slot 6 coke :full 08 sold
-
-:
-:
-Thanks for using picocom
-root@sonata:/home/tpg# man picocom
-root@sonata:/home/tpg#
--- /dev/null
+:Address ErroHello cruel world!
+
+UCC Coke Machine controller is alive!
+
+
+door1
+:s
+slot 0 b3M*
+
+
+
+
+��\12 :full 03 sold
+slot 1 :full 30 sold
+slot 2 :full 21 sold
+slot 3 :full 20 sold
+slot 4 :full 20 sold
+slot 5 :full 22 sold
+slot 6 `\ 4ludme
+ 8 :full 28 sold
+
+:Min4
+:
+:
+:n6 foo
+ok
+
+:s
+slot 0 b3M*
+
+
+
+
+
+��\12 :full 03 sold
+slot 1 :full 30 sold
+slot 2 :full 21 sold
+slot 3 :full 20 sold
+slot 4 :full 20 sold
+slot 5 :full 22 sold
+slot 6 foo :full 28 sold
+
+:Min4n0 fg
+:s
+slot 0 b3M*
+
+
+
+
+
+
+
+
+
+
+
+��\12 :full 03 sold
+slot 1 :full 30 sold
+slot 2 :full 21 sold
+slot 3 :full 20 sold
+slot 4 :full 20 sold
+slot 5 :full 22 sold
+slot 6 foo :full 28 sold
+
+:Min4d7
+:s
+slot 0 b3M*
+
+
+
+
+
+
+
+
+
+
+
+��\12 :full 03 sold
+slot 1 :full 30 sold
+slot 2 :full 21 sold
+slot 3 :full 20 sold
+slot 4 :full 20 sold
+slot 5 :full 22 sold
+slot 6 foo :full 28 sold
+
+:Min4d7
+:d7
+ok
+
+:s7
+ok
+
+:s
+slot 0 b3M*
+
+
+
+
+
+��\12 :full 03 sold
+slot 1 :full 30 sold
+slot 2 :full 21 sold
+slot 3 :full 20 sold
+slot 4 :full 20 sold
+slot 5 :full 22 sold
+slot 6 foo :full 28 sold
+
+:Min4d7
+:d7
+ok
+
+:s
+slot 0 b3M*
+
+s+--------------------[Modem and dialing parameter setup]---------------------+
+s| |
+s| A - Init string ......... |
+s| B - Reset string ........ ^M~ATZ^M~ |
+s| C - Dialing prefix #1.... ATDT |
+s| D - Dialing suffix #1.... ^M |
+ | E - Dialing prefix #2.... ATDP |
+:| F - Dialing suffix #2.... ^M |
+slot 1 :full 30 sold
+slot 2 :full 21 sold
+slot 3 :full 20 sold
+slot 4 :full 20 sold
+slot 5 :full 22 sold
+slot 6 foo :full 28 sold
+
+:Min4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Hello cruel world!
+
+UCC Coke Machine controller is alive!
+
+
+door1
+:p
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CTRL-A Z for help | 9600 8N1 | NOR | Minicom 2.4 | VT102 | Offline
+root@sonata:/home/tpg# picocom
+No port given
+root@sonata:/home/tpg# picocom /dev/ttyUSB0
+picocom v1.4
+
+port is : /dev/ttyUSB0
+flowcontrol : none
+baudrate is : 9600
+parity is : none
+databits are : 8
+escape is : C-a
+noinit is : no
+noreset is : no
+nolock is : no
+send_cmd is : ascii_xfr -s -v -l10
+receive_cmd is : rz -vv
+
+Terminal ready
+
+:
+:s
+slot 0 b3M*
+ ��\12 :full 03 sold
+slot 1 :full 30 sold
+slot 2 :full 21 sold
+slot 3 :full 20 sold
+slot 4 :full 20 sold
+slot 5 :full 22 sold
+slot 6 foo :full 28 sold
+
+:d7
+ok
+
+:s
+slot 0 b3M*
+ ��\12 :full 03 sold
+slot 1 :full 30 sold
+slot 2 :full 21 sold
+slot 3 :full 20 sold
+slot 4 :full 20 sold
+slot 5 :full 22 sold
+slot 6 foo :full 28 sold
+
+:Address Erro
+Thanks for using picocom
+root@sonata:/home/tpg# picocom /dev/ttyUSB0
+picocom v1.4
+
+port is : /dev/ttyUSB0
+flowcontrol : none
+baudrate is : 9600
+parity is : none
+databits are : 8
+escape is : C-a
+noinit is : no
+noreset is : no
+nolock is : no
+send_cmd is : ascii_xfr -s -v -l10
+receive_cmd is : rz -vv
+
+Terminal ready
+
+:s
+slot 0 \ 1 :full 00 sold
+slot 1 \ 2@\10�PY�" ' :full 10 sold
+slot 2 :full 00 sold
+slot 3 :full 00 sold
+slot 4 \ 2 :full 00 sold
+slot 5 :full 02 sold
+slot 6 `\14lU�lng\eK8 :full 08 sold
+
+:d7
+ok
+
+:s
+slot 0 \ 1 :full 00 sold
+slot 1 \ 2@\10�PY�" ' :full 10 sold
+slot 2 :full 00 sold
+slot 3 :full 00 sold
+slot 4 \ 2 :full 00 sold
+slot 5 :full 02 sold
+slot 6 `\14lU�lng\eK8 :full 08 sold
+
+:d7
+ok
+
+:d7
+ok
+
+:d7
+ok
+
+:s
+slot 0 \ 1 :full 00 sold
+slot 1 \ 2@\10�PY�" ' :full 10 sold
+slot 2 :full 00 sold
+slot 3 :full 00 sold
+slot 4 \ 2 :full 00 sold
+slot 5 :full 02 sold
+slot 6 `\14lU�lng\eK8 :full 08 sold
+
+:n6 coke
+ok
+
+:s
+slot 0 \ 1 :full 00 sold
+slot 1 \ 2@\10�PY�" ' :full 10 sold
+slot 2 :full 00 sold
+slot 3 :full 00 sold
+slot 4 \ 2 :full 00 sold
+slot 5 :full 02 sold
+slot 6 coke :full 08 sold
+
+:n0 screaming sofa\7f\7fd
+ok
+
+:s
+slot 0 screaming sofa\7f\7fd :full 00 sold
+slot 1 d :full 7F sold
+slot 2 :full 20 sold
+slot 3 :full 20 sold
+slot 4 :full 20 sold
+slot 5 :full 20 sold
+slot 6 :full 20 sold
+
+:n0 screaming soda
+ok
+
+:s
+slot 0 screaming soda :full 00 sold
+slot 1 :full 20 sold
+slot 2 :full 20 sold
+slot 3 :full 20 sold
+slot 4 :full 20 sold
+slot 5 :full 20 sold
+slot 6 :full 20 sold
+
+:n0 soda
+ok
+
+:s
+slot 0 soda :full 00 sold
+slot 1 :full 20 sold
+slot 2 :full 20 sold
+slot 3 :full 20 sold
+slot 4 :full 20 sold
+slot 5 :full 20 sold
+slot 6 :full 20 sold
+
+:\e[5~d7
+:d7
+ok
+
+:d7
+ok
+
+:s
+slot 0 soda :full 00 sold
+slot 1 " :full 20 sold
+slot 2 " :full 20 sold
+slot 3 " :full 20 sold
+slot 4 " :full 20 sold
+slot 5 " :full 20 sold
+slot 6 " :full 20 sold
+
+:Address ErrHello cruel world!
+
+UCC Coke Machine controller is alive!
+
+
+door1
+:s
+slot 0 ��(\1e�\ 1g�E :full 01 sold
+slot 1 \ 2@\12�PY� $' :full 10 sold
+slot 2 :full 00 sold
+slot 3 :full 00 sold
+slot 4 \ 2 :full 20 sold
+slot 5 @l�����A :full 02 sold
+slot 6 `\ 4lU�l~g\eK8 :full 08 sold
+
+:n0 sod
+ok
+
+:s
+slot 0 sod :full 01 sold
+slot 1 \ 2@\12�PY� $' :full 10 sold
+slot 2 :full 00 sold
+slot 3 :full 00 sold
+slot 4 \ 2 :full 20 sold
+slot 5 @l�����A :full 02 sold
+slot 6 `\ 4lU�l~g\eK8 :full 08 sold
+
+:n1 green
+ok
+
+:s
+slot 0 sod :full 01 sold
+slot 1 green :full 10 sold
+slot 2 :full 00 sold
+slot 3 :full 00 sold
+slot 4 \ 2 :full 20 sold
+slot 5 @l�����A :full 02 sold
+slot 6 `\ 4lU�l~g\eK8 :full 08 sold
+
+:n6 coke
+ok
+
+:s
+slot 0 sod :full 01 sold
+slot 1 green :full 10 sold
+slot 2 :full 00 sold
+slot 3 :full 00 sold
+slot 4 \ 2 :full 20 sold
+slot 5 @l�����A :full 02 sold
+slot 6 coke :full 08 sold
+
+:n5 null coke
+ok
+
+:s
+slot 0 sod :full 01 sold
+slot 1 green :full 10 sold
+slot 2 :full 00 sold
+slot 3 :full 00 sold
+slot 4 \ 2 :full 20 sold
+slot 5 null coke :full 02 sold
+slot 6 coke :full 08 sold
+
+:n2 solo
+ok
+
+:
+:n3 orange
+ok
+
+:n4 lemondae
+ok
+
+:n4 lemondde
+ok
+
+:n4 lemonade
+ok
+
+:s
+slot 0 sod :full 01 sold
+slot 1 green :full 10 sold
+slot 2 solo :full 00 sold
+slot 3 orange :full 00 sold
+slot 4 lemonade :full 20 sold
+slot 5 null coke :full 02 sold
+slot 6 coke :full 08 sold
+
+:
+:
+Thanks for using picocom
+root@sonata:/home/tpg# man picocom
+root@sonata:/home/tpg#
--- /dev/null
+
+User
+ INTEGER UserID
+ STRING Username
+
+ STRING PasswordHash ; < Hmm... needed?
+ INTEGER PinCode
+
+ INTEGER Balance
+ DATETIME LastSeen
+ BOOL bEnabled
+ BOOL bCokeMember
+ BOOL bWheelMember
+ BOOL bInternal
+
+
+Card -> User
+ STRING CardID
+ INTEGER UserID
--- /dev/null
+
+Central "dispense" server
+- Accounting Section
+ > Linking to a static libary for the cokebank
+ + int AlterBalance(UID, int Delta)
+ + int GetBalance(UID)
+- Device Control Section
+ > Snack - Controls Vending Machine and accepts logins
+ > Coke - Controls Coke Machine
+ > Misc Server
+ - int Dispense(int ID, int UID)
+- Remote Control
+ > Accepts commands from dispense app.
+ - See `proto.txt`
+
+
+Extra notes, see http://wiki.ucc.asn.au/OpenDispense2
--- /dev/null
+OpenDispense^2
+Client/Server Dispense Protocol
+
+The protocol is ASCII based, similar to the FTP protocol
+All server responses are on one line and are prefixed by a three digit response code.
+
+== Response Codes ==
+100 Information
+200 Command succeeded, no extra information
+201 Command succeeded, multiple lines follow (<length>)
+202 Command succeeded, per-command format
+400 Unknown Command
+401 Not Authenticated (or Authentication failure)
+402 Balance insufficient
+403 User not allowed to perform this action
+404 Bad other username
+406 Bad Item ID
+407 Invalid arguments
+500 Unknown Dispense Failure
+501 Action Rejected
+
+== Item IDs ==
+<item_id> represents the item ID
+Item IDs are allowed to contain any non-whitespace character, but in
+general they will be limited to the standard alpha-numeric set
+
+=== User Auth ===
+c USER <username>\n
+s 100 SALT <string>\n or 100 User Set\n (If no salt used)
+c PASS <hash>\n (Hex-Encoded SHA-1 Hash of <username><salt><password>)
+s 200 Auth OK\n or 401 Auth Failure\n
+User is now authenticated
+--- Alternate Method (Implicit Trust Authentication) ---
+If the client is connecting from a trusted machine on a root port then
+automatic authentication is allowed
+c AUTOAUTH <username>\n
+s 200 Auth OK\n or 404 Bad Username\n or 401 Untrusted\n
+--- Set effective user (User in `dispense -u`) ---
+c SETEUSER <username>\n
+s 200 User set\n or 403 Not in coke\n or 404 User not found\n
+
+=== Commands ===
+--- Dispense an item ---
+c DISPENSE <item_id>\n
+s 200 Dispense OK\n or 402 Poor You\n or 500 Dispense Error\n or 406 Bad Item\n
+--- Give to another user ---
+c GIVE <user> <ammount> <reason>\n
+s 200 Give OK\n or 402 Poor You\n or 404 Bad User\n
+--- Alter balance ---
+c ADD <user> <ammount> <reason>\n
+s 200 Add OK\n or 402 No balance\n or 403 Not Coke\n or 404 Bad User\n
+
+--- Get Item list ---
+c ENUM_ITEMS\n
+s 201 Items <count>\n
+s 202 Item <item_id> <price> <description>\n
+ ...
+s 200 List End\n
+--- Get Item Information ---
+c ITEM_INFO <item_id>\n
+s 202 Item <item_id> <price> <description>\n
+
+--- Get Users' Balances ---
+ <max balance> and <min balance> can be '-' to indicate "none"
+c ENUM_USERS[ <min balance> [<max balance>]]\n
+s 201 Users <count>\n
+s 202 User <username> <balance> <flags>\n
+ ...
+s 200 List End\n
+--- Get a User's Balance ---
+c USER_INFO\n
+s 202 User <username> <balance> <flags>\n
+
+--- Add a new user ---
+c USER_ADD <username>\n
+s 200 User Added\n or 403 Not Wheel\n or 404 User Exists\n
+--- Set user flags ---
+ <flags> is a comma-separated list of flag values (optionally preceded by
+ - to remove the flag) Valid values are: user,coke,wheel,meta,disabled,door
+c USER_FLAGS <username> <flags>\n
+s 200 User Updated\n or 403 Not Wheel\n or 404 Bad User\n or 407 Unknown Flags\n
--- /dev/null
+Client UI Design
+
+Left/Right changes the item view (between Drink, Pseudo and Snack - and others if defined)
+
+Should the width of the display be fixed?
+> Current width is 34 characters
+Howabout the height?
+
+
+Mockup:
+ Drink Display
+
+ /----------- Dispense -----------\
+ | 0 Lemon Foo 72 |
+ | 1 Orange Foo 71 |
+ | 2 Solo 73 |
+ | 3 Solo++ 75 |
+ | 4 V Black 75 |
+ | 5 null Coke 101 |
+ | 6 Coke 96 |
+ \--------------------------------/
+ [drink] -pseudo- -snack-
+
+ Pseudo Items
+
+ /----------- Dispense -----------\
+ | 0 Laserprint 10 |
+ | 1 Membership 2500 |
+ | 2 Clue 128 |
+ | 3 Phone 20 |
+ \--------------------------------/
+ -drink- [pseudo] -snack-
+
+ Snacks
+
+ /----------- Dispense -----------\
+ | 00 Smith's Salt+Vinegar 128 A
+ | 01 Unused 0 #
+ | 02 Something 0 |
+ | 03 Something 0 |
+ | 04 Something 0 |
+ | 05 Something 0 |
+ | 06 Something 0 |
+ | 07 Something 0 |
+ | --- --- V
+ \--------------------------------/
+ [drink] -pseudo- -snack-
+
+++ /dev/null
-
-Central "dispense" server
-- Accounting Section
- > Linking to a static libary for the cokebank
- + int AlterBalance(UID, int Delta)
- + int GetBalance(UID)
-- Device Control Section
- > Snack - Controls Vending Machine and accepts logins
- > Coke - Controls Coke Machine
- > Misc Server
- - int Dispense(int ID, int UID)
-- Remote Control
- > Accepts commands from dispense app.
- - See `proto.txt`
-
+++ /dev/null
-OpenDispense^2
-Client/Server Dispense Protocol
-
-The protocol is ASCII based, similar to the FTP protocol
-All server responses are on one line and are prefixed by a three digit response code.
-
-== Response Codes ==
-100 Information
-200 Command succeeded, no extra information
-201 Command succeeded, multiple lines follow (<length>)
-202 Command succeeded, per-command format
-400 Unknown Command
-401 Not Authenticated (or Authentication failure)
-402 Balance insufficient
-403 User not allowed to perform this action
-404 Bad other username
-406 Bad Item ID
-407 Invalid arguments
-500 Unknown Dispense Failure
-501 Action Rejected
-
-== Item IDs ==
-<item_id> represents the item ID
-Item IDs are allowed to contain any non-whitespace character, but in
-general they will be limited to the standard alpha-numeric set
-
-=== User Auth ===
-c USER <username>\n
-s 100 SALT <string>\n or 100 User Set\n (If no salt used)
-c PASS <hash>\n (Hex-Encoded SHA-1 Hash of <username><salt><password>)
-s 200 Auth OK\n or 401 Auth Failure\n
-User is now authenticated
---- Alternate Method (Implicit Trust Authentication) ---
-If the client is connecting from a trusted machine on a root port then
-automatic authentication is allowed
-c AUTOAUTH <username>\n
-s 200 Auth OK\n or 404 Bad Username\n or 401 Untrusted\n
---- Set effective user (User in `dispense -u`) ---
-c SETEUSER <username>\n
-s 200 User set\n or 403 Not in coke\n or 404 User not found\n
-
-=== Commands ===
---- Dispense an item ---
-c DISPENSE <item_id>\n
-s 200 Dispense OK\n or 402 Poor You\n or 500 Dispense Error\n or 406 Bad Item\n
---- Give to another user ---
-c GIVE <user> <ammount> <reason>\n
-s 200 Give OK\n or 402 Poor You\n or 404 Bad User\n
---- Alter balance ---
-c ADD <user> <ammount> <reason>\n
-s 200 Add OK\n or 402 No balance\n or 403 Not Coke\n or 404 Bad User\n
-
---- Get Item list ---
-c ENUM_ITEMS\n
-s 201 Items <count>\n
-s 202 Item <item_id> <price> <description>\n
- ...
-s 200 List End\n
---- Get Item Information ---
-c ITEM_INFO <item_id>\n
-s 202 Item <item_id> <price> <description>\n
-
---- Get Users' Balances ---
- <max balance> and <min balance> can be '-' to indicate "none"
-c ENUM_USERS[ <min balance> [<max balance>]]\n
-s 201 Users <count>\n
-s 202 User <username> <balance> <flags>\n
- ...
-s 200 List End\n
---- Get a User's Balance ---
-c USER_INFO\n
-s 202 User <username> <balance> <flags>\n
-
---- Add a new user ---
-c USER_ADD <username>\n
-s 200 User Added\n or 403 Not Wheel\n or 404 User Exists\n
---- Set user flags ---
- <flags> is a comma-separated list of flag values (optionally preceded by
- - to remove the flag) Valid values are: user,coke,wheel,meta,disabled,door
-c USER_FLAGS <username> <flags>\n
-s 200 User Updated\n or 403 Not Wheel\n or 404 Bad User\n or 407 Unknown Flags\n
+++ /dev/null
-Client UI Design
-
-Left/Right changes the item view (between Drink, Pseudo and Snack - and others if defined)
-
-Should the width of the display be fixed?
-> Current width is 34 characters
-Howabout the height?
-
-
-Mockup:
- Drink Display
-
- /----------- Dispense -----------\
- | 0 Lemon Foo 72 |
- | 1 Orange Foo 71 |
- | 2 Solo 73 |
- | 3 Solo++ 75 |
- | 4 V Black 75 |
- | 5 null Coke 101 |
- | 6 Coke 96 |
- \--------------------------------/
- [drink] -pseudo- -snack-
-
- Pseudo Items
-
- /----------- Dispense -----------\
- | 0 Laserprint 10 |
- | 1 Membership 2500 |
- | 2 Clue 128 |
- | 3 Phone 20 |
- \--------------------------------/
- -drink- [pseudo] -snack-
-
- Snacks
-
- /----------- Dispense -----------\
- | 00 Smith's Salt+Vinegar 128 A
- | 01 Unused 0 #
- | 02 Something 0 |
- | 03 Something 0 |
- | 04 Something 0 |
- | 05 Something 0 |
- | 06 Something 0 |
- | 07 Something 0 |
- | --- --- V
- \--------------------------------/
- [drink] -pseudo- -snack-
-