X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=apps%2Ftests%2FTestDhv%2FREADME;fp=apps%2Ftests%2FTestDhv%2FREADME;h=a1542d8ccd84f0bdbc7b1a19a7dbf05538d2e473;hb=e9bfab607e051bae6afb47b44892ce37541d1b44;hp=0000000000000000000000000000000000000000;hpb=adf1de6c009d13b7b52e68535c63b28f59c97400;p=tinyos-2.x.git diff --git a/apps/tests/TestDhv/README b/apps/tests/TestDhv/README new file mode 100644 index 00000000..a1542d8c --- /dev/null +++ b/apps/tests/TestDhv/README @@ -0,0 +1,59 @@ + +Title: TestDhv Application +Author: Thanh Dang, Sweungweon Park +adopted from TestDip + +1. SETTING UP THE TEST + +You need to first generate the code for compilation. The gentest.py +script reads in the Master files and creates TestDhvC.nc (the +configuration) and TestDhvP.nc (the module). It takes two parameters, +the total number of items and the number of new items. The items that +are random are chosen randomly. + +If you want 128 total items in the dissemination set, where 96 of +those 128 items are new, you would type: + +python gentest.py 128 96 + +After the configuration and module have been generated, you can use +the normal compilation method (e.g. make telosb). + +2, READING THE LEDS + +When an node receives a new item, it toggles LED0. When a node +completes all items, it turns all LEDs on. + +3. SERIAL MESSAGES + +typedef nx_struct dhv_test_msg_t { + nx_am_addr_t id; + nx_uint8_t count; + nx_uint8_t isOk; +} dhv_test_msg_t; + +When a node receives a new item, it sends a dhv_test_msg_t through the +serial interface. + +id is the node id +count is how many new items it has received so far +isOk will be true if the data value was as expected + +4. PACKET INJECTOR + +You can also use the injector to send data packets via a +basestation. The syntax to do that is: + +java DhvInject [key] [version] [data in quotes delimited by space] + +key is the data key in hexadecimal +version is the version number in decimal +data is the actual data in quotes delimited by space + +For example, if you want to send key 10, version 2, and data "ab cd +ef". You would type: + +java DipInject 0a 2 "ab cd ef" + +For this specific test application, your data needs to be "ef be". You +will need a SerialForwarder running for this work.