Research Article
A Fast RFID Tag Anticollision Algorithm for Dynamic Arrival Scenarios Based on First-Come-First-Serve
Algorithm 2
Tag procedure pseudo code of DAS-DFSA.
(1) | IsIdentified = false; | (2) | SIDt = 0; | (3) | TagSate = NewArrival; | (4) | while (!IsIdentified) | (5) | { | (6) | receive reader instruction;/ Includes Start, IndicateWait, IndicateArrival, Ack et al. / | (7) | if (Instruction is Start) begin | (8) | SIDt = Generate random slot number;/ SIDt between 0 and SIDw. / | (9) | Set TagSate to Arrival; | (10) | end | (11) | else if (Instruction is IndicateWait) begin | (12) | if (SIDt = = SIDc and TagSate is Wait) | (13) | response RN16; | (14) | else if (Instruction is IndicateArrival) begin | (15) | if (SIDt = = SIDc and (TagSate is Wait or Arrival)) | (16) | response RN16; | (17) | else if (TagSate is NewArrival) begin | (18) | SIDt = Generate random slot number;/ SIDt between SIDl + 1 and L. / | (19) | Set TagSate to Arrival; | (20) | if(SIDt = = SIDc) | (21) | response RN16; | (22) | end | (23) | end | (24) | else if (Instruction is Ack) | (25) | if (RN16 is itself) begin | (26) | Set IsIdentified to ture; | (27) | Set TagSate to Identified; | (28) | end | (29) | end | (30) | } |
|