TSCH: burst mode is in the standard, remove custom link option

This commit is contained in:
Simon Duquennoy 2018-05-12 11:20:14 -07:00
parent 0153566b92
commit 9569519bbe
4 changed files with 5 additions and 12 deletions

View File

@ -317,14 +317,9 @@
#define TSCH_SCHEDULE_WITH_6TISCH_MINIMAL (!(BUILD_WITH_ORCHESTRA))
#endif
/* Add burst mode to 6TiSCH minimal schedule */
#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_WITH_6TISCH_MINIMAL_WITH_BURST 0
#endif
/* Set an upper bound on burst length */
/* Set an upper bound on burst length. Set to 0 to never set the frame pending
* bit, i.e., never trigger a burst. Note that receiver-side support for burst
* is always enabled, as it is part of IEEE 802.1.5.4-2015 (Section 7.2.1.3)*/
#ifdef TSCH_CONF_BURST_MAX_LEN
#define TSCH_BURST_MAX_LEN TSCH_CONF_BURST_MAX_LEN
#else

View File

@ -53,7 +53,6 @@
#define LINK_OPTION_RX 2
#define LINK_OPTION_SHARED 4
#define LINK_OPTION_TIME_KEEPING 8
#define LINK_OPTION_BURST 16
/* Default IEEE 802.15.4e hopping sequences, obtained from https://gist.github.com/twatteyne/2e22ee3c1a802b685695 */
/* 16 channels, sequence length 16 */

View File

@ -423,8 +423,7 @@ tsch_schedule_create_minimal(void)
* but is required according to 802.15.4e if also used for EB transmission.
* 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_WITH_6TISCH_MINIMAL_WITH_BURST ? LINK_OPTION_BURST : 0),
(LINK_OPTION_RX | LINK_OPTION_TX | LINK_OPTION_SHARED | LINK_OPTION_TIME_KEEPING),
LINK_TYPE_ADVERTISING, &tsch_broadcast_address,
0, 0);
}

View File

@ -477,7 +477,7 @@ PT_THREAD(tsch_tx_slot(struct pt *pt, struct rtimer *t))
is_broadcast = current_neighbor->is_broadcast;
/* Unicast. More packets in queue for the neighbor? */
burst_link_requested = 0;
if(!is_broadcast && (current_link->link_options & LINK_OPTION_BURST)
if(!is_broadcast
&& tsch_current_burst_count + 1 < TSCH_BURST_MAX_LEN
&& tsch_queue_packet_count(&current_neighbor->addr) > 1) {
burst_link_requested = 1;