40 #if PLATFORM_SUPPORTS_BUTTON_HAL 43 #include "dev/button-sensor.h" 46 #include "rpl-border-router.h" 51 #define LOG_MODULE "BR" 52 #define LOG_LEVEL LOG_LEVEL_INFO 54 void request_prefix(
void);
57 PROCESS(border_router_process,
"Border router process");
75 #if !PLATFORM_SUPPORTS_BUTTON_HAL 76 SENSORS_ACTIVATE(button_sensor);
79 LOG_INFO(
"RPL-Border router started\n");
86 LOG_INFO(
"Waiting for prefix\n");
91 print_local_addresses();
95 #if PLATFORM_SUPPORTS_BUTTON_HAL 98 if(ev == sensors_event && data == &button_sensor) {
100 LOG_INFO(
"Initiating global repair\n");
#define PROCESS(name, strname)
Declare a process.
int(* on)(void)
Turn the MAC layer on.
#define PROCESS_BEGIN()
Define the beginning of a process.
#define PROCESS_END()
Define the end of a process.
#define PROCESS_WAIT_EVENT_UNTIL(c)
Wait for an event to be posted to the process, with an extra condition.
#define PROCESS_PAUSE()
Yield the process for a short while.
void(* global_repair)(const char *str)
Triggers a global topology repair.
int(* off)(void)
Turn the MAC layer off.
#define CLOCK_SECOND
A second, measured in system clock time.
Routing driver header file
int etimer_expired(struct etimer *et)
Check if an event timer has expired.
#define PROCESS_YIELD()
Yield the currently running process.
PROCESS_THREAD(cc2538_rf_process, ev, data)
Implementation of the cc2538 RF driver process.
Header file for the logging system
void etimer_set(struct etimer *et, clock_time_t interval)
Set an event timer.