[cooja] memory: SectionMoteMemory dummy implementation of MemoryInterface
This commit is contained in:
parent
6b15e7837d
commit
19d07beb16
@ -30,8 +30,11 @@ package org.contikios.cooja;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
import org.contikios.cooja.mote.memory.MemoryInterface;
|
||||||
|
import org.contikios.cooja.mote.memory.MemoryLayout;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a mote memory consisting of non-overlapping memory sections with
|
* Represents a mote memory consisting of non-overlapping memory sections with
|
||||||
@ -43,7 +46,7 @@ import org.apache.log4j.Logger;
|
|||||||
*
|
*
|
||||||
* @author Fredrik Osterlind
|
* @author Fredrik Osterlind
|
||||||
*/
|
*/
|
||||||
public class SectionMoteMemory implements MoteMemory, AddressMemory {
|
public class SectionMoteMemory implements MemoryInterface, MoteMemory, AddressMemory {
|
||||||
private static Logger logger = Logger.getLogger(SectionMoteMemory.class);
|
private static Logger logger = Logger.getLogger(SectionMoteMemory.class);
|
||||||
|
|
||||||
private ArrayList<MoteMemorySection> sections = new ArrayList<MoteMemorySection>();
|
private ArrayList<MoteMemorySection> sections = new ArrayList<MoteMemorySection>();
|
||||||
@ -268,6 +271,41 @@ public class SectionMoteMemory implements MoteMemory, AddressMemory {
|
|||||||
setMemorySegment(varAddr, data);
|
setMemorySegment(varAddr, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public byte[] getMemorySegment(long addr, int size) throws MoteMemoryException {
|
||||||
|
throw new UnsupportedOperationException("Not supported yet.");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setMemorySegment(long addr, byte[] data) throws MoteMemoryException {
|
||||||
|
throw new UnsupportedOperationException("Not supported yet.");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getStartAddr() {
|
||||||
|
throw new UnsupportedOperationException("Not supported yet.");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Symbol> getSymbolMap() {
|
||||||
|
throw new UnsupportedOperationException("Not supported yet.");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MemoryLayout getLayout() {
|
||||||
|
throw new UnsupportedOperationException("Not supported yet.");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean addSegmentMonitor(SegmentMonitor.EventType flag, long address, int size, SegmentMonitor monitor) {
|
||||||
|
throw new UnsupportedOperationException("Not supported yet.");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean removeSegmentMonitor(long address, int size, SegmentMonitor monitor) {
|
||||||
|
throw new UnsupportedOperationException("Not supported yet.");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A memory section contains a byte array and a start address.
|
* A memory section contains a byte array and a start address.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user