TSCH burst mode: bounded burst lengths
This commit is contained in:
parent
d3b8b80b28
commit
3fe846dbad
@ -318,10 +318,17 @@
|
||||
#endif
|
||||
|
||||
/* Add burst mode to 6TiSCH minimal schedule */
|
||||
#ifdef TSCH_SCHEDULE_CONF_WITH_6TISCH_MINIMAL_WITH_BURST
|
||||
#define TSCH_SCHEDULE_WITH_6TISCH_MINIMAL_WITH_BURST TSCH_SCHEDULE_CONF_WITH_6TISCH_MINIMAL_WITH_BURST
|
||||
#ifdef TSCH_CONF_WITH_6TISCH_MINIMAL_WITH_BURST
|
||||
#define TSCH_WITH_6TISCH_MINIMAL_WITH_BURST TSCH_CONF_WITH_6TISCH_MINIMAL_WITH_BURST
|
||||
#else
|
||||
#define TSCH_SCHEDULE_WITH_6TISCH_MINIMAL_WITH_BURST 0
|
||||
#define TSCH_WITH_6TISCH_MINIMAL_WITH_BURST 0
|
||||
#endif
|
||||
|
||||
/* Set an upper bound on burst length */
|
||||
#ifdef TSCH_CONF_BURST_MAX_LEN
|
||||
#define TSCH_BURST_MAX_LEN TSCH_CONF_BURST_MAX_LEN
|
||||
#else
|
||||
#define TSCH_BURST_MAX_LEN 32
|
||||
#endif
|
||||
|
||||
/* 6TiSCH Minimal schedule slotframe length */
|
||||
|
@ -424,7 +424,7 @@ tsch_schedule_create_minimal(void)
|
||||
* Timeslot: 0, channel offset: 0. */
|
||||
tsch_schedule_add_link(sf_min,
|
||||
LINK_OPTION_RX | LINK_OPTION_TX | LINK_OPTION_SHARED | LINK_OPTION_TIME_KEEPING
|
||||
| (TSCH_SCHEDULE_WITH_6TISCH_MINIMAL_WITH_BURST ? LINK_OPTION_BURST : 0),
|
||||
| (TSCH_WITH_6TISCH_MINIMAL_WITH_BURST ? LINK_OPTION_BURST : 0),
|
||||
LINK_TYPE_ADVERTISING, &tsch_broadcast_address,
|
||||
0, 0);
|
||||
}
|
||||
|
@ -476,6 +476,7 @@ PT_THREAD(tsch_tx_slot(struct pt *pt, struct rtimer *t))
|
||||
/* Unicast. More packets in queue for the neighbor? */
|
||||
burst_link_requested = 0;
|
||||
if(!is_broadcast && (current_link->link_options & LINK_OPTION_BURST)
|
||||
&& tsch_current_burst_count + 1 < TSCH_BURST_MAX_LEN
|
||||
&& tsch_queue_packet_count(¤t_neighbor->addr) > 1) {
|
||||
burst_link_requested = 1;
|
||||
tsch_packet_set_frame_pending(packet, packet_len);
|
||||
|
Loading…
Reference in New Issue
Block a user