- Home Page of ProjectGuideline.com ›
- Forums ›
- Questions Asked by Students and Scholars ›
- How to assing a prticular channel for transmitting a particular packet?
Sir,
I am using CRCN ns-2 extention for using Multichannel facility in my simulation.
In AODV, I want to assing a prticular channel for transmitting a particular packet. How can I do that?
In AODV under CRCN-ns-2, the channel assignment is periodically done by ChannelAssignTimer and the best channel is assigned automatically with respect to the channel condition.
The following two functions are doing this in an automatic, periodic fashion.
void
ChannelAssignTimer::expire(Event *)
{
//c a r m e n
a_->ChannelAssign();
resched(0.1);
}
//Channel Assignment Function
void
AODV::ChannelAssign(){
//assign the interface based on greedy algorithm
//choose the channel with least interference.
//look through the route table to find the route
//with same next hop id.
….
….
}
So, if you need to transmit a particular packet on a particular channel, then you may need to disable this timer first and then do your way of assigning channels.
Charles Pandian