-
Notifications
You must be signed in to change notification settings - Fork 2
/
Administrador.h
executable file
·52 lines (48 loc) · 1.5 KB
/
Administrador.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef ADMINISTRADOR_H
#define ADMINISTRADOR_H
//#include <iostream>
//#include <string>
#include <stdio.h> /* printf, NULL */
#include <stdlib.h> /* srand, rand */
#include <time.h> /* time */
#include "Lista.h"
#include "Etiqueta.h"
#include "Paquete.h"
#include "Conexion.h"
#include "Pagina.h"
#include "Router.h"
#include "Computadora.h"
using namespace std;
/*
Esta clase se encarga de administrar la simulación. Puede ver y modificar absolutamente todos los parámetros
de la red Routers, computadoras, conexiones. Tiene la funcionalidad de calcular caminos óptimos con la
implementación del algoritmo de Dijkstra para grafos direccionados y que admite ciclos no recurrentes.
Adicionalmente es capáz de leer la configuración de la red desde un archivo y dibujar el grafo
de la red haciendo uso de la librería graphvz mediante la aplicación Dot de los repositorios de ubuntu.
Cabe mensionar que se determinó que todos routers tienen la misma cantidad de maquinas conectadas.
*/
class Administrador
{
private:
Lista<Router> routers;
Lista<Arco> arcos;
Lista<Conexion*> conexiones;
int cant_comp_por_router;
int cant_routers;
int total_pag;
int cant_pasos;
int pag_sel;
public:
Administrador();
~Administrador();
void simular_cant_pasos(int);
void simular_un_paso(bool);
Lista<Etiqueta> Dijkstra(int);
void calcular_tablas();
void leer_archivo();
//void crear_conexiones();
int dibujar_grafo();
void crear_pagina();
void probar_conf();
};
#endif // Paquete_H