1 / 18

TOSSIM v01.a

TOSSIM v01.a. TOSSIM Capabilities. Simulates large mote networks under Linux Uses existing TinyOS code (different compilation) Extensible network model Logs network activity. Compiling TOSSIM. Similar makefile to FULLPC Uses a few different component implementations MAIN.c RFM.c POT.c

taffy
Download Presentation

TOSSIM v01.a

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. TOSSIM v01.a TOSSIM 17.ix.2001

  2. TOSSIM Capabilities • Simulates large mote networks under Linux • Uses existing TinyOS code (different compilation) • Extensible network model • Logs network activity TOSSIM 17.ix.2001

  3. Compiling TOSSIM • Similar makefile to FULLPC • Uses a few different component implementations • MAIN.c • RFM.c • POT.c • etc. • system/tossim • make –f MakefileTOS TOSSIM 17.ix.2001

  4. Running TOSSIM • A few command line parameters • main [OPTIONS] num_nodes • Network model: simple is default • [-r <static|simple|space>] • Pause on system clock interrupts • [-p usec] TOSSIM 17.ix.2001

  5. Debugging Output • dbg() commands in TinyOS source • Many dbg flags: DBG_SIM, DBG_RADIO, DBG_CLOCK, etc. • system/include/dbg_modes.h • > setenv DBG=route,boot,usr2 TOSSIM 17.ix.2001

  6. External Communication • Tries to open sockets to listening servers at boot • Network packets • Network bits • Packet injection • Opens a server socket for dynamic network packet injection TOSSIM 17.ix.2001

  7. Network Traffic GUI • tools/TossimGUI.class • Reads in and displays network traffic • Allows packet source filtering • Static packet injection (at startup) TOSSIM 17.ix.2001

  8. TOSSIM 17.ix.2001

  9. Static Packet Injection • java TossimGUI [filename] • File contains packets to be received by nodes • <time> <moteID> <data0> <data1> … <data37> • tools/radio.txt 324122 2 ff ff 08 13 de ad be ef … 00 00 00 00 TOSSIM 17.ix.2001

  10. Simulation Time • Time represented in ticks • 4 x 106 ticks/second • e.g. 400 ticks between 10Kb radio interrupts • Chosen as minimum value that allows accurate radio and system clock modeling TOSSIM 17.ix.2001

  11. Dynamic Packet Injection • Connect to port 10579 on host • Message format detailed in documentation • system/tossim/doc/tossim.tex • Will be building dynamic injection tool TOSSIM 17.ix.2001

  12. RFM Models • Simple: every mote in one cell • Static: connectivity determined at startup • Space: silly space-based model which uses potentiometer settings: proof of extensibility TOSSIM 17.ix.2001

  13. TOSSIM Internals • Based on tos4.2 TOSSIM (Culler) • Discrete event simulation • Models clock interrupts • Every event associated with specific mote • Array of mote structures • #define VAR(x) \ TOS_My_Frame[tos_state.current_node].x TOSSIM 17.ix.2001

  14. MAIN.c Event Loop while(!queue_is_empty(&(tos_state.queue))) { // Currently a race condition (dynamic injection) tos_state.tos_time = queue_peek_event_time(&(tos_state.queue)); queue_handle_next_event(&(tos_state.queue)); TOS_schedule_task(); } TOSSIM 17.ix.2001

  15. RFM Simulation typedef struct { void(*init)(); void(*transmit)(int, char); void(*stop_transmit)(int); char(*hears); void* data; } rfm_model; TOSSIM 17.ix.2001

  16. Example: Simple Model • Every mote has a hearing value • Every time a mote transmits, it increments hearing value for all other motes • Every time a mote stops transmitting, it decrements hearing value for all other motes • If hearing value greater than 1 when a mote listens, that mote heard a bit • Static model uses a connectivity graph TOSSIM 17.ix.2001

  17. Scalability • Tested with 1000 motes communicating over radio • 10 simulated seconds for 1000 motes takes 1.5-3 minutes (depends on level of optimization, debugging symbols, etc.) TOSSIM 17.ix.2001

  18. Conclusion • Demonstration • Questions TOSSIM 17.ix.2001

More Related