Upload
owen-stokes
View
212
Download
0
Embed Size (px)
Citation preview
Symmetric Symmetric DetectionDetection
OverviewOverview• In this phase, each mote will
maintain a neighbor table. • It provide a command bool
isSymmetric(uint16_t neighborID) for the backbone creation phase .
• The judgment is based on the statistic.
OverviewOverview• Provides interface
– SDNeighborTable– StdControl
• Used components– SDM– RoutingC– RandomLFSR– TimerC– TinyAlloc
Data StructureData StructuresendId size Data
2 1 18
Every neighborID occupies 2 bytes, so one packet can accommodate 18/2=9 neighborID
MAX_NEIGHBOR = 40Totally we need 5 packets at most.MAX_SD_BUFFER_SIZE = (MAX_NEIGHBOR+5)/10, Shall we use MAX_NEIGHBOR/9+1?Or shall we change the SD_PAYLOAD_SIZE = 18 ?
Data StructureData Structuretypedef struct{
uint16_t neighborID[MAX_NEIGHBOR];uint8_t symmChannel[MAX_NEIGHBOR];uint8_t asymmChannel[MAX_NEIGHBOR];uint8_t noChannel[MAX_NEIGHBOR];uint8_t currStatus[MAX_NEIGHBOR];
/* 0------noChannel 1------asymmChannel
2------symmeChannel*/
uint8_t aliveLastTime[MAX_NEIGHBOR]; } NEIGHBOR_TABLE;
Note: neighborID[0..MAX_NEIGHBOR] is initialed to be 0xffff
WorkflowWorkflow
Scan the neighbor table Generate packets to be sendStart a new Timer
Send Packet
Check Neighbor
table
Interval of T1:SEND_BEACON_PERIODInterval of T2:(Random.rand()) % (SEND_BEACON_PERIOD/global_size)
Check Neighbor
table
WorkflowWorkflow• How about the last packet in the T1
interval• If the process to generate packets is
too long or due to other delay, then the last packet will be lost.
• Guarantee that SEND_BEACON_PERIOD/global_size - beacon_delay > 640
RulesRules• checkNT() will examine the previous round status and update the statistical value.• Once a mote receive a packet, it examine the sendID first, then examine the string of neighbor ID to judge whether it is symmetric in previous round.• If a node does not receive a packet from a certain node in a round &&nodeId is in the neighbortable-> no channel in this round.
OverflowOverflow
Node 10
Node 11
Neighbor[0]=11
Neighbor[0]=10
Cur[0]=asy
Cur[0]=asy
Cur[0]=sym
Cur[0]=sym
checkNTSyn[0]=1
checkNTSyn[0]=1
checkNTSyn[0]=1noChan[0]=1
checkNTSyn[0]=2
checkNTSyn[0]=1noChan[0]=2
checkNTSyn[0]=2Ayn[0]=1
Cur[0]=sym
Cur[0]=noChanCur[0]=noChan
Cur[0]=asy
ParameterParameterss•SEND_BEACON_PERIOD– Interval for T1•CHECKNT_WAIT_TIMES– In which round it starts to do checkNT()•global_threshold– numSymm /(numAsymm + numSymm +
numNone) >= (global_threshold/100)•Also, the system should carefully the
number of round to detect symmetric
ParametersParameters
Node 10
Node 11
Neighbor[0]=11
Neighbor[0]=10
Cur[0]=asy
Cur[0]=asy
Cur[0]=sym
Cur[0]=sym
checkNTSyn[0]=1
checkNTSyn[0]=1
checkNTSyn[0]=1noChan[0]=1
checkNTSyn[0]=2
checkNTSyn[0]=1noChan[0]=2
checkNTSyn[0]=2Ayn[0]=1
Cur[0]=sym
Cur[0]=noChanCur[0]=noChan
Cur[0]=asy
If the motes are fully synchronized ,then the third time it could do checkNT()
• If motes are not fully synchronized, then forth timer is the best time to start do checkNT().
• Neighbor table: 7byte*MAX_NEIGHBOR• MAX_SD_BUFFER_SIZE*sizeof(TOS_Msg))• If we do not plan to do the judgment on
multiple rounds. Then we do not need to have
uint8_t symmChannel[MAX_NEIGHBOR];
uint8_t asymmChannel[MAX_NEIGHBOR];uint8_t noChannel[MAX_NEIGHBOR];uint8_t aliveLastTime[MAX_NEIGHBOR];