Skip to content

Commit 92cf961

Browse files
committed
Sample Code to test Neighbor Discovery
1 parent 99e592f commit 92cf961

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
COMPONENT=TestNDAppC
2+
include $(MAKERULES)
3+
CFLAGS += -DIN6_NO_GLOBAL -DLIB6LOWPAN_HC_VERSION=-1
4+
CFLAGS += -DNODE_HOST
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/** Test the link-local communication in the blip stack
2+
*/
3+
configuration TestNDAppC {
4+
5+
} implementation {
6+
components MainC, LedsC;
7+
components TestNDC;
8+
components NDC;
9+
10+
TestNDC.Boot -> MainC;
11+
TestNDC.SplitControl -> NDC;
12+
TestNDC.Leds -> LedsC;
13+
14+
15+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
3+
#include <lib6lowpan/ip.h>
4+
5+
module TestNDC {
6+
uses {
7+
interface Boot;
8+
interface SplitControl;
9+
interface Leds;
10+
}
11+
} implementation {
12+
13+
event void Boot.booted() {
14+
call SplitControl.start();
15+
16+
}
17+
18+
event void SplitControl.startDone(error_t e) {
19+
call Leds.led0On();
20+
}
21+
22+
event void SplitControl.stopDone(error_t e) {}
23+
24+
25+
}

0 commit comments

Comments
 (0)