Skip to content

Commit

Permalink
Merge pull request contiki-os#566 from ejoerns/pull-req/addr-fix
Browse files Browse the repository at this point in the history
[Cooja] rename rimeaddr_node_addr to linkaddr_node_addr in RimeAddress interface
  • Loading branch information
fros4943 committed Feb 21, 2014
2 parents a1cd642 + 90ab2e7 commit e1e1f1c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tools/cooja/java/org/contikios/cooja/interfaces/RimeAddress.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
import org.contikios.cooja.MoteMemory.MemoryMonitor;

/**
* Read-only interface to Rime address read from Contiki variable: rimeaddr_node_addr.
* Read-only interface to Rime address read from Contiki variable: linkaddr_node_addr.
* XXX Assuming Rime address is 2 bytes.
*
* @see #RIME_ADDR_LENGTH
Expand Down Expand Up @@ -76,12 +76,12 @@ public void memoryChanged(MoteMemory memory, MemoryEventType type, int address)
}
};
/* TODO XXX Timeout? */
moteMem.addMemoryMonitor(moteMem.getVariableAddress("rimeaddr_node_addr"), RIME_ADDR_LENGTH, memMonitor);
moteMem.addMemoryMonitor(moteMem.getVariableAddress("linkaddr_node_addr"), RIME_ADDR_LENGTH, memMonitor);
}
}

public boolean hasRimeAddress() {
return moteMem.variableExists("rimeaddr_node_addr");
return moteMem.variableExists("linkaddr_node_addr");
}

public String getAddressString() {
Expand All @@ -90,7 +90,7 @@ public String getAddressString() {
}

String addrString = "";
byte[] addr = moteMem.getByteArray("rimeaddr_node_addr", RIME_ADDR_LENGTH);
byte[] addr = moteMem.getByteArray("linkaddr_node_addr", RIME_ADDR_LENGTH);
for (int i=0; i < RIME_ADDR_LENGTH-1; i++) {
addrString += (0xFF & addr[i]) + ".";
}
Expand Down Expand Up @@ -131,7 +131,7 @@ public void releaseInterfaceVisualizer(JPanel panel) {
public void removed() {
super.removed();
if (memMonitor != null) {
moteMem.removeMemoryMonitor(moteMem.getVariableAddress("rimeaddr_node_addr"), RIME_ADDR_LENGTH, memMonitor);
moteMem.removeMemoryMonitor(moteMem.getVariableAddress("linkaddr_node_addr"), RIME_ADDR_LENGTH, memMonitor);
}
}

Expand Down

0 comments on commit e1e1f1c

Please sign in to comment.