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/cooja-radio.h"
60#include "dev/button-sensor.h"
61#include "dev/pir-sensor.h"
62#include "dev/vib-sensor.h"
63#include "dev/moteid.h"
68#include "services/rpl-border-router/rpl-border-router.h"
69#if BUILD_WITH_ORCHESTRA
76#if NETSTACK_CONF_WITH_IPV6
82SIM_INTERFACE_NAME(moteid_interface);
83SIM_INTERFACE_NAME(vib_interface);
84SIM_INTERFACE_NAME(rs232_interface);
85SIM_INTERFACE_NAME(simlog_interface);
86SIM_INTERFACE_NAME(beep_interface);
87SIM_INTERFACE_NAME(radio_interface);
88SIM_INTERFACE_NAME(button_interface);
89SIM_INTERFACE_NAME(pir_interface);
90SIM_INTERFACE_NAME(clock_interface);
91SIM_INTERFACE_NAME(leds_interface);
92SIM_INTERFACE_NAME(cfs_interface);
93SIM_INTERFACE_NAME(eeprom_interface);
94SIM_INTERFACES(&vib_interface, &moteid_interface, &rs232_interface, &simlog_interface, &beep_interface, &radio_interface, &button_interface, &pir_interface, &clock_interface, &leds_interface, &cfs_interface, &eeprom_interface);
101void leds_arch_init(
void);
108 memset(&
addr, 0,
sizeof(linkaddr_t));
109#if NETSTACK_CONF_WITH_IPV6
110 for(
size_t i = 0; i <
sizeof(
uip_lladdr.addr); i += 2) {
111 addr.u8[i + 1] = simMoteID & 0xff;
112 addr.u8[i + 0] = simMoteID >> 8;
115 addr.u8[0] = simMoteID & 0xff;
116 addr.u8[1] = simMoteID >> 8;
150 while(simProcessRunValue-- > 0) {
156 if(simDontFallAsleep) {
157 simDontFallAsleep = 0;
158 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.
bool eeprom_init(void)
Initialize the EEPROM module.
void gpio_hal_init()
Initialise the GPIO HAL.
void linkaddr_set_node_addr(linkaddr_t *t)
Set the address of the current node.
void platform_main_loop()
The platform's main loop, if provided.
int process_run(void)
Run the system once - call poll handlers and process one event.
int 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)
Node-id (simple 16-bit identifiers) handling.
Header file for the Packet queue buffer management.
Generic serial I/O process header filer.
A shell back-end for the serial port.
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.
SENSORS & button_sensor
Exports global symbols for the sensor API.