Merge pull request #1056 from tim-ist/packet_sync
[Cooja/cc2420] Check the frame preamble and MPDU length before parsing an outgoing packet
This commit is contained in:
commit
dde83500c9
4 changed files with 55 additions and 51 deletions
|
@ -76,7 +76,8 @@ public abstract class AbstractApplicationMote extends AbstractWakeupMote impleme
|
|||
if (radio.getLastPacketReceived() != null)
|
||||
receivedPacket(radio.getLastPacketReceived());
|
||||
} else if (radio.getLastEvent() == Radio.RadioEvent.TRANSMISSION_FINISHED) {
|
||||
sentPacket(radio.getLastPacketTransmitted());
|
||||
if (radio.getLastPacketTransmitted() != null)
|
||||
sentPacket(radio.getLastPacketTransmitted());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -517,10 +517,12 @@ public class RadioLogger extends VisPlugin {
|
|||
return;
|
||||
}
|
||||
final RadioConnectionLog loggedConn = new RadioConnectionLog();
|
||||
loggedConn.packet = conn.getSource().getLastPacketTransmitted();
|
||||
if (loggedConn.packet == null)
|
||||
return;
|
||||
loggedConn.startTime = conn.getStartTime();
|
||||
loggedConn.endTime = simulation.getSimulationTime();
|
||||
loggedConn.connection = conn;
|
||||
loggedConn.packet = conn.getSource().getLastPacketTransmitted();
|
||||
java.awt.EventQueue.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue