mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
all mote memories now support symbol addresses
added memory monitor methods (was previously only supported by emulated motes)
This commit is contained in:
parent
ab39b84010
commit
129a854b54
@ -31,6 +31,7 @@
|
||||
|
||||
package se.sics.cooja;
|
||||
|
||||
|
||||
/**
|
||||
* This interface represents a mote memory.
|
||||
*
|
||||
@ -44,7 +45,7 @@ package se.sics.cooja;
|
||||
* @see se.sics.cooja.SectionMoteMemory
|
||||
* @author Fredrik Osterlind
|
||||
*/
|
||||
public interface MoteMemory {
|
||||
public interface MoteMemory extends AddressMemory {
|
||||
|
||||
/**
|
||||
* Clears the entire memory.
|
||||
@ -77,4 +78,14 @@ public interface MoteMemory {
|
||||
*/
|
||||
public int getTotalSize();
|
||||
|
||||
public abstract int parseInt(byte[] memorySegment);
|
||||
|
||||
public enum MemoryEventType { READ, WRITE };
|
||||
|
||||
public interface MemoryMonitor {
|
||||
public void memoryChanged(MoteMemory memory, MemoryEventType type, int address);
|
||||
}
|
||||
|
||||
public boolean addMemoryMonitor(int address, int size, MemoryMonitor mm);
|
||||
public void removeMemoryMonitor(int address, int size, MemoryMonitor mm);
|
||||
}
|
||||
|
@ -64,27 +64,4 @@ public abstract class AbstractEmulatedMote extends AbstractWakeupMote implements
|
||||
public String getStackTrace() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public interface MemoryMonitor {
|
||||
public boolean start(int address, int size);
|
||||
public void stop();
|
||||
public Mote getMote();
|
||||
public int getAddress();
|
||||
public int getSize();
|
||||
|
||||
public void setLastBufferAccess(BufferAccess ba);
|
||||
public BufferAccess getLastBufferAccess();
|
||||
|
||||
public boolean isPointer();
|
||||
public void setPointer(boolean isPointer, MemoryMonitor pointedMemory);
|
||||
public MemoryMonitor getPointedMemory();
|
||||
}
|
||||
|
||||
public enum MemoryEventType { READ, WRITE, UNKNOWN };
|
||||
public interface MemoryEventHandler {
|
||||
public void event(MemoryMonitor mm, MemoryEventType type, int adr, int data);
|
||||
}
|
||||
|
||||
public abstract MemoryMonitor createMemoryMonitor(MemoryEventHandler meh);
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user