20 Kasım 2008 Perşembe

NS2 Scheduler: Event UID not valid!

While I was trying to send more than one packet at a time by C++ codes, like BROADCASTing, this problem occured.
The reason for the error is, giving the send command for the same packet again and again. Created packet had already been sent, so creating another packet with the same header but different destination and sending new packet each time solved the problem..


int tmp;
tmp = here_.addr_;//BBBase must be on the node created finally..
for(int i = 0; i <= tmp; i++){
dst_.addr_ = i;
Packet* gonderiPkt = allocpkt();
hdr_BB* hdr_gonderi = hdr_BB::access(gonderiPkt);
hdr_gonderi->cmd = UALIVE;
send(gonderiPkt, 0);
}
return (TCL_OK);



Ferhat Umut Dizdar..

Hiç yorum yok:

Yorum Gönder