| Send a story | Useful links | Past polls | Calendar | Advanced search | Site statistics | Forum | Downloads | |
| Welcome to OMNeT++ Community Site | Wednesday, January 07 2009 |
| Ciao list, I found a very strange behavior in the MF's CSMAMacLayer, which I don;t really understand. The following code crashes: if(category == catRadioState) { radioState = static_cast<const RadioState *>(details)->getState(); if((macState == TX) && (radioState == RadioState::SEND)) { EV << " radio in SEND state, sendDown packet" << endl; sendDown(macQueue.front()); macQueue.pop_front(); } } when the MacLayer gives the message which is in front() of the macQueue further for sending. The problem is that the queue is empty and front() returns the address 0x5 (exactly this one, never something else!). This address is of course not handled as wrong in the sending function, which just checks whether it is not NULL. I am not sure what this is - a bug in the standard library (e.g. in the MacOSX implementation), a but in the CSMALayer or whatever. Maybe just a bad star constellation this night. Anyway, I fixed it by simply asking whether the queue is not empty and only if not, then send the packet. I just wonder why this bug has never showed itself in the zillions times I ran my simulations... Thanks, Anna -- Anna Förster PhD Candidate Faculty of Informatics, University of Lugano Via G. Buffi 13, CH-6900 Lugano Tel. +41 58 666 4290 |
_______________________________________________ Omnetpp-l mailing list Omnetpp-l at xxx http://lists.omnetpp.org/mailman/listinfo/omnetpp-l
| Copyright © 2009 OMNeT++ Community Site All trademarks and copyrights on this page are owned by their respective owners. |
Powered By GeekLog v1.3.7sr1 Page created in 0.09 seconds |