⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme

📁 tinyos-2.x.rar
💻
字号:

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.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -