Skip to content

Feat/admin#22

Merged
David-A-T-M merged 3 commits into
masterfrom
feat/admin
Feb 28, 2026
Merged

Feat/admin#22
David-A-T-M merged 3 commits into
masterfrom
feat/admin

Conversation

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

This pull request introduces a new Admin class to manage and report on the network simulation, adds a comprehensive statistics structure, and integrates periodic and final reporting into the simulation workflow. The most important changes are grouped below:

Administrative and Reporting Features

  • Added the Admin class (Admin.h, Admin.cpp) to provide administrative functions for monitoring, controlling, and reporting on the network simulation. The class can run the simulation for a specified number of ticks and print detailed reports at intervals or at the end. [1] [2]
  • Updated main.cpp to use the new Admin class, running the simulation for 100 ticks with periodic reporting every 10 ticks and a final summary.

Network Statistics and Metrics

  • Introduced the NetworkStats structure in Network.h, encapsulating detailed network metrics such as router/terminal counts, packet/page statistics, and delivery/drop/success rates, with utility methods for calculating these rates.
  • Implemented the Network::getStats() method to aggregate statistics from routers and terminals, supporting the new reporting functionality. [1] [2]

Minor Improvements and Cleanups

  • Changed default router and terminal counts in Network from size_t to uint8_t for more appropriate type usage.
  • Removed an unused comment header from dummy.cpp.
  • Minor docstring and formatting improvements in Network.h. [1] [2]

- Introduced `NetworkStats` struct to track detailed network performance metrics.
- Added `getStats` method to compute and retrieve statistics, including packet and page counts, delivery, and drop rates.
- Updated constants in `Network` class to improve clarity and maintainability.
- Added `Admin` class to provide administrative functions, including generating network performance reports and running simulations with periodic reporting.
- Implemented `printReport` method for detailed statistical output of network metrics.
- Added `runFor` method to advance the simulation with configurable tick count and reporting intervals.
…control and reporting

- Replaced `structures/list.h` include with `core/Admin.h`.
- Added `Admin` object to manage the simulation.
- Incorporated `runFor` and `printReport` methods to execute simulation and display final report.
@David-A-T-M David-A-T-M self-assigned this Feb 28, 2026
@David-A-T-M David-A-T-M linked an issue Feb 28, 2026 that may be closed by this pull request
@David-A-T-M David-A-T-M merged commit 2360ffd into master Feb 28, 2026
6 checks passed
@David-A-T-M David-A-T-M deleted the feat/admin branch February 28, 2026 11:25
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.

Feature: Admin class

1 participant