How things currently work, and what will be changed

From CSL Wiki

Jump to: navigation, search

Contents

What Currently Happens

The .sim file rr_ess_jr.sim currently runs a simulation of a network similar to the James Reserve deployment. It will be used as a model for the type of behaviour desired after the Multihop module is replaced by Centroute.

As part of the network simulation:

  • Nodes (leaves) run devel/multihop/rr_demo/rr_mote_dtn.run
    • The executable is found in devel/multihop/mDtsDseTs
    • Built from code in tos-contrib/dse/apps/mDTNDseTs
  • Sinks (roots) run devel/jamesreserver_ess/essjr.run
    • The executable is found in sensors/dse/dse_server
    • Built from code in sensors/dse/

The Existing Test File for Centroute Code

The .sim file treetest.sim runs a simple application to test the connection between leaves and sinks when running a mote herd.

As part of the network simulation:

  • Nodes (leaves) run devel/herd/treeleaf.run
    • The executable is found in devel/herd/centroute/treeleaf
    • Built from code in tos-contrib/herd/apps/TreeLeaf/
  • Sinks (roots) run devel/herd/treesink.run
    • The executable is found in devel/herd/centroute/treesink
    • Built from code in tos-contrib/herd/apps/TreeSink/

Compilation

For CentRoute: devel/herd/centroute/BUILD builds both the centroute server side application and the tiny-os code.


Leaf Side

Currently: dse/apps/mDTNDseTS/mDTNDseTS.nc calls (or is called by) Multihop specific functions in mDTN/tos/lib/ESS_mDTNC.nc to send and receive packets from the network.

These calls need to be redirected to the Centroute specific code in CentTreeM.nc

TreeLeafM.nc is a sample application that sits above CentTreeM.nc. These are the key functions that need to be connected in the new layer between mDTNDseTS.nc and herd/tos/system/CentTreeM.nc:

  • TreeRecv.down_pkt_rcvd: called whenever a packet is received by the mote
  • TreeSend.send_pkt_up_done: called whenever a packet has been successfully sent by the mote
  • TreeSend.send_pkt_up: calls this function whenever the mote wishes to transmit a packet, this function is implemented in CentTreeM.nc

Currently inside mDTNDseM.nc:

  • mDTNRecvI.mDTNRecv: TreeRecv.down_pkt_rcvd needs to be redirected to call this function. Note: Need to include the type of the packet as a parameter. Different receive functions are called depending on this field. Packet types handled are:
    • MULTIHOP_DSE: Function is in dse/apps/mDTNDseTS/mDTNDseM.nc
    • TIMESYNC_APP: Function is in dse/apps/mDTNDseTS/TimeSynchM.nc
  • mDTNSendI.mDTNSendDone: TreeSend.send_pkt_up_done needs to be redirected to call this function
  • mDTNSendI.mDTNSend: this function needs to be redirected to call TreeSend.send_pkt_up

Root Side

Currently: dse_server_main.c is the (heart of the) program that accepts packets from multihop. It communicates with the Multihop module (in tos-contrib/multihop/apps/em_multihop) via a link device.

All that will need to change is that the upper layer of centroute (code located in devel/herd/centroute/) needs to write packets to the link device used by dse_server.

Personal tools