Fredrik sterlind - PowerPoint PPT Presentation

1 / 8
About This Presentation
Title:

Fredrik sterlind

Description:

Create plugin for counting radio packets. Create and import project directory ... Observer radio medium. Counting packet intelligence ... – PowerPoint PPT presentation

Number of Views:21
Avg rating:3.0/5.0
Slides: 9
Provided by: fredriks
Category:
Tags: fredrik | sterlind

less

Transcript and Presenter's Notes

Title: Fredrik sterlind


1
Using and extending COOJA for sensor network
simulations
  • Fredrik Österlind
  • Swedish Institute of Computer Science

2
TODO
  • Create plugin for counting radio packets
  • Create and import project directory
  • Create simple plugin
  • Observer radio medium
  • Counting packet intelligence
  • Tip 1 Use existing example project_new_plugin
  • Tip 2 Use save functionality in COOJA

3
Different solutions
  • Listen to all radio interfaces
  • Listen to the radio medium
  • Last tick connection
  • Extending connection logger

4
Step 1 Create new project
  • Configuration file (cooja.config)
  • Must tell COOJA about the new pluginse.sics.cooj
    a.GUI.PLUGINS MyNewPlugin
  • Create Java sources
  • Should be in subfolder java
  • Compile with cooja.jar in classpath
  • gt javac -cp ../../../dist/cooja.jar .java

5
Step 2 Plugin GUI
  • A simple Java label will do!
  • myLabel new JLabel("No packets discovered
    yet!")
  • add(myLabel)

6
Step 3 Observe radio medium
  • Get notified at radio activity
  • // Register as radio medium observer
  • Observer radioMediumObserver new Observer()
  • public void update(Observable obs, Object obj)
  • / TODO Check if new packet /
  • mySimulation.getRadioMedium().addRadioMediumObserv
    er(radioMediumObserver)

7
Step 4 Detect new packets
  • Not all notifications are new transmissions!
  • / Increase packet counter /
  • RadioConnection newConns myRadioMedium.getLast
    TickConnections()
  • if (newConns ! null)
  • myCounter newConns.length
  • myLabel.setText("Packet count "
    myCounter)

8
Done?We just added a new plugin to COOJA!
  • To make the new plugin standard in COOJA, update
    external tools paths
  • DEFAULT_PROJECTDIRS gt../apps/mrm../examples/pro
    ject_packet_counter
Write a Comment
User Comments (0)
About PowerShow.com