Its my Host.ned file
*********************
simple Host
{
parameters:
double txRate @unit(bps); // transmission rate
double slotTime @unit(s); // zero means no slots (pure Aloha)
double x @unit(m); // the x coordinate of the host
double y @unit(m); // the y coordinate of the host
@display("i=device/palm2");
}
Its my Network.ned file
*************************
network Network
{
parameters:
int numHosts; // number of hosts
@display("bgb=694.768,684.72797;bgg=350,1,grey95");
submodules:
server: Server {
@display("p=696.776,-58.232");
}
host[numHosts]: Host {
@display("p=531.136,162.368");
}
}
Its my Host.cc file
**********************
#include "Host.h"
Define_Module(Host);
void Host::initialize()
{
getDisplayString().setTagArg("p", 0, par("x").doubleValue());//nodes initially random position
getDisplayString().setTagArg("p", 1, par("y").doubleValue());//nodes initially random position
}
void Host::handleMessage(cMessage *msg)
{
}