bugfix in writing tinyos addresses
This commit is contained in:
parent
59dde4f509
commit
d8d94d0cd8
1 changed files with 28 additions and 0 deletions
|
@ -109,6 +109,34 @@ public class MspMoteID extends MoteID {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (moteMem.variableExists("ActiveMessageAddressC__addr")) {
|
||||||
|
this.mote.getCPU().setBreakPoint(moteMem.getVariableAddress("ActiveMessageAddressC__addr"), new CPUMonitor() {
|
||||||
|
public void cpuAction(int type, int adr, int data) {
|
||||||
|
if (type != MEMORY_WRITE) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (data == moteID) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Simulation s = mote.getSimulation();
|
||||||
|
s.scheduleEvent(writeIDEvent, s.getSimulationTime());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (moteMem.variableExists("ActiveMessageAddressC$addr")) {
|
||||||
|
this.mote.getCPU().setBreakPoint(moteMem.getVariableAddress("ActiveMessageAddressC$addr"), new CPUMonitor() {
|
||||||
|
public void cpuAction(int type, int adr, int data) {
|
||||||
|
if (type != MEMORY_WRITE) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (data == moteID) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Simulation s = mote.getSimulation();
|
||||||
|
s.scheduleEvent(writeIDEvent, s.getSimulationTime());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMoteID() {
|
public int getMoteID() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue