mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
added test_rpl
This commit is contained in:
parent
f54436afd7
commit
573aaa9616
10
projects/test_rpl/Jamfile
Normal file
10
projects/test_rpl/Jamfile
Normal file
@ -0,0 +1,10 @@
|
||||
SubDir TOP projects test_rpl ;
|
||||
|
||||
Module test_rpl : main.c : 6lowpan auto_init uart0 posix_io ;
|
||||
|
||||
UseModule test_rpl ;
|
||||
UseModule cc110x_ng ;
|
||||
UseModule rpl ;
|
||||
UseModule 6lowpan ;
|
||||
UseModule vtimer ;
|
||||
UseModule auto_init ;
|
23
projects/test_rpl/main.c
Normal file
23
projects/test_rpl/main.c
Normal file
@ -0,0 +1,23 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <vtimer.h>
|
||||
#include <thread.h>
|
||||
#include "sys/net/sixlowpan/sixlowip.h"
|
||||
#include "sys/net/sixlowpan/sixlowpan.h"
|
||||
#include "sys/net/sixlowpan/rpl/rpl.h"
|
||||
|
||||
void main(void)
|
||||
{
|
||||
uint16_t root = 0x0001;
|
||||
ipv6_addr_t std_addr;
|
||||
uint16_t r_addr = root;
|
||||
ipv6_init_address(&std_addr, 0xABCD,0,0,0,0x1234,0xFFFF,0xFEDC,r_addr);
|
||||
sixlowpan_init(TRANSCEIVER_CC1100, r_addr, 0);
|
||||
rpl_init();
|
||||
if(root == 0x0001){
|
||||
rpl_init_root();
|
||||
}
|
||||
printf("RPL INIT FINISHED\n");
|
||||
while(1);
|
||||
}
|
||||
|
13
projects/test_rpl/tests/hello-world
Executable file
13
projects/test_rpl/tests/hello-world
Executable file
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/expect
|
||||
|
||||
set timeout 5
|
||||
|
||||
spawn pseudoterm $env(PORT)
|
||||
|
||||
expect {
|
||||
"Hello World!" {}
|
||||
timeout { exit 1 }
|
||||
}
|
||||
|
||||
puts "\nTest successful!\n"
|
||||
|
Loading…
Reference in New Issue
Block a user