Feat/network#21
Merged
Merged
Conversation
- Added missing documentation - toString() method formatted for fixed size IPs
- Added PACKET_TTL constexpr - Changed names to fit the standard - Added missing documentation - Removed routerPriority mechanism - Removed ordering operators, as routerPriority is no longer a field - Improved toString format TESTING: - Changed to fixture - Removed unnecessary tests
- Rename variables for clarity and consistency
- Added expiration logic with `expTick` and `MAX_ASSEMBLER_TTL` - Renamed variables for clarity and consistency (`expectedPackets` → `total`, `currentPackets` → `count`, etc.) - Added missing methods: `toString`, stream operator, and comparison operators - Improved documentation and exception handling
… tests for clarity, and updated to reflect recent API changes.
…-based queuing, updated constructor signatures, and improved naming for clarity.
…d update to reflect recent API changes.
…, added public getter methods, and updated tests to use new API.
- Documented `RoutingTable` class with description, methods, and functionality. - Marked `size()` method as `[[nodiscard]]`. - Simplified return statement in `getNextHopIP()`.
- Implemented `std::hash<IPAddress>` to enable usage of `IPAddress` in hash-based containers.
…e statistics, and restructured code for clarity and extensibility.
…verage for buffer processing and edge cases.
… options, and improved code clarity - Replaced `List` containers with `std::unordered_map` for connections and terminals. - Added bandwidth and buffer configuration via a new `Config` struct. - Enhanced buffer management and routing logic with updated methods and improved statistics tracking. - Expanded API with additional getters, `tick` logic, and packet processing functions. - Updated constructors and documentation for clarity and extensibility.
…overage for connection and packet processing scenarios.
- Introduced a new API to retrieve IP addresses of connected neighbor routers. - Added associated documentation and implementation.
- Replaced hardcoded values in `Packet` creation with proper field ordering. - Updated `processInputBuffer` calls to use delay argument. - Applied `std::move` for routing table updates. - Renamed comments for square topology tests for better readability.
- Renamed variables and comments for better readability. - Updated neighbor processing logic to use `getNeighborIPs` and buffer usage. - Adjusted function formatting for consistency. - Enhanced documentation in header file.
- Improved class-level and method-level documentation across `Page`, `PageReassembler`, `RoutingTable`, and `Terminal`. - Clarified parameter descriptions, return values, and error conditions. - Unified comment formatting for consistency. - Added missing inline documentation for constructors and operators.
…and consistency.
… methods, parameters, and documentation for consistency and clarity. Add `srcIP` to `PageReassembler`.
- Introduced terminal-sharing APIs: `shareAddressBook`, `shareRandomGenerator`, `shareTrafficProbability`, and `shareMaxPageLength`. - Added `getTerminals` and `getTerminalIPs` for enhanced terminal management. - Replaced `expTick` with `timeout` in `Router`'s packet processing for consistency.
…handling - Added traffic generation (`generateTraffic`) with configurable probability, destination selection, and page length. - Introduced setters and getters for traffic configuration: `setTrafficProbability`, `setMaxPageLength`, `setRandomGenerator`, and `setAddressBook`. - Replaced `expTick` with `timeout` across methods, parameters, and documentation for consistency. - Enhanced `PageReassembler` with `srcIP` tracking for improved packet handling. - Updated reassembly logic, buffer processing, and quarantine handling to use `timeout`.
- Introduced the `Network` class to handle router and terminal topology, traffic generation, and simulation. - Implemented key methods for network initialization, minimal spanning tree connection, additional connections, and route recalculation. - Added simulation features with tick-based updates and routing table recalculations. - Included configuration struct for flexible network setup.
- Introduced comprehensive test coverage for the `Network` class, including constructor behavior, link establishment, and simulation functionality. - Added stress tests to evaluate performance under large-scale and high-load configurations. - Verified correctness of packet handling metrics: dropped, forwarded, delivered, and timed out packets. - Ensured stable behavior during multi-call simulations and route recalculations.
- Added Doxygen configuration to CMake for documentation generation and warnings checking. - Adjusted `.clang-format` settings: reduced column limit to 100 and enabled automatic comment reflow.
… note for unsupported GitHub behavior
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant improvements to code documentation, formatting, and project configuration, as well as a major new class for network simulation. The most impactful changes include the addition of a comprehensive
Networkclass, enhanced documentation and formatting for theIPAddressclass, improvements to code style enforcement, and the integration of automatic documentation generation. These changes collectively improve code clarity, maintainability, and ease of use for future development and simulation tasks.Major Feature Addition
Network Simulation:
Networkclass (include/core/Network.h) that manages routers, terminals, network topology generation, traffic simulation, and routing table recalculation. This class provides a flexible configuration structure and encapsulates all network simulation logic.Documentation and Code Clarity
Enhanced IPAddress Documentation & Formatting:
IPAddressclass, clarifying its structure, usage, and methods. Updated string formatting for IP addresses to use zero-padded "RRR.TTT" format for consistency and readability. Added a specialization forstd::hash<IPAddress>to support hashing in containers. [1] [2] [3] [4]Dijkstra Algorithm Interface Improvements:
DijkstraAlgorithmclass for clarity and added[[nodiscard]]attributes, along with improved documentation comments for parameters and return values. [1] [2] [3]Project Configuration & Tooling
Automatic Documentation Generation:
CMakeLists.txt, enabling automatic generation of code documentation and warning checks, with fallback messaging if Doxygen is not found.Code Style Enforcement:
.clang-formatsettings to reduce the column limit to 100 and enable comment reflowing for improved code readability and consistency. [1] [2]