|
Algorithm 3 Sensor Data Feedback
|
| X ← a sensor node in the query window |
| queryWindow ← the query window |
| L ← the hierarchical level of X’s PCH in the query window input by the user |
| Depth ← the depth of the quadtree structure |
| GetDataOfRegion(queryWindow, L, Depth){ |
| Begin |
| if (X is a CH) |
| if (0<Level<Depth-1) |
then begin
Step1. Collects and aggregates the required sensing data from CMs;
Step2. Aggregates the required sensing data by the algorithm in Section 3.4;
Step3. Uses PCH selection algorithm to calculate the level = L PCH;
Step4. Calculates the routing to the level = L PCH;
Step5. Sends the data to higher level PCH by formula (4)&(5) until level = L PCH receives the data packet;
|
| end |
| if (Level =Depth-1) |
| then begin
|
| end |
| end |
| else begin |
|
| end |
| end |
| } |