# Sensing and Device Neighborhood-Based Slot Assignment Approach for the Internet of Things
## 4 Proposed Neighborhood-Enabled TDMA Approach
### TDMA-Enabled Communication Strategy  
In this phase, every server module \(S_{j}\) is bounded to develop a TDMA-based packet transmission mechanism specifically for its member devices \(C_{i}\). In this scheme, the TDMA slot number has a direct proportionality ratio to that of active devices \(C_{i}\), i.e., the time frame is separated into three slots if the respective server module has received join requests from three devices. It is to be noted that a server device \(S_{j}\) is bounded to receive a message, i.e., a join request, from neighboring devices, and it has to ensure that this device is located in the designated coverage area. For example, if a server module \(S_{j}\) has received join requests from ten (10) devices, then it is forced to create at least ten (preferably equal) slots by dividing its sliding window (time). In addition, a sequential approach, that is, first-come-first-serve (FCFS), is utilized to assigned these time slots to various requesting member devices (as described in Equation (5). To ensure a reliable communication infrastructure, these slots are assigned in a non-preemptive manner, where member devices \(C_{i}\) are bounded to hold these slots for as long as is needed. \[Max(C_{i})=Waiting-time \tag{5}\]  
Additionally, a server module \(S_{j}\) should be able to only assign slots and membership to the devices of \(C_{i}\) that have made a request, irrespective of the fact that other server modules \(S_{j}\) have minimum requests. This is usually the case if devices are deployed randomly in the IoT networks. Additionally, there is the activity of the allocation of time slots, i.e., each \(C_{i}\) is carried out by the respective server device \(S_{j}\) shortly after the deployment process is completed. The proposed TDMA-enabled approach is a dedicated slots assignment approach that makes it highly likely that every server module \(S_{j}\) has a set of devices \(C_{i}\), which are different form other, because the deployment process is random. For example, assume that we have placed IoT networks that have a total of three servers \(S_{j}\) such that \(S_{1}\), \(S_{2}\) and \(S_{3}\) of every server \(S_{j}\) have 9, 18, and 24 member devices \(C_{i}\), respectively. By utilizing the proposed neighborhood-enabled TDMA approach, server \(S_{3}\) is bounded to generate 20 time slots because it has twenty member devices \(C_{i}\), and it should assign these slots using the FCFS approach for the requesting device \(C_{i}\). Similarly, server modules \(S_{1}\) & \(S_{2}\) should generate eight (08) and fifteen (15) time slots, respectively, to facilitate their member devices \(C_{i}\). Additionally, the proposed neighborhood-enabled TDMA approach allows member devices \(C_{i}\) to initiate a request for multiple time slots if needed. However, the assignment of these slots is subjected to various constraints, such as the respective member device (having been assigned) not having data to send, wherein this slot can probably be assigned to the requesting device in a preemptive fashion, i.e., if the respective device has data to send, then it is re-allocated immediately. However, it is not necessary that additional slots be adjacent. Furthermore, additional slots are allocated temporarily (preemptive fashion), i.e., if the respective device \(C_{i}\) is interested in initiating proper communication in the upcoming session, it preferably does this in its own or a dedicated time slot. Therefore, the respective server module \(S_{j}\) broadcasts a query message \"MSG-Q\" to all member devices \(C_{i}\), preferably before the initialization of another session. This message has two important data fields that are represented by S, M, and L, where S means single slot (preferably a dedicated one), M means multiple slots, and L means that the device is about to leave the coverage area of the respective server module \(S_{j}\) and join another, which is signified by J.