SourceCode and detailed report on One, Non and P-persistent CSMA techniques.
-
To simulate the project properly-
-
Change values of variables in
const.py
according to your wish. (Speciallytotal_sender_number
andtotal_receiver_number
).
Make sure thattotal_sender_number
=total_receiver_number
. -
You need to create as many number of input files in
./src/textfiles/input/
as the integer value you store intotal_sender_number
.
Iftotal_sender_number
> number of input files, the program may throw exceptions and desired results may not show up. -
Now make sure you're in the
./src
folder and runpython3 main.py
in the terminal after deleting the./src/textfiles/report.txt
and./src/textfiles/analysis.txt
files and also writing Only '0' (if anything else or nothing is written) in./src/textfiles/collision.txt
. -
Keep track of the live changes made on the newly generated
analysis.txt
andreport.txt
after choosing your desired CSMA
technique from the command line. -
Press
ctrl+c
twice to stop the simulation.
-