Browse Source

Misc documentation

master
Erle Pereira 6 years ago
parent
commit
5e1cd58b7e
1 changed files with 39 additions and 0 deletions
  1. +39
    -0
      atm simulation/Readme.txt

+ 39
- 0
atm simulation/Readme.txt View File

@ -0,0 +1,39 @@
This uses the Apache thrift protocol library.
In Debian (and most derivatives) it is available as python-thrift. Alternately, grab a copy and
install it from
This needs unittest
https://thrift.apache.org/
-- Generating the supporting server / client code
--------------------------------------------------
If you just want to run the code, just install the python-thrift library.
To re-genrate it (you need the thrift compiler running to do this.
the generated code for client and server is provided in the folder "gen-py"
thrift --gen py atmservice
-- Running code.
** Please, as configured, the server and client as designed to listen on localhost port 8082 only
go to atmcode folder
: start the atm (load the amount of 20$ notes and 50$ notes at start)
Usage: ./atmserver.py <number of 20$ notes> <number of 50$ notes>
: use the client (any amounts other than multiples of 20, 50 will yield an "Invalid amount":
If successul, the client terminal will show the amount withdrawn and the amount of 20$ and 50$ bills
* at start, the server runs a self test, and will fail to start if any of the tests fail.

Loading…
Cancel
Save