Stubborn timer now configurable on a per-transmission basis.
This commit is contained in:
parent
af43f26ed2
commit
c0d3b9111a
|
@ -33,7 +33,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: suc.c,v 1.9 2007/03/31 18:31:29 adamdunkels Exp $
|
* $Id: suc.c,v 1.10 2007/05/22 20:57:20 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -111,7 +111,8 @@ suc_set_timer(struct suc_conn *c, clock_time_t t)
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
int
|
int
|
||||||
suc_send_stubborn(struct suc_conn *c, rimeaddr_t *receiver)
|
suc_send_stubborn(struct suc_conn *c, rimeaddr_t *receiver,
|
||||||
|
clock_time_t rxmittime)
|
||||||
{
|
{
|
||||||
if(c->buf != NULL) {
|
if(c->buf != NULL) {
|
||||||
queuebuf_free(c->buf);
|
queuebuf_free(c->buf);
|
||||||
|
@ -121,7 +122,7 @@ suc_send_stubborn(struct suc_conn *c, rimeaddr_t *receiver)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
rimeaddr_copy(&c->receiver, receiver);
|
rimeaddr_copy(&c->receiver, receiver);
|
||||||
ctimer_set(&c->t, CLOCK_SECOND, send, c);
|
ctimer_set(&c->t, rxmittime, send, c);
|
||||||
|
|
||||||
PRINTF("%d.%d: suc_send_stubborn to %d.%d\n",
|
PRINTF("%d.%d: suc_send_stubborn to %d.%d\n",
|
||||||
rimeaddr_node_addr.u8[0],rimeaddr_node_addr.u8[1],
|
rimeaddr_node_addr.u8[0],rimeaddr_node_addr.u8[1],
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: suc.h,v 1.7 2007/03/31 18:31:29 adamdunkels Exp $
|
* $Id: suc.h,v 1.8 2007/05/22 20:57:20 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -81,7 +81,8 @@ void suc_open(struct suc_conn *c, u16_t channel,
|
||||||
const struct suc_callbacks *u);
|
const struct suc_callbacks *u);
|
||||||
void suc_close(struct suc_conn *c);
|
void suc_close(struct suc_conn *c);
|
||||||
|
|
||||||
int suc_send_stubborn(struct suc_conn *c, rimeaddr_t *receiver);
|
int suc_send_stubborn(struct suc_conn *c, rimeaddr_t *receiver,
|
||||||
|
clock_time_t rxmittime);
|
||||||
void suc_cancel(struct suc_conn *c);
|
void suc_cancel(struct suc_conn *c);
|
||||||
|
|
||||||
int suc_send(struct suc_conn *c, rimeaddr_t *receiver);
|
int suc_send(struct suc_conn *c, rimeaddr_t *receiver);
|
||||||
|
|
Loading…
Reference in a new issue