Professional Documents
Culture Documents
Project Network 3
Project Network 3
Kind
Seq
Ack/Nack
1 byte flag
1 byte
1 byte
1 byte
Data
CRC-16
Checksum
8 bytes
01111110
1 byte flag
2 bytes
Where,
Preamble
01111110
kind
seq
Ack/Nack
variable of type FrameKind identifies the type of frame (control or data frame)-not used
the sequence number of this frame
sequence number of frame to acknowledge a negaive value for Nack
the data
data
where,
errType : is an integer used by the Sender to emulate lost or damage frame
0 - Perfect (no loss, no errors)
1 - Lossy (second frame in the sequence is lost)
2 - Noisy (first six bits of the first data byte are damaged in the second frame)
srcFile : the text file from which the sender reads
source LogFile: Whenever a frame is sent, its sequence number should be recorded in srcLogFile.txt.
Note that if a frame did not get actually sent due to frame loss emulation, its
sequence number still needs to be recorded.
destFile : the text file to which the receiver writes the data it receives from the sender
dest LogFile : the file logs the sequence number s of all the frames that are acknowledged.
In addition to the above files, Sender and Receiver should also generate the following files.
Generated
by the
Receiver
source LogFile: Whenever a frame is sent, its sequence number should be recorded in srcLogFile.txt.
Note that if a frame did not get actually sent due to frame loss emulation, its
sequence number still needs to be recorded.
dest LogFile : the file logs the sequence number s of all the frames that are acknowledged.
receiver.log : in which it records all the sequence numbers including the duplicates.
As usual ,you must demo your project in the class(bring in a hard copy of your source code + screen
shot)) and submit a zip file containing the source code, log files, screen shot, and a write up file
describing your implementation.
Format of the log files:
Seq #
Data
CRC checksum
comments