@@ -320,7 +317,10 @@ public class Ieee80211AdHocMac extends AbstractMacLayer {
Time.getCurrentTime()-toSend.getTimeEntered());
if(msg.getSize()>=MAX_FRAME_SIZE){
log.warn("Try to send a Frame, which is to big ("
Monitor.log(
Ieee80211AdHocMac.class,
Level.WARN,
"Try to send a Frame, which is to big ("
+msg.getSize()
+"Byte)! Please check the fragementation size in the Net-Layer. The message will be still send, with the side-effects (for example, higher Bandwidth)");
}
...
...
@@ -339,7 +339,8 @@ public class Ieee80211AdHocMac extends AbstractMacLayer {
}
}
}else{
log.error("sendMessage was called, but no Message exists");
thrownewAssertionError(
"sendMessage was called, but no Message exists");
}
}
...
...
@@ -362,7 +363,8 @@ public class Ieee80211AdHocMac extends AbstractMacLayer {
}else{
// easy policy to check an failure. If two or more operation
// running, then is op not null!
log.fatal("Two or more GetSendSlotOperation are running! This should be not happen, because a station cannot send two or more Frames on the same time!");
thrownewAssertionError(
"Two or more GetSendSlotOperation are running! This should be not happen, because a station cannot send two or more Frames on the same time!");
}
}
...
...
@@ -1107,7 +1109,10 @@ public class Ieee80211AdHocMac extends AbstractMacLayer {
getComponent().op=null;
if(!getComponent().isOnline()){
log.warn(Time.getFormattedTime()
Monitor.log(
Ieee80211AdHocMac.class,
Level.WARN,
Time.getFormattedTime()
+" node "
+eventInfo.getSender()
+" wanted to get a slot to send but was already offline.");
...
...
@@ -1141,17 +1146,22 @@ public class Ieee80211AdHocMac extends AbstractMacLayer {
}
}
}else{
log.fatal("Why is the Mac not in an Idle State? "
/*
* FIXME is this a valid state?
*/
getComponent().sendMessage();
thrownewAssertionError(
"Why is the Mac not in an Idle State? "
+getComponent().getWifiState()
+" "
+(getComponent().getDcfManager()
.getTimeToIdleState()));
getComponent().sendMessage();
}
}else{
if(backOffTimeEnd<current){
log.fatal("How can be the backOffTimeEnd smaller then the current time? ");
thrownewAssertionError(
"How can the backOffTimeEnd be smaller than the current time? ");