Lab Activity: TOSSIM simulation

Since

20.11 lab

Till

04.12 lab

Points

1

First, write an app. Assume N motes in a network (let N = 3, but use a constant). Every 3 seconds the app sends a message to mote with id (my_id + 1) % N. The message contains mote ID and a consecutive number of the message. The app logs information about sent messages to channel AppS and about received messages to channel AppR.

Then write a python script running a TOSSIM simulation. The simulation includes 3 motes with IDs: 0, 1, 2. It writes messages from AppR channel to stdout, messages from AppS to a file. Configure the network (links and noise) that there are links between all motes. Mote 0 receives all messages sent to it, mote 1 only some of messages sent to it and mote 2 no messages at all.