Thông tin tài nguyên

ĐÁNH GIÁ CÁC GIAO THỨC CÂY TRUY VẤN DỰA TRÊN TRI THỨC VỚI CÁC PHÂN BỐ THẺ RFID KHÁC NHAU

hue-hujos-tt-8158.pdf · Phiên bản 1 · 17 trang

18
Bản gốc
Trang 10 · Đoạn 18Vị trí nguồn

Nguyễn Đức Nhật Quang và CS. Tập 134, Số 2A, 2025 118 3. do TraceTree(root, ‘’, 0) // Duyệt cây từ gốc 4. Transmit the command terminating a frame // Kết thúc khung 5. procedure TraceTree(n: the node, p: prefix, d: the depth) // Thủ tục TraceTree 6. q ← p + nS 7. if d < level and n has sub-tree then // d < level và có cây con 8. TraceTree(left sub-tree of n, q, d+1) // Nhánh trái 9. TraceTree(right sub-tree of n, q, d+1) // Nhánh phải 10. else 11. Transmit q 12. Receive tag response and detect the status // Nhận phản hồi thẻ 13. if collision and n has sub-tree then // Nếu có xung đột & có cây con 14. TraceTree(left sub-tree of n, q, d+1) // Nhánh trái 15. TraceTree(right sub-tree of n, q, d+1) // Nhánh phải 16. elseif readable then // Chỉ một thẻ trả lời 17. Retrieve the tag ID 18. end 19. level ← d if (no collision and level < 0) // Cập nhật level lần đầu 20. end 21. end tag procedure 1. Receive message m from the reader // Nhận m từ reader 2. while r != the command terminating a frame do // Chưa kết thúc khung 3. if r is a query then // r là truy vấn 4. if prefix(ID) == r then Transmit ID // Nếu prefix(ID)=r thì gửi ID 5. end 6. Receive message r from the reader // Nhận r mới 7. end