# 3 MSF: A Multi-Modal Adaptation of the 6 TiSCH Minimal Scheduling Function for the Industrial IoT
## 2 IPv6 over the TSCH Mode of IEEE 802.15.4
### 6 TiSCH Architecture Basics
#### 2.1.2 The Link Layer  
TSCH is the MAC protocol of 6 TiSCH. TSCH requires nodes to synchronize with a slotframe that repeats periodically, every sub-division of which, referred to as a \"timeslot\", must accommodate the transmission of a data frame followed by a corresponding acknowledgement. The Absolute Slot Number (ASN) counts the timeslots that have passed since the network's inception, i.e., since the root started advertising the DODAG. TSCH also employs multi-channel communication. To this extent, the \"hopping sequence\" contains all eligible channels. The channel on which to communicate can always be calculated using (1); hence, the definition of a TSCH link as \"the pairwise assignment of a directed communication between devices... in a given timeslot on a given [channel offset]\" [2] (p. 70). \[CH=HS[(ASN+CO)\,\%\,|HS|] \tag{1}\]  
where: \begin{tabular}{l|l} \(CH\) & the frequency channel to communicate on; \\ \(HS\) & a finite ordered (\(\
eq\)sorted) list (\(\
eq\)set) of frequency channels to communi- \\ \(ASN\) & the absolute slot number of the current timeslot; \\ \(CO\) & the current channel offset, as determined by the TSCH scheduler; \\ \(|HS|\) & the length of the hopping sequence. \\ \end{tabular}   
Consequently, if distinct pairs of nodes use different channel offsets, they can communicate during the same timeslot. Should the reader be confused about slotframes, timeslots, and the like, we highly recommend reading Appendix A. The \"link schedule\"--the allocation of TSCH links to nodes and/or node pairs--is central to TSCH. IEEE 802.15.4 leaves the choice of a scheduling algorithm to the implementer. As a result, many TSCH schedulers exist, all of which can generally be categorized as either (1) centralized; (2) decentralized; or (3) autonomous. Choosing/designing an SF involves a trade-off between several factors, which are beyond the scope of this paper. For this work, we considered the decentralized approach most appropriate because it offers improved flexibility compared to an autonomous approach, without incurring the full overhead penalty of a centralized alternative. With a decentralized SF, scheduling decisions are made locally by individual nodes rather than relying on a central coordinator. Each node maintains its own (local) schedule of transmit/receive links towards its neighbors based on its communication requirements and information gathered from those neighbors. As such, decentralized SFs require a way to communicate these requirements with neighboring nodes. Conveniently, there is a well-defined set of decentralized scheduling semantics with the specific purpose of building/maintaining a local schedule. These semantics are called the 6 TiSCH Operation Sublayer (6 top) Protocol (6P) [11], and 6 top effectively forms a layer in between the TSCH MAC and higher protocol layers. All 6P-related information is carried in a sub-type of the IETF Informational Element (IE) [12] called the 6 top sub-IE [11] (Section 3.2.1), typically in otherwise empty data frames. Arguably the most popular/well-defined SF that uses 6P is MSF [7], which breaks traffic down into three planes and ties a slotframe to every plane (i.e., the minimal, autonomous, and negotiated slotframes, respectively) all of which align 100%. As with all schedulers using multiple slotframes, they are merged in a \"rolling\" fashion according to TSCH precedence rules [2] (Section 6.2.6.4). More specifically, when determining the next link to use, if there are overlapping cells in different slotframes, the cells housing a transmit (Tx) link have precedence. If there is still ambiguity after that, the cell from the slotframe with the lowest handle has precedence. Overlap is always meant in terms of ASN only. That is, if two cells occur at the same ASN (which, for MSF, means they will have the same slot offset), they overlap, even if they have different channel offsets. For the remainder of this paper, we understand the term(s) cell (and supercell, see Section 4) to also mean link unless noted otherwise.