Data Communication Networks - Program #1 - CS-Sublayer
|
Assignment: |
Program #1 |
|
Assigned: |
Feb. 28, 2001, Wednesday |
|
Due: |
March 14, 2001, Wednesday, beginning of class |
|
Note: |
No late programs accepted |
Program #1 simulates the CS-sublayer of AAL. The program is to be written in C++ and submitted by:
- Hardcopy, and
- Either disk (the disk must contain both the C++ file, input file (if any), output file, and C++ executable) or by email (with all files appended to [email protected]).
The program must include within comments:
- Your Name
- File Name
- Other Files Needed (i.e., any .h files)
- Input File Name (if any)
- Output File Name
The program consists of a C++ class simulating the CS-sublayer of AAL. The class should include:
- A header (make it an integer value), and
- An information field (you can make it a string of characters - but not numbers),
- A maximum length for the information field, and
- Necessary functions associated with the CS-sublayer.
The program will:
- Either generate or read from a file a long string of characters (make sure it is at least five times {plus a few characters} as long as the maximum length for the information field).
- Generate CS-pdus from the input, keeping the order of the pdus generated as the integer in the header (i.e., header = 0, 1, 2, 3, etc.), and cutting the data given into the information fields. If the information is too small, pad the information field with zeros.
- Put these CS-pdus into a large list so they can be sent to the SAR layer (which is not in this program).
- Print out the list of pdus.
Good Luck - this should be a short program!