receiving = 0;
} // If the packet was lost, then we're searching for new packets again
else {
+ if (RandomUniform() < 0.001) {
+ dbg("CpmModelC,SNRLoss", "Packet was technically lost, but TOSSIM introduces an ack false positive rate.\n");
+ if (mine->ack && signal Model.shouldAck(mine->msg)) {
+ dbg_clear("CpmModelC", " scheduling ack.\n");
+ sim_gain_schedule_ack(mine->source, sim_time() + 1, mine);
+ }
+ else { // Otherwise free the receive_message_t*
+ free_receive_message(mine);
+ }
+ }
+ else {
+ free_receive_message(mine);
+ }
receiving = 0;
dbg_clear("CpmModelC,SNRLoss", " -packet was lost.\n");
}
NOISE_BIN_SIZE = (NOISE_MAX - NOISE_MIN)/NOISE_QUANTIZE_INTERVAL,
NOISE_HISTORY = 20,
NOISE_DEFAULT_ELEMENT_SIZE = 8,
- NOISE_HASHTABLE_SIZE = 8192,
- NOISE_MIN_TRACE = 1024,
+ NOISE_HASHTABLE_SIZE = 128,
+ NOISE_MIN_TRACE = 128,
};
typedef struct sim_noise_hash_t {