44 #include "contiki-net.h" 49 #include "dev/watchdog.h" 54 #include "services/rpl-border-router/rpl-border-router.h" 65 #define LOG_MODULE "Main" 66 #define LOG_LEVEL LOG_LEVEL_MAIN 69 #if PLATFORM_MAIN_ACCEPTS_ARGS 70 main(
int argc,
char **argv)
88 #if STACK_CHECK_ENABLED 100 LOG_INFO(
"Starting " CONTIKI_VERSION_STRING
"\n");
101 LOG_DBG(
"TARGET=%s", CONTIKI_TARGET_STRING);
102 #ifdef CONTIKI_BOARD_STRING 103 LOG_DBG_(
", BOARD=%s", CONTIKI_BOARD_STRING);
106 LOG_INFO(
"- Routing: %s\n", NETSTACK_ROUTING.name);
107 LOG_INFO(
"- Net: %s\n", NETSTACK_NETWORK.name);
108 LOG_INFO(
"- MAC: %s\n", NETSTACK_MAC.name);
109 LOG_INFO(
"- 802.15.4 PANID: 0x%04x\n", IEEE802154_PANID);
110 #if MAC_CONF_WITH_TSCH 111 LOG_INFO(
"- 802.15.4 TSCH default hopping sequence length: %u\n", (
unsigned)
sizeof(TSCH_DEFAULT_HOPPING_SEQUENCE));
116 LOG_INFO(
"Node ID: %u\n", node_id);
117 LOG_INFO(
"Link-layer address: ");
121 #if NETSTACK_CONF_WITH_IPV6 127 lladdr = uip_ds6_get_link_local(-1);
128 LOG_INFO(
"Tentative link-local IPv6 address: ");
129 LOG_INFO_6ADDR(lladdr != NULL ? &lladdr->ipaddr : NULL);
136 #if BUILD_WITH_RPL_BORDER_ROUTER 137 rpl_border_router_init();
138 LOG_DBG(
"With RPL Border Router\n");
141 #if BUILD_WITH_ORCHESTRA 143 LOG_DBG(
"With Orchestra\n");
148 LOG_DBG(
"With Shell\n");
153 LOG_DBG(
"With CoAP\n");
158 LOG_DBG(
"With SNMP\n");
161 #if BUILD_WITH_SIMPLE_ENERGEST 165 #if BUILD_WITH_TSCH_CS 170 autostart_start(autostart_processes);
174 #if PLATFORM_PROVIDES_MAIN_LOOP uip_lladdr_t uip_lladdr
Host L2 address.
SNMP Implementation of the process
Header file for the energy estimation mechanism
void platform_main_loop()
The platform's main loop, if provided.
void platform_init_stage_two()
Stage 2 of platform driver initialisation.
CoAP engine implementation.
void platform_idle()
The platform's idle/sleep function.
void ctimer_init(void)
Initialize the callback timer library.
Node-id (simple 16-bit identifiers) handling.
void snmp_init()
Initializes the SNMP engine.
A shell back-end for the serial port
void serial_shell_init(void)
Initializes Serial Shell module.
linkaddr_t linkaddr_node_addr
The link-layer address of the node.
void node_id_init(void)
Initialize the node ID.
#define IEEE802154_DEFAULT_CHANNEL
The default channel for IEEE 802.15.4 networks.
void process_init(void)
Initialize the process module.
void tsch_cs_adaptations_init(void)
Initializes the TSCH hopping sequence selection module.
void watchdog_start(void)
Starts the WDT in watchdog mode if enabled by user configuration, maximum interval.
A process that periodically prints out the time spent in radio tx, radio rx, total time and duty cycle.
Header file for the Packet queue buffer management
Unicast address structure.
void simple_energest_init(void)
Initialize the deployment module.
void stack_check_init(void)
Initialize the stack area with a known pattern.
void platform_init_stage_three()
Final stage of platform driver initialisation.
void watchdog_init(void)
Initialisation function for the WDT.
Stack checker library header file.
Header file for TSCH adaptive channel selection
void watchdog_periodic(void)
Writes the WDT clear sequence.
Header file for the logging system
void rtimer_init(void)
Initialize the real-time scheduler.
int process_run(void)
Run the system once - call poll handlers and process one event.
void clock_init(void)
Arch-specific implementation of clock_init for the cc2538.
void platform_init_stage_one(void)
Basic (Stage 1) platform driver initialisation.
void process_start(struct process *p, process_data_t data)
Start a process.