I want a simple code about castalia that 3 nodes (a,b,c) send packet to each other (a to b and b to c) for start of my algorithm about congestion control in application layer, can anyone help me?
Go to directory "Catalia3.2/Simulations" and create a directory "AQM"
Go to directory "Catalia3.2/src/node/application" and create a directory, say "AQM"
copy "Catalia3.2/Simulations/ connectivityMap/omnetpp.ini to Catalia3.2/Simulations/ AQM/omnetpp.ini
copy all file from director Catalia3.2/src/node/application/connectivityMap to Catalia3.2/src/node/application/AQM
Chage the name of files ConnectivityMap.cc, .h, .ned to AQM.cc, .h and .ned respectively in Catalia3.2/src/node/application/AQM directory
Replace "ConnectivityMap" with AQM every where in the files in Catalia3.2/src/node/application/AQM directory
Now you have created a new application called AQM in the catalia simulator. Copile it and try to run.
Once the code is running sucessfully you can start modifying each one of them as per you requirement.
Go to "startup()" function in .c file. Here we capture all the parameters which have been passed during the simulation. These parameters and their default values are defined in .ned file. You can add/delete the parameters as per your reqirement.
see the "setTimer" function in startup. We send the packets on expiration of this function that is "timerFiredCallBack"
The packets are received from network layer through the function "fromNetworkLaye". You have to code the protocol specific action on receipt of a packet in this function. The reception of a packet may initiate the transmission of some kind of reply. In that case set a timer of specific duration and handle all the transmission related funtionality in "timerFiredCallBack"
To add more application specific messages, modify .msg file