mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-23 01:29:33 +00:00
Added a packetbuf flag that indicates if the link layer acks should be used or not
This commit is contained in:
parent
798f1c63bd
commit
3c735fcea4
@ -28,7 +28,7 @@
|
||||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: contikimac.c,v 1.36 2010/04/26 22:41:50 nifi Exp $
|
||||
* $Id: contikimac.c,v 1.37 2010/04/30 07:25:51 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -113,9 +113,9 @@ struct announcement_msg {
|
||||
|
||||
#define MAX_PHASE_STROBE_TIME RTIMER_ARCH_SECOND / 20
|
||||
|
||||
#define CCA_COUNT_MAX 2
|
||||
#define CCA_CHECK_TIME RTIMER_ARCH_SECOND / 8192 //- RTIMER_ARCH_SECOND / 5000
|
||||
#define CCA_SLEEP_TIME RTIMER_ARCH_SECOND / 2000 //- RTIMER_ARCH_SECOND / 5000 //+ CCA_CHECK_TIME
|
||||
#define CCA_COUNT_MAX 2
|
||||
#define CCA_CHECK_TIME RTIMER_ARCH_SECOND / 8192
|
||||
#define CCA_SLEEP_TIME RTIMER_ARCH_SECOND / 2000
|
||||
#define CHECK_TIME (CCA_COUNT_MAX * (CCA_CHECK_TIME + CCA_SLEEP_TIME))
|
||||
|
||||
#define STROBE_TIME (CYCLE_TIME + 2 * CHECK_TIME)
|
||||
@ -621,6 +621,7 @@ send_packet(mac_callback_t mac_callback, void *mac_callback_ptr)
|
||||
if(is_streaming) {
|
||||
packetbuf_set_attr(PACKETBUF_ATTR_PENDING, 1);
|
||||
}
|
||||
packetbuf_set_attr(PACKETBUF_ATTR_MAC_ACK, 1);
|
||||
|
||||
#if WITH_CONTIKIMAC_HEADER
|
||||
hdrlen = packetbuf_totlen();
|
||||
|
@ -26,7 +26,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: framer-802154.c,v 1.10 2010/04/08 09:32:56 adamdunkels Exp $
|
||||
* $Id: framer-802154.c,v 1.11 2010/04/30 07:25:51 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -93,7 +93,7 @@ create(void)
|
||||
if(rimeaddr_cmp(packetbuf_addr(PACKETBUF_ADDR_RECEIVER), &rimeaddr_null)) {
|
||||
params.fcf.ack_required = 0;
|
||||
} else {
|
||||
params.fcf.ack_required = 1; //packetbuf_attr(PACKETBUF_ATTR_RELIABLE);
|
||||
params.fcf.ack_required = packetbuf_attr(PACKETBUF_ATTR_MAC_ACK);
|
||||
}
|
||||
params.fcf.panid_compression = 0;
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
||||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: packetbuf.h,v 1.10 2010/04/08 09:46:30 adamdunkels Exp $
|
||||
* $Id: packetbuf.h,v 1.11 2010/04/30 07:25:51 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -345,6 +345,7 @@ enum {
|
||||
PACKETBUF_ATTR_TRANSMIT_TIME,
|
||||
PACKETBUF_ATTR_MAX_MAC_TRANSMISSIONS,
|
||||
PACKETBUF_ATTR_MAC_SEQNO,
|
||||
PACKETBUF_ATTR_MAC_ACK,
|
||||
|
||||
/* Scope 1 attributes: used between two neighbors only. */
|
||||
PACKETBUF_ATTR_RELIABLE,
|
||||
|
Loading…
Reference in New Issue
Block a user