Research Article

Time Slot Detection-Based -ary Tree Anticollision Identification Protocol for RFID Tags in the Internet of Things

Algorithm 1

Pseudocode of the TSDM algorithm.
 1 Reader Operation
1-1: Qu={};
1-2: while(Qu≠NULL) do
1-3:  Function _AntiCol()
1-4: end while
 2 Anti-Collision processing
2-1: Function _AntiCol()
2-2: {pre=Deque(Qu)
2-3:  Broadcast command BQ(pre);
2-4:   (slot, N)=ConvertResponse(Received strings);
2-5:   for (i=1; iN; i++) do
2-6:    ifi==1 do
2-7:     Broadcast command FQ(slot)
2-8:    else
2-9:     Broadcast command SQ
2-10:    end if
2-11:    left_ID=received string
2-12:    ifleft_ID collision do
2-13:     Generate the parameter pre and insert it into Qu
2-14:    else
2-15:     Obtain the corresponding tag ID
2-16:    end if
2-17:   end for}