Added the MAC layer callback functionality so that the Rime network layer gets information from the MAC about the status of sent packets: were they successfully transmitted, or was there a collisions? How many retries were there?
This commit is contained in:
parent
f10eedab3e
commit
ca0417a923
11 changed files with 126 additions and 44 deletions
|
@ -36,7 +36,7 @@
|
|||
*
|
||||
* Author: Adam Dunkels <adam@sics.se>
|
||||
*
|
||||
* $Id: abc.c,v 1.19 2009/03/12 21:58:20 adamdunkels Exp $
|
||||
* $Id: abc.c,v 1.20 2010/02/23 18:38:05 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -83,7 +83,7 @@ abc_send(struct abc_conn *c)
|
|||
PRINTF("%d.%d: abc: abc_send on channel %d\n",
|
||||
rimeaddr_node_addr.u8[0],rimeaddr_node_addr.u8[1],
|
||||
c->channel.channelno);
|
||||
return chameleon_output(&c->channel);
|
||||
return rime_output(&c->channel);
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
|
@ -97,5 +97,18 @@ abc_input(struct channel *channel)
|
|||
c->u->recv(c);
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
abc_sent(struct channel *channel, int status, int num_tx)
|
||||
{
|
||||
struct abc_conn *c = (struct abc_conn *)channel;
|
||||
PRINTF("%d.%d: abc: abc_sent on channel %d\n",
|
||||
rimeaddr_node_addr.u8[0],rimeaddr_node_addr.u8[1],
|
||||
channel->channelno);
|
||||
|
||||
if(c->u->sent) {
|
||||
c->u->sent(c, status, num_tx);
|
||||
}
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
/** @} */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue