Skip to content

Feat/interfaces#12

Merged
David-A-T-M merged 3 commits into
masterfrom
feat/interfaces
Mar 20, 2026
Merged

Feat/interfaces#12
David-A-T-M merged 3 commits into
masterfrom
feat/interfaces

Conversation

@David-A-T-M
Copy link
Copy Markdown
Owner

This pull request introduces a set of new interfaces to improve the structure and clarity of the network simulation model. The changes establish clear contracts for network nodes, packet receivers, tickable entities, and statistics reporting, laying the groundwork for consistent implementation across routers and terminals.

Core model interfaces:

  • Added the NetworkNode interface, representing any node in the simulated network (router or terminal), requiring an IP address, packet receiving, tick-based updates, and unified statistics reporting. (src/main/java/ar/edu/unc/david/routersimulator/model/nodes/NetworkNode.java)
  • Introduced the PacketReceiver interface for entities that accept incoming packets, abstracting the input buffer behavior. (src/main/java/ar/edu/unc/david/routersimulator/model/nodes/PacketReceiver.java)
  • Added the Tickable interface to represent entities that can be updated on each simulation tick, standardizing time-based processing. (src/main/java/ar/edu/unc/david/routersimulator/model/nodes/Tickable.java)

Statistics abstraction:

  • Created the Stats interface to provide a common structure for statistics snapshots from both routers and terminals, ensuring consistent reporting of IP address and packets received. (src/main/java/ar/edu/unc/david/routersimulator/model/stats/Stats.java)

- Introduce `Tickable` interface for discrete time processing.
- Add `Stats` interface for common node statistics reporting.
- Create `NetworkNode` interface to encapsulate shared functionality for Router and Terminal nodes.
- Add `PacketReceiver` interface for handling incoming packets.
- Clean up unused imports from Router and Terminal-related classes.
@David-A-T-M David-A-T-M self-assigned this Mar 20, 2026
@David-A-T-M David-A-T-M linked an issue Mar 20, 2026 that may be closed by this pull request
12 tasks
Copy link
Copy Markdown
Owner Author

@David-A-T-M David-A-T-M left a comment

Choose a reason for hiding this comment

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

Ready To merge

@David-A-T-M David-A-T-M merged commit 423b044 into master Mar 20, 2026
2 checks passed
@David-A-T-M David-A-T-M deleted the feat/interfaces branch March 20, 2026 19:58
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.

feat/coreNodeInterfaces

1 participant