File: StandardBenchmarks.h

package info (click to toggle)
tinyos 2.1.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 47,476 kB
  • ctags: 36,607
  • sloc: ansic: 63,646; cpp: 14,974; java: 10,358; python: 5,215; makefile: 1,724; sh: 902; asm: 597; xml: 392; perl: 74; awk: 46
file content (272 lines) | stat: -rw-r--r-- 12,727 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
/** 
 * Standard Benchmark Database file
 * ------------------------------------------------------------------------
 * This is a no-modify file, keep it untouched.
 */


/* Throughput problems
 * ----------------------
 * 
 * In these problems, edges are present with continous message sending policies
 * meaning that motes try to send messages as fast as they can.
 * Such edges next to each other influence each other's behaviour.
 *
 * All of these benchmarks can be run with 4 motes (not all requires 4).
 */

#ifndef EXCLUDE_STANDARD_THROUGHPUT

/** One-edge throughput **/
_BMARK_START_(10)
  { 1, 2, NO_TIMER , { SEND_ON_INIT,  0, 0, 0, 0 }, NUM(INFINITE), NO_REPLY, START_MSG_ID }
_BMARK_END_

/** Two-edge throughput **/
_BMARK_START_(11)
  { 1, 2, NO_TIMER , { SEND_ON_INIT,  0, 0, 0, 0 }, NUM(INFINITE), NO_REPLY, START_MSG_ID },
  { 2, 1, NO_TIMER , { SEND_ON_INIT,  0, 0, 0, 0 }, NUM(INFINITE), NO_REPLY, START_MSG_ID }
_BMARK_END_

/** Three-edge, circle-style throughput **/
_BMARK_START_(12)
  { 1, 2, NO_TIMER , { SEND_ON_INIT,  0, 0, 0, 0 }, NUM(INFINITE), NO_REPLY, START_MSG_ID },
  { 2, 3, NO_TIMER , { SEND_ON_INIT,  0, 0, 0, 0 }, NUM(INFINITE), NO_REPLY, START_MSG_ID },
  { 3, 1, NO_TIMER , { SEND_ON_INIT,  0, 0, 0, 0 }, NUM(INFINITE), NO_REPLY, START_MSG_ID }
_BMARK_END_

/** One broadcast flooding mote **/
_BMARK_START_(13)
  { 4, ALL, NO_TIMER , { SEND_ON_INIT,  0, 0, 0, 0 }, NUM(INFINITE), NO_REPLY, START_MSG_ID }
_BMARK_END_

/** Two broadcast flooding motes **/
_BMARK_START_(14)
  { 4, ALL, NO_TIMER , { SEND_ON_INIT,  0, 0, 0, 0 }, NUM(INFINITE), NO_REPLY, START_MSG_ID },
  { 3, ALL, NO_TIMER , { SEND_ON_INIT,  0, 0, 0, 0 }, NUM(INFINITE), NO_REPLY, START_MSG_ID }
_BMARK_END_

/** Three broadcast flooding motes **/
_BMARK_START_(15)
  { 4, ALL, NO_TIMER , { SEND_ON_INIT,  0, 0, 0, 0 }, NUM(INFINITE), NO_REPLY, START_MSG_ID },
  { 3, ALL, NO_TIMER , { SEND_ON_INIT,  0, 0, 0, 0 }, NUM(INFINITE), NO_REPLY, START_MSG_ID },
  { 2, ALL, NO_TIMER , { SEND_ON_INIT,  0, 0, 0, 0 }, NUM(INFINITE), NO_REPLY, START_MSG_ID }
_BMARK_END_

/** Two parallel throughput links **/
_BMARK_START_(16)
  { 1, 2, NO_TIMER , { SEND_ON_INIT,  0, 0, 0, 0 }, NUM(INFINITE), NO_REPLY, START_MSG_ID },
  { 3, 4, NO_TIMER , { SEND_ON_INIT,  0, 0, 0, 0 }, NUM(INFINITE), NO_REPLY, START_MSG_ID }
_BMARK_END_

/** Two parallel throughput links, one with ACK request**/
_BMARK_START_(17)
  { 1, 2, NO_TIMER , { SEND_ON_INIT,  0, NEED_ACK, 0, 0 }, NUM(INFINITE), NO_REPLY, START_MSG_ID },
  { 3, 4, NO_TIMER , { SEND_ON_INIT,  0, 0, 0, 0 }, NUM(INFINITE), NO_REPLY, START_MSG_ID }
_BMARK_END_

/** One throughput link next to one broadcast flooding mote **/
_BMARK_START_(18)
  { 1, 2, NO_TIMER , { SEND_ON_INIT,  0, 0, 0, 0 }, NUM(INFINITE), NO_REPLY, START_MSG_ID },
  { 3, ALL, NO_TIMER , { SEND_ON_INIT,  0, 0, 0, 0 }, NUM(INFINITE), NO_REPLY, START_MSG_ID }
_BMARK_END_

/** Hidden terminal problem (2 motes flooding the same mote) **/
_BMARK_START_(19)
  { 1, 2, NO_TIMER , { SEND_ON_INIT,  0, 0, 0, 0 }, NUM(INFINITE), NO_REPLY, START_MSG_ID },
  { 3, 2, NO_TIMER , { SEND_ON_INIT,  0, 0, 0, 0 }, NUM(INFINITE), NO_REPLY, START_MSG_ID }
_BMARK_END_

/** Hidden terminal problem (3 motes flooding the same mote) **/
_BMARK_START_(20)
  { 1, 4, NO_TIMER , { SEND_ON_INIT,  0, 0, 0, 0 }, NUM(INFINITE), NO_REPLY, START_MSG_ID },
  { 2, 4, NO_TIMER , { SEND_ON_INIT,  0, 0, 0, 0 }, NUM(INFINITE), NO_REPLY, START_MSG_ID },
  { 3, 4, NO_TIMER , { SEND_ON_INIT,  0, 0, 0, 0 }, NUM(INFINITE), NO_REPLY, START_MSG_ID }
_BMARK_END_

#endif // EXCLUDE_STANDARD_THROUGHPUT

/* Collision problems
 * ----------------------
 * 
 * In these problems, communication is based on timers. Since all 4 timers that
 * are supported can be highly customized, different timer configurations could
 * result different scenarios.
 * If the sending windows match, collision occur, thus the name of these benchmarks.
 *
 * All of these benchmarks can be run with 4 motes.
 */ 

#ifndef EXCLUDE_STANDARD_COLLISION

/** Two parallel timer-based links **/
_BMARK_START_(30)
  { 1, 2, {TIMER(1), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID },
  { 3, 4, {TIMER(2), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID }
_BMARK_END_

/** Two parallel timer-based links, broadcasting **/
_BMARK_START_(31)
  { 4, ALL, {TIMER(1), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID },
  { 3, ALL, {TIMER(2), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID }
_BMARK_END_

/** Three parallel timer-based links, broadcasting **/
_BMARK_START_(32)
  { 4, ALL, {TIMER(1), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID },
  { 3, ALL, {TIMER(2), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID }, 
  { 2, ALL, {TIMER(3), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID }
_BMARK_END_

/** Three parallel timer-based links, direct links **/
_BMARK_START_(33)
  { 1, 2, {TIMER(1), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID },
  { 2, 3, {TIMER(2), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID },
  { 3, 4, {TIMER(3), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID }
_BMARK_END_

/** Three timer-based links having a common destination **/
_BMARK_START_(34)
  { 1, 4, {TIMER(1), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID },
  { 2, 4, {TIMER(2), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID },
  { 3, 4, {TIMER(3), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID }
_BMARK_END_

/** One timer-based link influenced by a parallel flooding link **/
_BMARK_START_(35)
  { 1, 2, {TIMER(1), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID },
  { 3, 4, NO_TIMER, { SEND_ON_INIT, 0, 0, 0, 0 }, NUM(INFINITE), NO_REPLY, START_MSG_ID }
_BMARK_END_

/** One timer-based link influenced by a parallel flooding link (broadcast) **/
_BMARK_START_(36)
  { 1, 2, {TIMER(1), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID },
  { 4, ALL, NO_TIMER, { SEND_ON_INIT, 0, 0, 0, 0 }, NUM(INFINITE), NO_REPLY, START_MSG_ID }
_BMARK_END_

#endif // EXCLUDE_STANDARD_COLLISION

/* Forwarding problems
 * ----------------------
 * 
 * In these problems, communication initiation is based on timers. Additionally, networks
 * are created such a way that messages are to be forwarded, so if any mote hears a message,
 * it should forward it on at least one link.
 *
 * All of these benchmarks can be run with 6 motes (not all requires 6).
 */ 

#ifndef EXCLUDE_STANDARD_FORWARDING

/** M2 forwards to M1 what it hears from M1 **/
_BMARK_START_(50)
  { 1, 2, {TIMER(1), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), REPLY_ON(1), START_MSG_ID },
  { 2, 1, NO_TIMER, { SEND_ON_REQ, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID }
_BMARK_END_

/** M2 forwards to M1 what it hears from M1. 
    Also, a flooding broadcast disturbance edge is present. **/
_BMARK_START_(51)
  { 1, 2, {TIMER(1), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), REPLY_ON(1), START_MSG_ID },
  { 2, 1, NO_TIMER, { SEND_ON_REQ, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID },
  { 4, ALL, NO_TIMER, { SEND_ON_INIT, 0, 0, 0, 0 }, NUM(INFINITE), NO_REPLY, START_MSG_ID }
_BMARK_END_

/** A message chain with 4 motes. M1 initiates, M2,M3 forwards to a sink mote, M4. **/
_BMARK_START_(52)
  { 1, 2, {TIMER(1), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), REPLY_ON(1), START_MSG_ID },
  { 2, 3, NO_TIMER, { SEND_ON_REQ, 0, 0, 0, 0 }, NUM(1), REPLY_ON(2), START_MSG_ID },
  { 3, 4, NO_TIMER, { SEND_ON_REQ, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID }
_BMARK_END_

/** A message chain with 6 motes. M1 initiates, M2,M3,M4,M5 forwards to a sink mote, M6. **/
_BMARK_START_(53)
  { 1, 2, {TIMER(1), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), REPLY_ON(1), START_MSG_ID },
  { 2, 3, NO_TIMER, { SEND_ON_REQ, 0, 0, 0, 0 }, NUM(1), REPLY_ON(2), START_MSG_ID },
  { 3, 4, NO_TIMER, { SEND_ON_REQ, 0, 0, 0, 0 }, NUM(1), REPLY_ON(3), START_MSG_ID },
  { 4, 5, NO_TIMER, { SEND_ON_REQ, 0, 0, 0, 0 }, NUM(1), REPLY_ON(4), START_MSG_ID },
  { 5, 6, NO_TIMER, { SEND_ON_REQ, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID }
_BMARK_END_

/** Two distinct, parallel forwarding chains: M1->M2->M3 and M4->M5->M6. **/
_BMARK_START_(54)
  { 1, 2, {TIMER(1), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), REPLY_ON(1), START_MSG_ID },
  { 2, 3, NO_TIMER, { SEND_ON_REQ, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID },
  { 4, 5, {TIMER(2), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), REPLY_ON(3), START_MSG_ID },
  { 5, 6, NO_TIMER, { SEND_ON_REQ, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID }
_BMARK_END_

/** A "message collector" binary tree:
    M1, M2 transmits to M4, M4 forwards these messages to M5.
    M3 also transmits to M5.
    M5 forwards those messages that are heared either from M4 or M3 to M6.    
 **/
_BMARK_START_(55)
  { 1, 4, {TIMER(1), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), REPLY_ON(3), START_MSG_ID },
  { 2, 4, {TIMER(2), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), REPLY_ON(3), START_MSG_ID },
  { 3, 5, {TIMER(3), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), REPLY_ON(4), START_MSG_ID },      
  { 4, 5, NO_TIMER, { SEND_ON_REQ, 0, 0, 0, 0 }, NUM(1), REPLY_ON(4), START_MSG_ID },
  { 5, 6, NO_TIMER, { SEND_ON_REQ, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID }
_BMARK_END_

/** A "noisy message collector" binary tree:
    M1, M2 transmits to M4, M4 forwards these messages to M5.
    M3 also transmits to M5.
    M6 acts as a disturbance mote, continously broadcasting.   
 **/
_BMARK_START_(56)
  { 1, 4, {TIMER(1), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), REPLY_ON(3), START_MSG_ID },
  { 2, 4, {TIMER(2), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), REPLY_ON(3), START_MSG_ID },
  { 3, 5, {TIMER(3), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID },
  { 4, 5, NO_TIMER, { SEND_ON_REQ, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID },
  { 6, ALL, NO_TIMER, { SEND_ON_INIT, 0, 0, 0, 0 }, NUM(INFINITE), NO_REPLY, START_MSG_ID }
_BMARK_END_

/** A near complete binary tree message collector network.
    There are three chains :  M1 -> M4 -> M6,  M2 -> M5 -> M6, and M3 -> M5 -> M6.
 **/
_BMARK_START_(57)
  { 1, 4, {TIMER(1), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), REPLY_ON(3), START_MSG_ID },
  { 2, 5, {TIMER(2), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), REPLY_ON(4), START_MSG_ID },
  { 3, 5, {TIMER(3), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), REPLY_ON(4), START_MSG_ID },
  { 4, 6, NO_TIMER, { SEND_ON_REQ, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID },
  { 5, 6, NO_TIMER, { SEND_ON_REQ, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID }
_BMARK_END_

/** A "message disseminator" binary tree:
    M6 transmits to M5 which duplicates these messages towards M4 and M3. M3 is a sink, while 
    M4 also forwards the messages to M1 and M2.
 **/
_BMARK_START_(58)
  { 6, 5, {TIMER(1), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), REPLY_ON(1) | REPLY_ON(2), START_MSG_ID },
  { 5, 4, NO_TIMER, { SEND_ON_REQ, 0, 0, 0, 0 }, NUM(1), REPLY_ON(3) | REPLY_ON(4), START_MSG_ID },
  { 5, 3, NO_TIMER, { SEND_ON_REQ, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID },      
  { 4, 1, NO_TIMER, { SEND_ON_REQ, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID },
  { 4, 2, NO_TIMER, { SEND_ON_REQ, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID }
_BMARK_END_

/** A "noisy message disseminator" binary tree:
    M5 sends messages to M4 and M3. M3 is a sink, while M4 forwards the messages to M1 and M2.
    M6 acts as a disturbance mote, continously broadcasting.
 **/
_BMARK_START_(59)
  { 5, 4, {TIMER(1), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), REPLY_ON(2) | REPLY_ON(3), START_MSG_ID },
  { 5, 3, {TIMER(2), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID },
  { 4, 1, NO_TIMER, { SEND_ON_REQ, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID },
  { 4, 2, NO_TIMER, { SEND_ON_REQ, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID },
  { 6, ALL, NO_TIMER, { SEND_ON_INIT, 0, 0, 0, 0 }, NUM(INFINITE), NO_REPLY, START_MSG_ID }
_BMARK_END_

/** A near complete binary tree message dissemination network.
    There are three chains :  M6 -> M4 -> M1,  M6 -> M5 -> M2, and M6 -> M5 -> M3.
 **/
_BMARK_START_(60)
  { 6, 4, {TIMER(1), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), REPLY_ON(2), START_MSG_ID },
  { 6, 5, {TIMER(2), 0}, { SEND_ON_TIMER, 0, 0, 0, 0 }, NUM(1), REPLY_ON(3) | REPLY_ON(4), START_MSG_ID },
  { 4, 1, NO_TIMER, { SEND_ON_REQ, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID },
  { 5, 2, NO_TIMER, { SEND_ON_REQ, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID }, 
  { 5, 3, NO_TIMER, { SEND_ON_REQ, 0, 0, 0, 0 }, NUM(1), NO_REPLY, START_MSG_ID } 
_BMARK_END_

#endif // EXCLUDE_STANDARD_FORWARDING