# ATWin: An Improved and Detailed Startup Model of TTP/C
## 3 The Proposed Startup Model ATWin
### The Startup Model ATWin
During the sending process, the node immediately enters the cold-start process to send a cold-start frame and then performs the cold-start process. If it is a receiving node, it immediately enters the ATWin process to monitor the channel and then waits for the ATW to expire. If the received frame within the ATW is invalid, the value of \(cflag\) is still 1 to mark as contention, and the node re-enters the listening phase. If a valid frame is received within the ATW, the node judges whether the contention is detected at the last round of startup. If not, the frame is discarded, and this round of startup fails at this time, and the node should try to restart. If there is a contention detected in the last round of startup, the frame  
Figure 5: The state transition diagram of the ATWin startup model. is adopted, and the cold-start state is entered. After the cold-start process finishes, the node completes the startup if the cold-start frame is sent successfully; otherwise, the node fails to start and tries to restart. The node is only allowed to send or receive frames within the ATW. Its transceiver is turned off whenever the time of ATW is over and the frames outside of the ATW are discarded automatically. If a buffer is used for receiving overflows, the received frame is truncated and judged as an invalid frame. If the receiving node receives multiple frames within the ATW, only the last frame is retained. If a received frame is invalid, the receiver of the node should be closed to stop receiving frames, and all the received frames within the ATW are marked as invalid frames. The invalid overlapping frames indicate that contention has occurred in this round of startup. In the contention elimination strategy of AS6003, if contention occurs in this round, it shall definitely be eliminated in the next round of startup. \begin{table}
\begin{tabular}{p{14.2 pt} p{142.3 pt} p{142.3 pt}} \hline \hline
**States** & **Derived States** & **Actions** & **Time Duration** \\ \hline \multirow{8}{*}{_LISTEN\({}_{1}\)_} & Starts receiver; sets the value of local lock to 0; sets the TDMA round to 0; starts local clock; starts channel detecting. If channel activity is detected during listening timeout, then the node transits into \(LISTEN_{2}\) state; if the listening timeout requires, and the node is allowed to perform cold-start, then the state of the node transits into \(CS_{4}\) state and tries performing cold-start. & Variable duration with the upper bound \(\Delta_{LISTEN}\) \\ \cline{2-3}  & \(LISTEN_{2}\) & Waits for the end of ATW. After the end of ATW, the node transits into \(LISTEN_{3}\) state. & Fixed duration \(\Delta_{window}\) \\ \cline{2-3}  & \(LISTEN_{3}\) & Checks the channel status. If the channel activity is judged as noise, then the node transits into \(LISTEN_{3}\) state again; if ATWin reports a contention, the node clears flag and transits into \(LISTEN_{1}\) state; otherwise the node transits into \(LISTEN_{4}\) state. & 0 \\ \cline{2-3}  & \(LISTEN_{4}\) & Clears the c-flag to 0 and performs the routine transactions of PRP phase. The node needs to wait for the end of the PRP phase, then transits into \(CS_{1}\) state if the received frame is CS frame, or transits into \(SYNC\) state if the received frame is X/I frame. & Fixed duration \(\Delta_{PRP}\) \\ \hline \multirow{8}{*}{_CS\({}_{1}\)_} & Is a synchronized cold-start state. The node in the state assumes itself a successful startup and performs a TDMA round just like the SYNC state. When the PSP phase of the next TDMA round starts, the node in this state transits into \(CS_{2}\) state. & Variable duration with the upper bound \(n\Delta_{slot}\) \\ \cline{2-3}  & \(CS_{2}\) & Performs clique-detecting algorithm. If the node reports a majority clique, it transits into the SYNC state after the PSP phase; if the node reports a minority, it transits into the \(CS_{3}\) state; if the node reports a blackout, then it transits into the \(SUBCS\) state.