#include "contiki.h"
#include "lib/random.h"
#include "sys/ctimer.h"
#include "sys/etimer.h"
#include "net/ip/uip.h"
#include "net/ipv6/uip-ds6.h"
#include "sys/energest.h"
#include "simple-udp.h"
#include "sys/compower.h"
#include <stdio.h>
#include <string.h>
Macros | |
#define | SEND_INTERVAL (5 * CLOCK_SECOND) |
#define | SEND_TIME (random_rand() % (SEND_INTERVAL)) |
#define | UDP_PORT 1234 |
Functions | |
PROCESS (broadcast_example_process,"UDP broadcast example process") | |
PROCESS_THREAD (broadcast_example_process, ev, data) | |
static void | receiver (struct simple_udp_connection *c, const uip_ipaddr_t *sender_addr, uint16_t sender_port, const uip_ipaddr_t *receiver_addr, uint16_t receiver_port, const uint8_t *data, uint16_t datalen) |
Variables | |
static struct simple_udp_connection | broadcast_connection |
AUTOSTART_PROCESSES & | broadcast_example_process |
static uip_ds6_addr_t * | lladdr |
static uint16_t | mynodeid |
#define SEND_INTERVAL (5 * CLOCK_SECOND) |
Referenced by PROCESS_THREAD().
#define SEND_TIME (random_rand() % (SEND_INTERVAL)) |
#define UDP_PORT 1234 |
Referenced by PROCESS_THREAD().
PROCESS | ( | broadcast_example_process | , |
"UDP broadcast example process" | |||
) |
PROCESS_THREAD | ( | broadcast_example_process | , |
ev | , | ||
data | |||
) |
References addr, broadcast_connection, compower_idle_activity, count, energest_flush(), ENERGEST_TYPE_CPU, ENERGEST_TYPE_LISTEN, ENERGEST_TYPE_LPM, energest_type_time(), ENERGEST_TYPE_TRANSMIT, etimer_expired(), etimer_reset(), etimer_set(), uip_ds6_addr::ipaddr, compower_activity::listen, listen(), mynodeid, NULL, printf, PROCESS_BEGIN, PROCESS_END, PROCESS_WAIT_EVENT_UNTIL, receiver(), SEND_INTERVAL, simple_udp_register(), simple_udp_sendto(), transmit(), compower_activity::transmit, uip_ip6addr_t::u8, UDP_PORT, uip_create_linklocal_allnodes_mcast, and uip_ds6_get_link_local().
|
static |
References printf, and sent_packets.
Referenced by do_event(), PROCESS_THREAD(), and uip_over_mesh_send().
|
static |
Referenced by PROCESS_THREAD().
AUTOSTART_PROCESSES& broadcast_example_process |
|
static |
|
static |
Referenced by PROCESS_THREAD().