Contiki-NG
rpl-timers.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2010, Swedish Institute of Computer Science.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. Neither the name of the Institute nor the names of its contributors
14 * may be used to endorse or promote products derived from this software
15 * without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * This file is part of the Contiki operating system.
30 *
31 */
32
33 /**
34 * \addtogroup rpl-lite
35 * @{
36 *
37 * \file
38 * Header file for rpl-timers module
39 * \author
40 * Joakim Eriksson <joakime@sics.se>, Nicolas Tsiftes <nvt@sics.se>,
41 * Simon DUquennoy <simon.duquennoy@inria.fr>
42 *
43 */
44
45#ifndef RPL_TIMERS_H
46#define RPL_TIMERS_H
47
48/********** Includes **********/
49
50#include "net/routing/rpl-lite/rpl.h"
51
52/********** Public functions **********/
53
54/**
55 * Schedule periodic DIS with a random delay based on RPL_DIS_INTERVAL, until
56 * we join a DAG.
57*/
59
60/**
61 * Cancel scheduled leaving if any
62*/
64
65/**
66 * Schedule leaving after RPL_DELAY_BEFORE_LEAVING
67*/
69
70/**
71 * Initialize rpl-timers module
72*/
73void rpl_timers_init(void);
74
75/**
76 * Stop all timers related to the DAG
77*/
79
80/**
81 * Reset DIO Trickle timer
82 *
83 * \param str A textual description of caused the DIO timer reset
84*/
85void rpl_timers_dio_reset(const char *str);
86
87/**
88 * Schedule unicast DIO with no delay
89*/
91
92/**
93 * Schedule a DAO with random delay based on RPL_DAO_DELAY
94*/
96
97/**
98 * Schedule a DAO-ACK with no delay
99*/
100void rpl_timers_schedule_dao_ack(uip_ipaddr_t *target, uint16_t sequence);
101
102/**
103 * Let the rpl-timers module know that the last DAO was ACKed
104*/
106
107/**
108 * Schedule probing with delay RPL_PROBING_DELAY_FUNC()
109*/
111
112/**
113 * Schedule probing within a few seconds
114*/
116
117/**
118 * Schedule a state update ASAP. Useful to force an update from a context
119 * where updating directly would be unsafe.
120*/
122
123/**
124 * Cancelled any scheduled state update.
125*/
127
128 /** @} */
129
130#endif /* RPL_TIMERS_H */
void rpl_timers_stop_dag_timers(void)
Stop all timers related to the DAG.
Definition: rpl-timers.c:538
void rpl_schedule_probing(void)
Schedule probing with delay RPL_PROBING_DELAY_FUNC()
void rpl_schedule_probing_now(void)
Schedule probing within a few seconds.
void rpl_timers_notify_dao_ack(void)
Let the rpl-timers module know that the last DAO was ACKed.
void rpl_timers_unschedule_state_update(void)
Cancelled any scheduled state update.
Definition: rpl-timers.c:555
void rpl_timers_schedule_dao(void)
Schedule a DAO with random delay based on RPL_DAO_DELAY.
Definition: rpl-timers.c:263
void rpl_timers_schedule_leaving(void)
Schedule leaving after RPL_DELAY_BEFORE_LEAVING.
Definition: rpl-timers.c:493
void rpl_timers_dio_reset(const char *str)
Reset DIO Trickle timer.
Definition: rpl-timers.c:150
void rpl_timers_init(void)
Initialize rpl-timers module.
Definition: rpl-timers.c:505
void rpl_timers_schedule_dao_ack(uip_ipaddr_t *target, uint16_t sequence)
Schedule a DAO-ACK with no delay.
void rpl_timers_unschedule_leaving(void)
Cancel scheduled leaving if any.
Definition: rpl-timers.c:483
void rpl_timers_schedule_periodic_dis(void)
Schedule periodic DIS with a random delay based on RPL_DIS_INTERVAL, until we join a DAG.
Definition: rpl-timers.c:93
void rpl_timers_schedule_state_update(void)
Schedule a state update ASAP.
Definition: rpl-timers.c:563
void rpl_timers_schedule_unicast_dio(rpl_nbr_t *target)
Schedule unicast DIO with no delay.
Definition: rpl-timers.c:208
All information related to a RPL neighbor.
Definition: rpl-types.h:136