# Novel Extensions to Enhance Scalability and Reliability of the IEEE 802.15.4-DSME Protocol
## 3 Shareable D-DSME Extension
### EnhanceD DSME Allocation Procedure  
In a mesh network running D-DSME, each node sends the allocation request to its nearest coordinator, which re-routes the message (through multi-hop transmissions) towards the _PAN-Coordinator_. Later, the allocation response generated by the _PAN-Coordinator_ is sent to one _coordinator_, which re-routes the message (also, in a multi-hop way) towards the destination node. Only scheduling is centralized, as GTS allocation is up to the _PAN-Coordinator_. Table 1 summarizes the notation used in this subsection. The D-DSME allocation procedure is performed in four steps, described as follows:  
**Step 1. ** When a node needs to allocate a GTS for a flow \(f\), it sends a request to the _PAN-Coordinator_ indicating the flow period. For each _shGTS_ the _PAN-Coordinator_ checks if, in the case the new flow is assigned the \(s\)-th _shGTS_, the slot use (\(U(s)\)) is lower than or equal to 1, i.e.,  
\[U(s)=T_{MSF}\sum_{i\in\mathcal{F}_{s}}\frac{1}{P_{i}}\leq 1 \tag{1}\]  
where, \(\mathcal{F}_{s}\) are the flows assigned to the _shGTS_\(s\) (including the new flow \(f\)), \(P_{i}\) is the period of the \(i\)-th flow and \(T_{MSF}\) is the multi-superframe duration. The slot use indicates the ratio of used GTS during the time. For instance, if a flow has period 10s and the multi-superframe duration is 2s, only one GTS out of five will be used for transmitting that flow. **Step 2. ** If condition (1) is met, the _PAN-Coordinator_ tests if an _offset_ (in terms of the number of multi-superframes), for each flow that shares the _shGTS_\(s\), can be found so as to avoid mutual interference. Hence, it checks if the greatest common divisor (GCD) of the flow periods that share the _shGTS_\(s\) is greater than or equal to the number of flows that share the _shGTS_\(s\) (\(n_{\mathcal{F}_{s}}\)) multiplied by the multi-superframe duration (\(T_{MSF}\)), i.e.,  
\[\mathbf{GCD}(P_{i})\geq n_{\mathcal{F}_{s}}\times T_{MSF},\forall i\in \mathcal{F}_{s} \tag{2}\]  
If condition 2 holds, then the _shGTS_\(s\) can be shared among all the flows belonging to \(\mathcal{F}_{s}\) and consecutive offsets starting from 0 can be assigned to these flows. The _PAN-Coordinator_ assigns to the flow \(f\) the next consecutive offset _shGTSOfset_, calculated as _shGTSOfset_\(=n_{\mathcal{F}_{s}}-1\). If no _shGTS_ meets both the conditions (1) and (2), either the flow will be assigned an unassigned GTS, if any is found, or the allocation request will be rejected. **Step 3. ** Once a _shGTS_ is found for the new flow \(f\) and the offset _shGTSOffset_ is assigned, the _PAN-Coordinator_ determines the shared GTS Interval _shGTSInterval_, i.e., the interval between two consecutive transmissions of a message belonging to the flow \(f\), expressed in number of multi-superframes. For example, in Figure 2, the offset _shGTSOfset_ of the flow 5 is equal to 1 (i.e., one multi-superframe) and its _shGTSInterval_ is equal to 2 (i.e., the flow 5 can be transmitted in its GTS every two multi-superframes). The _shGTSInterval_ is calculated as in the following formula:  
\[\textit{shGTSInterval}=\left\lfloor\frac{P_{f}}{T_{MSF}}\right\rfloor \tag{3}\] \begin{table}
\begin{tabular}{c l} \hline \hline
**Symbol** & **Definition** \\ \hline \(T_{MSF}\) & Multi-superframe duration \\ \hline \(T_{SF}\) & Superframe duration \\ \hline \(n_{SF}\) & Number of superframes a multi-superframe \\ \hline \(P_{i}\) & Period of the \(i\)-th flow \\ \hline \(\textit{shGTSInterval}\) & Interval between two consecutive transmissions of a message belonging to a flow \(f\), expressed in number of multi-superframes. \\ \hline \(\textit{shGTSOfset}\) & Offset in terms of multi-superframes assigned to a flow \\ \hline \(\mathcal{F}_{s}\) & Set of flows assigned to the _shGTS_\(s\) \\ \hline \(n_{\mathcal{F}_{s}}\) & Number of flows that share the _shGTS_\(s\) \\ \hline \(MSFId\) & Multi-superframe id \\ \hline \(SFId\) & Index of a superframe in a beacon interval \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Summary of notation. **Step 4.