RPL BR: rework such as the main .c file defines its own process
This commit is contained in:
parent
070b493391
commit
89c4f5e509
@ -32,11 +32,28 @@
|
||||
|
||||
#include "contiki.h"
|
||||
|
||||
PROCESS_NAME(border_router_process);
|
||||
/* Log configuration */
|
||||
#include "sys/log.h"
|
||||
#define LOG_MODULE "RPL BR"
|
||||
#define LOG_LEVEL LOG_LEVEL_INFO
|
||||
|
||||
/* Declare and auto-start this file's process */
|
||||
PROCESS(contiki_ng_br, "Contiki-NG Border Router");
|
||||
AUTOSTART_PROCESSES(&contiki_ng_br);
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
PROCESS_THREAD(contiki_ng_br, ev, data)
|
||||
{
|
||||
PROCESS_BEGIN();
|
||||
|
||||
PROCESS_NAME(border_router_process);
|
||||
process_start(&border_router_process, NULL);
|
||||
#if BORDER_ROUTER_CONF_WEBSERVER
|
||||
PROCESS_NAME(webserver_nogui_process);
|
||||
AUTOSTART_PROCESSES(&border_router_process, &webserver_nogui_process);
|
||||
#else /* BORDER_ROUTER_CONF_WEBSERVER */
|
||||
AUTOSTART_PROCESSES(&border_router_process);
|
||||
process_start(&webserver_nogui_process, NULL);
|
||||
#endif /* BORDER_ROUTER_CONF_WEBSERVER */
|
||||
|
||||
LOG_INFO("Contiki-NG Border Router started\n");
|
||||
|
||||
PROCESS_END();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user