44#include "sys/cooja_mt.h"
48#define LOG_MODULE "Cooja"
49#define LOG_LEVEL LOG_LEVEL_MAIN
51#include "lib/random.h"
52#include "lib/simEnvChange.h"
59#include "dev/button-sensor.h"
60#include "dev/pir-sensor.h"
61#include "dev/vib-sensor.h"
62#include "dev/moteid.h"
66#if NETSTACK_CONF_WITH_IPV6
72SENSORS(&pir_sensor, &vib_sensor);
76void leds_arch_init(
void);
78char simDontFallAsleep = 0;
80int simProcessRunValue;
82clock_time_t simEtimerNextExpirationTime;
89 memset(&
addr, 0,
sizeof(linkaddr_t));
90#if NETSTACK_CONF_WITH_IPV6
91 for(
size_t i = 0; i <
sizeof(
uip_lladdr.addr); i += 2) {
92 addr.u8[i + 1] = simMoteID & 0xff;
93 addr.u8[i + 0] = simMoteID >> 8;
96 addr.u8[0] = simMoteID & 0xff;
97 addr.u8[1] = simMoteID >> 8;
128 while(simProcessRunValue-- > 0) {
134 if(simDontFallAsleep) {
135 simDontFallAsleep = 0;
136 simProcessRunValue = 1;
Default definitions of C compiler quirk work-arounds.
Header file for the GPIO HAL.
void platform_init_stage_three()
Final stage of platform driver initialisation.
void platform_init_stage_one(void)
Basic (Stage 1) platform driver initialisation.
void platform_init_stage_two()
Stage 2 of platform driver initialisation.
void gpio_hal_init()
Initialise the GPIO HAL.
static void linkaddr_set_node_addr(linkaddr_t *addr)
Set the address of the current node.
void platform_main_loop()
The platform's main loop, if provided.
process_num_events_t process_run(void)
Run the system once - call poll handlers and process one event.
process_num_events_t process_nevents(void)
Number of events waiting to be processed.
uip_lladdr_t uip_lladdr
Host L2 address.
Header file for the logging system.
Include file for the Contiki low-layer network stack (NETSTACK)
Header file for the Packet queue buffer management.
Generic serial I/O process header filer.
Header file for IPv6-related data structures.
static uip_ds6_addr_t * addr
Pointer to a nbr cache entry.
Header file for the uIP TCP/IP stack.