From 335b7ef46e2c205b98e96079e5f167369ea272da Mon Sep 17 00:00:00 2001 From: kaisenl Date: Sat, 26 Jan 2008 08:30:59 +0000 Subject: [PATCH] Mirage MicaZ Test and Test Code Update --- apps/tests/TestDIP/README | 13 +++++++++---- apps/tests/TestDIP/TestDIPP-Master.nc | 12 +++++++----- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/apps/tests/TestDIP/README b/apps/tests/TestDIP/README index 2d81083e..97b9d7cd 100644 --- a/apps/tests/TestDIP/README +++ b/apps/tests/TestDIP/README @@ -30,8 +30,8 @@ typedef nx_struct dip_test_msg_t { nx_uint8_t isOk; } dip_test_msg_t; -Every time a node a receives a new item, it sends a dip_test_msg_t -through the serial interface. +When a node receives a new item, it sends a dip_test_msg_t through the +serial interface. id is the node id count is how many new items it has received so far @@ -39,9 +39,14 @@ isOk will be true if the data value was as expected 4. TIMING -With a single sender and single receiver on a table, it takes -approximately: +With a single sender and single receiver on a table using TelosB +nodes, it takes approximately: 3.5 minutes for a node to receive 128 out of 128 items. 4.0 minutes for a node to receive 240 out of 240 items. +With a single sender and two receivers on Mirage MicaZ nodes, it takes +approximately: + +2 minutes for both nodes to receive 96 out of 96 items. +With 128 items or more, MicaZ nodes don't receive anything. Memory limitation? diff --git a/apps/tests/TestDIP/TestDIPP-Master.nc b/apps/tests/TestDIP/TestDIPP-Master.nc index 696743df..2215ace9 100644 --- a/apps/tests/TestDIP/TestDIPP-Master.nc +++ b/apps/tests/TestDIP/TestDIPP-Master.nc @@ -72,14 +72,16 @@ implementation { } dbg("TestDIPP", "Got an update, %u complete now at %s\n", count, sim_time_string()); call Leds.led0Toggle(); + + testmsg = (dip_test_msg_t*) call SerialSend.getPayload(&m_test, 0); + testmsg->id = TOS_NODE_ID; + testmsg->count = count; + testmsg->isOk = okbit; + call SerialSend.send(0, &m_test, sizeof(dip_test_msg_t)); + if(newcount == count) { call Leds.set(7); - testmsg = (dip_test_msg_t*) call SerialSend.getPayload(&m_test, 0); - testmsg->id = TOS_NODE_ID; - testmsg->count = count; - testmsg->isOk = okbit; - call SerialSend.send(0, &m_test, sizeof(dip_test_msg_t)); } } -- 2.39.2