Hi Anupama, you can try to introduce jitters to REDUCE collisions. For example, in your "send" function use:
Scheduler::instance().schedule(target_, p, (NOW + myJitter)); where p is your packet and myJitter is for example a random and uniformly distributed: myJitter = Random::uniform(0,maxJitter); Regards Michele A Anupama wrote: > Hi Michele > Thanks for ur reply. I saw the trace file and the packets which I > found missing are actually dropped due to Collission and I found that by > seeing the Trace file whith Mac trace enabled in the Tcl file. > How can we avoid these Collissions ? > > Thanks in advance > > Regards > Anupama > > > On 2/23/06, Michele Battelli <[EMAIL PROTECTED]> wrote: > >> Probably you have some collisions going on, especially if your network is >> pretty dense. Try to enable the MAC and Agent tracing from the tcl script >> and check in the trace file if you see some collisions (usually denoted by a >> -d or D). >> >> Regards, >> M >> >> PS: please, post your question on the official group, or if you have >> question about ns-2 on the official ns2 mailing list. Thank you. >> >> >> A Anupama wrote: >> >> Hi all >> I am devoloping a protocol which is an extension to AODV. In that to >> send the packet p (Unicast as well as multicast) I am using >> >> Scheduler::instance().schedule (target_, p, 0.); >> >> I am using ih->daddr() = index; ( index of the receiver) and for >> broadcast ih->daddr()=IP_BROADCAST >> >> I am not receiving any error... but at the time of simulation some control >> packets are not received by its neighbors( in broadcastion) or by the >> individual receiver (in unicasting). Why this is happening to certain >> packets ? The same kind of packets sent by other nodes are received >> properly... >> >> I am in an urgent requirement of this... Please help.... >> >> Thanks in advance >> >> Regards >> Anupama >> >> >> On 12/22/05, A Anupama <[EMAIL PROTECTED]> wrote: >> >>> Great........ It Worked.... >>> Thanks a lot... >>> >>> >>> >>> On 12/20/05, Michele Battelli < [EMAIL PROTECTED]> wrote: >>> >>>> Hi Anupama, >>>> to access the coordinates of a node you need to first have a pointer >>>> to the node as: >>>> >>>> MobileNode * node_; // remember to include mobilenode.h >>>> >>>> then simply: >>>> >>>> my_x = node_ -> X(); >>>> my_y = node_ -> Y(); >>>> >>>> will return you the coordinates. >>>> To know if two nodes are in transmission range you can build your own >>>> function to calculate the Euclidean Distance between two nodes, since >>>> coordiantes and radio range are both in meters in the simulator. Or >>>> you >>>> can use the function >>>> within god.cc called IsNeighbor, simply creating an instance of god >>>> and >>>> passing the IDs of the two nodes. >>>> >>>> God::instance()->IsNeighbor(node1, node2); >>>> >>>> Regars, >>>> Michele >>>> >>>> A Anupama wrote: >>>> >>>>> Hi all, >>>>> >>>>> I am implementing some security extensions to AODV protocol. I am >>>>> >>>> having >>>> >>>>> some doubts.... >>>>> 1) How can I know the location information ((x,y,z) co-ordinate >>>>> >>>> form) of >>>> >>>>> a mobile wireless node at protocol design time as i required to use >>>>> >>>> the >>>> >>>>> location information while sending a packet ? >>>>> 2) How the co-ordinate system in ns/nam ((x,y,z) co-ordinate >>>>> >>>> system) is >>>> >>>>> mapped with actual location ? As the transmission range is described >>>>> >>>> in >>>> >>>>> meters , how can we know depending on the location (x,y,z) >>>>> >>>> information >>>> >>>>> whether two nodes are in transmission range or not ? >>>>> >>>>> Thanks in advance... >>>>> >>>>> Regards >>>>> Anupama >>>>> >>>>> >>>>> >>>>> >>>> >>>> >> > > >
