minor fix: isTransmitting() flag should be true during transmissions + removed obsolete MSPSim setCCA interface
This commit is contained in:
parent
5b0b36c39e
commit
9c861b486d
1 changed files with 3 additions and 8 deletions
|
@ -26,7 +26,7 @@
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: SkyByteRadio.java,v 1.14 2009/10/28 15:58:43 fros4943 Exp $
|
* $Id: SkyByteRadio.java,v 1.15 2009/11/13 08:32:01 fros4943 Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package se.sics.cooja.mspmote.interfaces;
|
package se.sics.cooja.mspmote.interfaces;
|
||||||
|
@ -95,6 +95,7 @@ public class SkyByteRadio extends Radio implements CustomDataRadio {
|
||||||
if (len == 0) {
|
if (len == 0) {
|
||||||
lastEventTime = SkyByteRadio.this.mote.getSimulation().getSimulationTime();
|
lastEventTime = SkyByteRadio.this.mote.getSimulation().getSimulationTime();
|
||||||
lastEvent = RadioEvent.TRANSMISSION_STARTED;
|
lastEvent = RadioEvent.TRANSMISSION_STARTED;
|
||||||
|
isTransmitting = true;
|
||||||
/*logger.debug("----- SKY TRANSMISSION STARTED -----");*/
|
/*logger.debug("----- SKY TRANSMISSION STARTED -----");*/
|
||||||
setChanged();
|
setChanged();
|
||||||
notifyObservers();
|
notifyObservers();
|
||||||
|
@ -129,6 +130,7 @@ public class SkyByteRadio extends Radio implements CustomDataRadio {
|
||||||
|
|
||||||
lastEventTime = SkyByteRadio.this.mote.getSimulation().getSimulationTime();
|
lastEventTime = SkyByteRadio.this.mote.getSimulation().getSimulationTime();
|
||||||
/*logger.debug("----- SKY TRANSMISSION FINISHED -----");*/
|
/*logger.debug("----- SKY TRANSMISSION FINISHED -----");*/
|
||||||
|
isTransmitting = false;
|
||||||
lastEvent = RadioEvent.TRANSMISSION_FINISHED;
|
lastEvent = RadioEvent.TRANSMISSION_FINISHED;
|
||||||
setChanged();
|
setChanged();
|
||||||
notifyObservers();
|
notifyObservers();
|
||||||
|
@ -262,10 +264,7 @@ public class SkyByteRadio extends Radio implements CustomDataRadio {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void signalReceptionStart() {
|
public void signalReceptionStart() {
|
||||||
cc2420.setCCA(true);
|
|
||||||
// hasFailedReception = mode == CC2420.MODE_TXRX_OFF;
|
|
||||||
isReceiving = true;
|
isReceiving = true;
|
||||||
/* TODO cc2420.setSFD(true); */
|
|
||||||
|
|
||||||
lastEventTime = mote.getSimulation().getSimulationTime();
|
lastEventTime = mote.getSimulation().getSimulationTime();
|
||||||
lastEvent = RadioEvent.RECEPTION_STARTED;
|
lastEvent = RadioEvent.RECEPTION_STARTED;
|
||||||
|
@ -277,9 +276,7 @@ public class SkyByteRadio extends Radio implements CustomDataRadio {
|
||||||
public void signalReceptionEnd() {
|
public void signalReceptionEnd() {
|
||||||
/* Deliver packet data */
|
/* Deliver packet data */
|
||||||
isReceiving = false;
|
isReceiving = false;
|
||||||
// hasFailedReception = false;
|
|
||||||
isInterfered = false;
|
isInterfered = false;
|
||||||
cc2420.setCCA(false);
|
|
||||||
|
|
||||||
lastEventTime = mote.getSimulation().getSimulationTime();
|
lastEventTime = mote.getSimulation().getSimulationTime();
|
||||||
lastEvent = RadioEvent.RECEPTION_FINISHED;
|
lastEvent = RadioEvent.RECEPTION_FINISHED;
|
||||||
|
@ -295,9 +292,7 @@ public class SkyByteRadio extends Radio implements CustomDataRadio {
|
||||||
public void interfereAnyReception() {
|
public void interfereAnyReception() {
|
||||||
isInterfered = true;
|
isInterfered = true;
|
||||||
isReceiving = false;
|
isReceiving = false;
|
||||||
// hasFailedReception = false;
|
|
||||||
lastIncomingPacket = null;
|
lastIncomingPacket = null;
|
||||||
cc2420.setCCA(true);
|
|
||||||
|
|
||||||
lastEventTime = mote.getSimulation().getSimulationTime();
|
lastEventTime = mote.getSimulation().getSimulationTime();
|
||||||
lastEvent = RadioEvent.RECEPTION_INTERFERED;
|
lastEvent = RadioEvent.RECEPTION_INTERFERED;
|
||||||
|
|
Loading…
Reference in a new issue