Skip to content

Issue: Implementation of the Terminal Class Logic #13

@David-A-T-M

Description

@David-A-T-M

Description

Implement the core logic for the Terminal class as defined in the header file. The terminal acts as an end-node in the network simulation, responsible for page fragmentation into packets, packet reassembly, and bandwidth management.

Key Requirements

  • Constructor: Initialize buffers, IP, and bandwidth parameters.
  • Page Fragmentation (sendPage): Logic to split Page objects into multiple Packet objects and enqueue them in the outputBuffer.
  • Packet Reception (receivePacket): Safely buffer incoming packets.
  • Buffer Processing:
    • processOutputBuffer: Send packets to the connected Router limited by externalBW.
    • processInputBuffer: Dequeue packets and route them to the correct PageReassembler limited by internalBW.
  • Reassembly Management: Implement findOrCreateReassembler and handleCompletedPage to track incoming data streams.
  • Monitoring: Implement toString and the ostream friend operator for simulation logging.

Todo List

  • Implement member functions in Terminal.cpp.
  • Ensure proper handling of PageReassembler pointers within the List.
  • Verify bandwidth constraints (External vs. Internal).
  • Add unit tests for fragmentation and reassembly.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions