Presentation is loading. Please wait.

Presentation is loading. Please wait.

HANBACK ELECTRONICS CO., LTD. 저자권 보호됨 Gossiping Protocol.

Similar presentations


Presentation on theme: "HANBACK ELECTRONICS CO., LTD. 저자권 보호됨 Gossiping Protocol."— Presentation transcript:

1 HANBACK ELECTRONICS CO., LTD. 저자권 보호됨 Gossiping Protocol

2 HANBACK ELECTRONICS CO., LTD. 저자권 보호됨 2016-05-25 2 Gossiping Protocol Introduction

3 HANBACK ELECTRONICS CO., LTD. 저자권 보호됨 2016-05-25 3 Gossiping Protocol Introduction Gossiping Concept –Gossiping uses probabilistic packet delivery rather than flooding involves too many nodes to forward. –Gossiping uses hello msg as an advertising packet to figure out how many one-hop neighbor exists. –Select one node among neighbors and send data to the node in uni-cast manner.

4 HANBACK ELECTRONICS CO., LTD. 저자권 보호됨 2016-05-25 4 Gossping Protocol Introduction Gossiping problem –Gossiping selects randomly a neighbor which may not be efficient. –There are some failed delivery as shown in following figure.

5 HANBACK ELECTRONICS CO., LTD. 저자권 보호됨 2016-05-25 5 Gossping Vs Flooding Gossiping & Flooding Comparison –Packet delivery ratio of Gossiping is low. –Gossiping is more efficient in energy conservation

6 HANBACK ELECTRONICS CO., LTD. 저자권 보호됨 2016-05-25 6 Gossiping Protocol Lab

7 HANBACK ELECTRONICS CO., LTD. 저자권 보호됨 2016-05-25 7 TempMon Program –TempMon program deliver temperature data every 5 second to the sink node (node 0) by a routing protocol. –In TempMon program, user easily selects a routing protocol. –TempMon configuration is for selecting Routing algorithm (Gossiping). TempMon location for Gossiping – c:\Programfiles\UCB\cygwin\opt\tinyos ‐ 1.x\contrib\zigbex\adhoc \gossiping

8 HANBACK ELECTRONICS CO., LTD. 저자권 보호됨 2016-05-25 8 TempMon.nc –Components TimerC Temp : temperature GenericComm : RF MHGossipingRouter : routing … configuration TempMon {} implementation { components Main, TempMonM, TimerC, Temp, GenericComm as Comm, MHGossipingRouter as Router ; Main.StdControl -> TempMonM.StdControl; Main.StdControl -> Router.StdControl; … TempMonM.Send -> Router.Send[AM_TEMPMONMSG]; TempMonM.GlobalTime -> Router.GlobalTime;.. }

9 HANBACK ELECTRONICS CO., LTD. 저자권 보호됨 2016-05-25 9 MHGossipingRouter.nc –MHFloodingPSM is used to packet handling for MHFloodingRouter component. –. includes MH; configuration MHGossipingRouter { … } implementation { components MHEngineM, MHGossipingPSM, GenericComm as Comm, QueuedSend, TimerC, SimpleTime, TimeSyncM, LedsC; … MHEngineM.RouteSelect -> MHGossipingPSM.RouteSelect; … }

10 HANBACK ELECTRONICS CO., LTD. 저자권 보호됨 2016-05-25 10 MHGossipingRouter.nc MHGossipingPSM.nc (1) includes AM; includes MH; module MHGossipingPSM { provides { interface StdControl; interface RouteSelect; } } implementation { //... // neighbor management static void updateTableEntry ( … ) {... } task void updateTable() {... }

11 HANBACK ELECTRONICS CO., LTD. 저자권 보호됨 2016-05-25 11 MHGossipingRouter.nc MHGossipingPSM.nc (2) task void advertise() {... call SendMsg.send(TOS_BCAST_ADDR, … ) … } command result_t StdControl.init() { … call Random.init(); return SUCCESS; } command result_t StdControl.start() { return call Timer.start (TIMER_REPEAT, ROUTE_UPDATE_RATE); } command result_t StdControl.stop() { return call Timer.stop(); } advertise packet

12 HANBACK ELECTRONICS CO., LTD. 저자권 보호됨 2016-05-25 12 MHGossipingRouter.nc MHGossipingPSM.nc (3) command result_t RouteSelect.selectRoute (msg, id) { … if (pMHMsg->sendingNode != TOS_LOCAL_ADDRESS ) { pMHMsg->sendingNode = TOS_LOCAL_ADDRESS ; pMHMsg->hopCount++; } if ( TOS_LOCAL_ADDRESS == BASE_STATION_ADDRESS ) { msg->addr = TOS_UART_ADDR; }

13 HANBACK ELECTRONICS CO., LTD. 저자권 보호됨 2016-05-25 13 MHGossipingRouter.nc MHGossipingPSM.nc (4) else if (entries > 0) { uint16_t num = call Random.rand() % entries; int i; for (i = 0; i < entries; i++) { if (neighbourTable[num].nodeAlive == TRUE){ msg->addr = neighbourTable[num].nodeID; break; } else { num++; num = num % entries; } … if (pMHMsg->hopCount < MAX_HOP_COUNT … ) {... return SUCCESS; }... return FAIL; } rand() –select a node in neighbor table. Check TTL

14 HANBACK ELECTRONICS CO., LTD. 저자권 보호됨 2016-05-25 14 MHGossipingRouter.nc MHGossipingPSM.nc (5) command result_t RouteSelect.initializeFields ( … ) { … } event result_t Timer.fired() { post updateTable(); post advertise(); return SUCCESS; } event TOS_MsgPtr ReceiveMsg.receive ( … ) { … }

15 HANBACK ELECTRONICS CO., LTD. 저자권 보호됨 2016-05-25 15 TOSSIM Gossiping Lab

16 HANBACK ELECTRONICS CO., LTD. 저자권 보호됨 2016-05-25 16 TOSSIM : Flooding protocol Lab 1. start cygwin and move to. To confirm by TOSSIM, type following command in cygwin build/pc/ main.exe – Running on Host PC cd /opt/tinyos ‐ 1.x/contrib/zigbex/adhoc cd gossiping make pc

17 HANBACK ELECTRONICS CO., LTD. 저자권 보호됨 2016-05-25 17 TOSSIM Run Tinyviz Execute tinyviz to see TOSSIM as follows. –User can check flooding by watching blinking LED /opt/tinyos-1.x/tools/java/net/tinyos/sim/tinyviz -run./build/pc/main.exe 100


Download ppt "HANBACK ELECTRONICS CO., LTD. 저자권 보호됨 Gossiping Protocol."

Similar presentations


Ads by Google