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:
adamdunkels 2010-02-23 18:38:05 +00:00
parent f10eedab3e
commit ca0417a923
11 changed files with 126 additions and 44 deletions

View file

@ -33,7 +33,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: polite.c,v 1.9 2009/03/12 21:58:21 adamdunkels Exp $
* $Id: polite.c,v 1.10 2010/02/23 18:38:05 adamdunkels Exp $
*/
/**
@ -79,6 +79,12 @@ recv(struct abc_conn *abc)
if(c->cb->recv) {
c->cb->recv(c);
}
}
/*---------------------------------------------------------------------------*/
static void
sent(struct abc_conn *c, int status, int num_tx)
{
}
/*---------------------------------------------------------------------------*/
static void
@ -97,7 +103,7 @@ send(void *ptr)
}
}
/*---------------------------------------------------------------------------*/
static const struct abc_callbacks abc = { recv };
static const struct abc_callbacks abc = { recv, sent };
/*---------------------------------------------------------------------------*/
void
polite_open(struct polite_conn *c, uint16_t channel,