README
上传用户:joranyuan
上传日期:2022-06-23
资源大小:3306k
文件大小:5k
- This is a basic application testing the execution of DRAND,
- a distributed TDMA scheduling algorithm. More information about
- DRAND can be found in the tech. report:
- http://www.csc.ncsu.edu/faculty/rhee/export/zmac/software/drand/drand.htm
- The application is fairly simple, it will run DRAND and will use
- SODbg to print out various debugging information. To enable various
- debug messages, use the Makefile. As an example:
- PFLAGS= -DDEBUG -DHELLO_DEBUG
- will enable debug for the neighbor discovery phase of DRAND.
- PFLAGS= -DDEBUG -DES_DEBUG
- should enable the final output, priting out slot/frame/energy
- details of DRAND
- The following output is enabled by -DDEBUG and -DES_DEBUG.
- OUTPUT
- ------
- 1) HELLO phase
- *******************************************************
- TwoHopNodeID(HELLO) : 37 255 255
- TwoHopNodeID(HELLO) : 2 255 255
- TwoHopNodeID(HELLO) : 9 255 255
- TwoHopNodeID(HELLO) : 21 255 255
- TwoHopNodeID(HELLO) : 38 255 255
- TwoHopNodeID(HELLO) : 10 255 255
- TwoHopNodeID(HELLO) : 36 255 255
- TwoHopNodeID(HELLO) : 5 255 255
- TwoHopNodeID(HELLO) : 31 255 255
- TwoHopNodeID(HELLO) : 40 255 255
- TwoHopNodeID(HELLO) : 15 255 255
- TwoHopNodeID(HELLO) : 41 255 255
- TwoHopNodeID(HELLO) : 43 255 255
- TwoHopNodeID(HELLO) : 42 255 255
- TwoHopNodeID(HELLO) : 17 255 255
- TwoHopNodeID(HELLO) : 18 255 255
- TwoHopNodeID(HELLO) : 14 255 255
- OneHopNodeID(HELLO) : 28 255 255
- OneHopNodeID(HELLO) : 39 255 255
- OneHopNodeID(HELLO) : 1 255 255
- OneHopNodeID(HELLO) : 3 255 255
- OneHopNodeID(HELLO) : 24 255 255
- OneHopNodeID(HELLO) : 32 255 255
- MyInfo : 27 255 255
- *******************************************************
- The very first output you should see is the neighbor discovery
- details, after HELLO_PERIOD ms.
- - Each row gives you information about one neighbor
- - The first column tells you whether it is one/two hop neighbor
- - second column is node id of the neighbor
- - third column is the slot number
- - fourth column is the local frame size (see Z-MAC paper for details)
-
- At neighbor discovery phase, slot/frame details are not yet known, so
- the default is 255.
- 2) DRAND TDMA slot phase
- After the DRAND phase is over, nodes know their slot numbers.
- *******************************************************
- ENERGY HELLO sID 27 energy 6
- MESSAGE sID 27 mCt 77 rReq 3 rGra 60 mTime 103 sTime 9561
- MESSAGE sID 27 reqCt 5 graCt 66 rejCt 1 relCt 1 twoCt 4
- MESSAGE sID 27 Round 27 slotNum 8 mRound 2 sRound 40572
- *******************************************************
- TwoHopNodeID(DRAND) : 37 255 255
- TwoHopNodeID(DRAND) : 2 2 255
- TwoHopNodeID(DRAND) : 9 0 255
- TwoHopNodeID(DRAND) : 21 255 255
- TwoHopNodeID(DRAND) : 38 255 255
- TwoHopNodeID(DRAND) : 10 4 255
- TwoHopNodeID(DRAND) : 36 255 255
- TwoHopNodeID(DRAND) : 5 3 255
- TwoHopNodeID(DRAND) : 31 2 255
- TwoHopNodeID(DRAND) : 40 7 255
- TwoHopNodeID(DRAND) : 15 1 255
- TwoHopNodeID(DRAND) : 41 5 255
- TwoHopNodeID(DRAND) : 43 4 255
- TwoHopNodeID(DRAND) : 42 255 255
- TwoHopNodeID(DRAND) : 17 6 255
- TwoHopNodeID(DRAND) : 18 255 255
- TwoHopNodeID(DRAND) : 14 255 255
- OneHopNodeID(DRAND) : 28 7 255
- OneHopNodeID(DRAND) : 39 3 255
- OneHopNodeID(DRAND) : 1 6 255
- OneHopNodeID(DRAND) : 3 1 255
- OneHopNodeID(DRAND) : 24 5 255
- OneHopNodeID(DRAND) : 32 255 255
- *******************************************************
- top 4 lines give some information about time/energy consumption.
- e.g. mCt = total number of messages
- slotNum = TDMA slot number assigned
- mTime,sTime = total time for completion, in mticks/sticks respectively.
- Note that some one/two hop slot numbers are still not known, hence the next phase
- (REPORT phase) is exected for this purpose.
- 3) REPORT phase
- Local Frame Size = 16 for maxSlot = 14
- This tells you that the local frame size is 16, and the maximum TDMA slot size
- within two hops is 14.
- 4) FRAME phase
- In thise phase, the local frame size is disseminated within two hops. The final
- output should be:
- *******************************************************
- TwoHopNodeID(FRAME) : 37 14 16
- TwoHopNodeID(FRAME) : 2 2 16
- TwoHopNodeID(FRAME) : 9 0 16
- TwoHopNodeID(FRAME) : 21 9 16
- TwoHopNodeID(FRAME) : 38 13 16
- TwoHopNodeID(FRAME) : 10 4 16
- TwoHopNodeID(FRAME) : 36 10 16
- TwoHopNodeID(FRAME) : 5 3 16
- TwoHopNodeID(FRAME) : 31 2 16
- TwoHopNodeID(FRAME) : 40 7 16
- TwoHopNodeID(FRAME) : 15 1 16
- TwoHopNodeID(FRAME) : 41 5 16
- TwoHopNodeID(FRAME) : 43 4 16
- TwoHopNodeID(FRAME) : 42 11 16
- TwoHopNodeID(FRAME) : 17 6 16
- TwoHopNodeID(FRAME) : 18 13 16
- TwoHopNodeID(FRAME) : 14 9 16
- OneHopNodeID(FRAME) : 28 7 16
- OneHopNodeID(FRAME) : 39 3 16
- OneHopNodeID(FRAME) : 1 6 16
- OneHopNodeID(FRAME) : 3 1 16
- OneHopNodeID(FRAME) : 24 5 16
- OneHopNodeID(FRAME) : 32 12 16
- MyInfo : 27 8 16
- *******************************************************
- Note that now, there is no entry '255', so all information about slot/frame of
- nodes within one/two hops is known.
- At this stage, DRAND evokes the event Drand.gotFrame(), at which Z-MAC can
- begin data transmission.