Description
- Create a Client application running on LocalHost that connects at startup on port 55000 to the Server on port 55000
- The client should be able to receive from the server the following data frame of 512 bytes:
- – MSG_ID, SEQ_CNT and CRC32 are uint32 types
- – PAYLOAD is an array of uint8[500];
3. The client should be able to store a “synchronized package” of 3 frames (IDs: 1, 2 and 3) based on the SEQ_CNT
A Synchronized package consist of 3 frames that have incrementing IDs ( 1, 2, 3) and the same SEQ_CNT (eg: 0, 1, 2…)
4. The client should be able to store the last 3 synchronized packages, in a circular buffer. The highest SEQ_CNT has the highest priority
• Use the provided Server application, that listens on Port 55000 for any incoming connection. The server will send the data frame with incremental SEQ_CNT for each transmission at on “key press” events as follows:
o “1” -> data frame with MSG_ID = 1 o “2” -> data frame with MSG_ID = 2 o “3” -> data frame with MSG_ID = 3
Eg: On the first key entered as “1” it will send a package with MSG_ID=1 and SEQ_CNT=0
On the second key entered as “1” it will send a package with MSG_ID=1 and SEQ_CNT=1 Etc..
Package sent for the input given above:
– MSG_ID=1, SEQ_CNT=0, Payload[500], CRC – MSG_ID=1, SEQ_CNT=1, Payload[500], CRC – MSG_ID=1, SEQ_CNT=2, Payload[500], CRC – MSG_ID=3, SEQ_CNT=0, Payload[500], CRC – MSG_ID=2, SEQ_CNT=0, Payload[500], CRC – MSG_ID=2, SEQ_CNT=1, Payload[500], CRC – MSG_ID=3, SEQ_CNT=1, Payload[500], CRC – MSG_ID=3, SEQ_CNT=2, Payload[500], CRC – MSG_ID=1, SEQ_CNT=4, Payload[500], CRC
Evaluation:
1. 1p 2. 2p 3. 2p 4. 1p
First synchronized package
Second synchronized package