Skip to content

Conversation

@kamilsa
Copy link
Contributor

@kamilsa kamilsa commented Jun 22, 2025

  • Introduced Protocol enum in SimulationConfig to specify TCP or UDP.
  • Updated YAML configuration files to include protocol settings.
  • Modified simulator to handle protocol selection and socket creation accordingly.

- Introduced Protocol enum in SimulationConfig to specify TCP or UDP.
- Updated YAML configuration files to include protocol settings.
- Modified simulator to handle protocol selection and socket creation accordingly.
@kamilsa kamilsa requested a review from Copilot June 22, 2025 06:40
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for TCP and UDP protocols in the simulation configuration by introducing a new Protocol enum and updating related configuration and simulator logic.

  • Introduced a new Protocol enum in both the simulator and configuration.
  • Updated YAML configuration files and CLI flags to include protocol settings.
  • Modified the simulator’s socket creation, connection, and message-sending logic based on the selected protocol.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test_udp.yaml New UDP configuration for simulation tests.
test_tcp.yaml New TCP configuration for simulation tests.
src/beamsim/ns3/simulator.hpp Added Protocol enum and updated socket handling based on protocol.
main.cpp Configured the simulator to set protocol based on SimulationConfig.
example.yaml Updated example to include protocol settings.
cli.hpp Extended SimulationConfig with Protocol enum and CLI flag.
Comments suppressed due to low confidence (1)

src/beamsim/ns3/simulator.hpp:385

  • [nitpick] Consider renaming 'tcp_listener_' to a more generic name (e.g., 'listener_') since it is used for both TCP and UDP protocols.
      tcp_listener_ = makeSocket();

@kamilsa kamilsa marked this pull request as ready for review June 23, 2025 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants