Research Article
Merged Search Algorithms for Radio Frequency Identification Anticollision
Algorithm 1
Pseudo codes of the Binary Search Tree.
| binary search tree initialize and arbitrate | | main() | |
{
| | Initialize: BST = null; | | | for each tag existing | | { | | BST_insert (BST,D1); | | | BST_arbitration (BST,D1); | | | | binary search tree initialize | | BST insert (BST:a binary search tree,Da:the ath bit of tagID) | |
{
| | if () then return tag; | | | if () then { | | ; | | BST_insert (left_subtree of BST,Da); | | } | | if () then | | ; | | BST_insert (right_subtree of BST,Da); | | | } | | | binary search tree arbitrate | | BST_arbitration (BST:a binary search tree,Da:the ath bit of tagID) | | { | | if (collision happened at Da) | | then { | | ; | | BST_arbitration (left_subtree of BST,Da); | | BST_arbitration (right_subtree of BST,Da); | | | else ifentify the tagID; | | |
}
|
|