From 19d07beb1630393619c82983fb1d099ffda667f6 Mon Sep 17 00:00:00 2001 From: Enrico Joerns Date: Tue, 22 Jul 2014 22:47:54 +0200 Subject: [PATCH] [cooja] memory: SectionMoteMemory dummy implementation of MemoryInterface --- .../contikios/cooja/SectionMoteMemory.java | 40 ++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/tools/cooja/java/org/contikios/cooja/SectionMoteMemory.java b/tools/cooja/java/org/contikios/cooja/SectionMoteMemory.java index 79f32a15b..7f7a7d92b 100644 --- a/tools/cooja/java/org/contikios/cooja/SectionMoteMemory.java +++ b/tools/cooja/java/org/contikios/cooja/SectionMoteMemory.java @@ -30,8 +30,11 @@ package org.contikios.cooja; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; +import java.util.Map; 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 @@ -43,7 +46,7 @@ import org.apache.log4j.Logger; * * @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 ArrayList sections = new ArrayList(); @@ -268,6 +271,41 @@ public class SectionMoteMemory implements MoteMemory, AddressMemory { 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 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. *