Skip to content
David Qu edited this page Oct 3, 2015 · 8 revisions

Welcome to the black-widow wiki!

Project Setup

- Documentation: https://read-the-docs.readthedocs.org/en/latest/getting_started.html

Overview

- Parse config file and initialize - Simulate network and record data - Graph data

Configuration File

- [ ] Write parser that configures host, link, and router objects. - [ ] Configure all-pairs shortest-paths array / map. ``` # Example config file # Config file notes: # Keywords -- Hosts: Routers: Links: :Links Flows: :Flows

Hosts: H1 H2

No routers for this test case.

Routers:

Links: L1: H1_H2 LR=10 LD=10 LB=64
:Links

Flows: F1: H1_H2 DA=20 FS=1.0 :Flows


<h2>Host</h2>
```C++
class Host {
    private:
        int host_id; // Is this the network address?
        int address;
        Link connection;
    public:
        void connect(Link new_link);
        int get_address();
}

Link

```C++ class Link { private: queue buffer; int buffer_size; public: void send_packet(Packet pack); void add_packet_to_buff(Packet pack); double get_cost(); // Returns link cost. } ```

Router

```C++ class Router { private: int address; vector links; public: void connect(); int get_address(); } ```

Packet

```C++ class Packet { private: int dest_address; public: int get_dest_address(); } ```
Clone this wiki locally