CS-522 (Modelling and Simulation) Project Statechart Modelling of TCP protocol Shah Asaduzzaman Zaki Hasnain Patel
The total system Client Data Server Application Generator Application Data packet Data Buffer Data Channel (C-to-S) TCP TCP Driver Driver App (client) (server) Controller Data Channel (S-to-C) Control packet
Top level statechart TCPSimulator Normal TCP Channel Client Driver (Server-to-Client) Application (Client) TCP Channel Server Driver (Client-to-Server) Application (Server) H* gStop/ gResume/ gPause/ Paused Stopped
Client Application ClientApp Generator Transmitter after(ChkIntrval) [guard(Data in Buffer)]/ Waiting Connecting pop(Data) CmdConnect Generating after(ChkIntrval) [guard(Buffer empty)]/ after(IAT) [guard(count<MAX)]/ Notify/ genBuffer.append() CmdSend(Data) count++ Notify/ after(IAT) [guard(count>=MAX)]/ Stopped Notify/ CmdClose Closing Sending
TCPDriver (Toplevel) TCPDriver Receive(SYN+ACK)/ SynSent CmdConnect/ Send(ACK) Send(SYN) Notify (Connected) CmdClose/ Receive(FIN)/ PassiveClose Receive(ACK)/ Send(ACK) Closed Established after(WaitTime)/ Notify(Close) CmdClose/ ActiveClose CmdListen/ Send(FIN) CmdSend/ CmdClose/ Send(SYN) Receive(SYN)/ Send(SYN+ACK) Receive(SYN)/ Receive(ACK)/ Send(SYN+ACK) Listen SynRcvd Receive(RST)/
TCPDriver (components) TCPDriver.Established CmdSend(Data)/ Idle Busy After(TimetoFeed(Data))/ Send(Data) Receive(Data)/ Notify(DataSent)
TCPDriver (components) TCPDriver.PassiveClose TCPDriver.ActiveClose CmdClose/ Receive(ACK)/ LastAck Closed CloseWait Receive(FIN)/ FinWait1 Closing Send(FIN) Send(ACK) CmdCloseListen/ Receive(ACK)/ LastAck2 Listen Send(FIN) Receive(FIN+ACK)/ Send(ACK) Receive(ACK)/ Receive(ACK)/ after(waittime) Receive(FIN)/ FinWait2 TimedWait Closed Send(ACK)
Channel Channel Transmitter after(ChkIntrval) Feeder [guard(Data in Buffer)]/ Waiting Busy pop(Data) after(ChkIntrval) [guard(Buffer empty)]/ Send(Data)/ ChannelBuffer.append(Data) after(Delay)/ Receive(Target, Data)
Channel (alternative) Channel2 Feeder Transmitter SchedulerNotify(Channel.Receive)/ Send(Data)/ Receive(Target, Data) ChannelBuffer.append(Data) Schedule(Channel.Receive)
ServerApplication ServerApp after(StartupTime) / Idle Started CmdListen after(TimetoFail)/ CmdClose Notify(FinReceived)/ CmdCloseListen
Graphical output
Recommend
More recommend