|
Algorithm 2: The adaptive logging approach |
-
1:
For each time
Do
-
2:
The trust of each node at time is computed by the Sink;
-
3:
For each node
Do
-
4:
Case
-
5:
// is the logging probability of
-
6:
// is a constant
-
7:
// is a constant
-
8:
End For;
-
9:
For each packet received by node
Do;
-
10:
node logs marking tuples of packets with probability ;
-
11:
End For;
-
12:
//next time
-
13:
End For
|