protected override void listen(Spectrum spectrum, int currentRegion) { if (this.IsRxPending) { Message rxMessage = spectrum.Listen(currentRegion); if (rxMessage != null && rxMessage.Content != null) { this.processMessage(rxMessage); this.IsRxPending = true; //RR-Aloha always listen to messages to process the information frame } } }
protected virtual void listen(Spectrum spectrum, int currentRegion) { if (this.IsRxPending) { Message rxMessage = spectrum.Listen(currentRegion); if (rxMessage != null && rxMessage.Content != null) { if (rxMessage.Destination == this.Id || rxMessage.Destination == 0) { this.processMessage(rxMessage); spectrum.ClearMessage(currentRegion); this.IsRxPending = false; } } } }