From 98d23c34949085213f7cc2ddee8f5384dd1d71af Mon Sep 17 00:00:00 2001 From: fros4943 Date: Thu, 15 Jan 2009 13:11:56 +0000 Subject: [PATCH] added help method for writing to script mote serial ports --- tools/cooja/java/se/sics/cooja/plugins/ScriptParser.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/cooja/java/se/sics/cooja/plugins/ScriptParser.java b/tools/cooja/java/se/sics/cooja/plugins/ScriptParser.java index 98750eb61..2061df12c 100644 --- a/tools/cooja/java/se/sics/cooja/plugins/ScriptParser.java +++ b/tools/cooja/java/se/sics/cooja/plugins/ScriptParser.java @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ScriptParser.java,v 1.3 2009/01/12 10:45:40 fros4943 Exp $ + * $Id: ScriptParser.java,v 1.4 2009/01/15 13:11:56 fros4943 Exp $ */ package se.sics.cooja.plugins; @@ -263,6 +263,9 @@ public class ScriptParser { " msg = new java.lang.String(msg); " + " node.setMoteMsg(mote, msg); " + "};\n" + + "function write(mote,msg) { " + + " mote.getInterfaces().getLog().writeString(msg); " + + "};\n" + "function run() { " + "SEMAPHORE_SIM.acquire(); " + "SEMAPHORE_SCRIPT.acquire(); " + /* STARTUP BLOCKS HERE! */