Skip to content

Commit

Permalink
[UPDATE] Translated to english
Browse files Browse the repository at this point in the history
  • Loading branch information
jcasben committed Feb 20, 2024
1 parent 993dcfd commit 9b06135
Showing 1 changed file with 54 additions and 53 deletions.
107 changes: 54 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,86 +1,88 @@
# CDR Toolkit
# CDR Toolkit 🛜

A toolkit created for the course Data Comunication and Networks, from UIB.
A toolkit created for the course Data Communication and Networks, from UIB.

It is a blazingly fast CLI that helps you to do some basic calculs that are needed in the course:
It is a blazingly fast CLI that helps you to do some basic calculations that are needed in the course:

1. [Entrophy](#1-cálculo-de-entropía)
2. [Code characterization](#2-caracterización-de-un-código)
3. [Eficiencias de mecanimos de control de flujo](#3-eficiencias-mecanismos-de-control-de-flujo)
4. [Eficiencias de mecanismos de control de errores](#4-eficiencias-mecanismos-de-control-de-errores)
5. [Eficiencia de redes Ethernet](#5-eficiencia-redes-ethernet)
6. [Eficiencia de redes WiFi](#6-eficiencia-redes-wifi)
7. [Checksums](#7-cálculo-de-checksums)
1. [Entropy](#1-entropy-calculation)
2. [Code characterization](#2-code-characterization)
3. [Efficiency of flux control mechanisms](#3-efficiency-of-flux-control-mechanisms)
4. [Efficiency of error control mechanisms](#4-efficiency-of-error-control-mechanisms)
5. [Ethernet networks efficiency](#5-ethernet-networks-efficiency)
6. [WiFi Networks Efficiency](#6-wi-fi-networks-efficiency)
7. [Checksums](#7-checksums-calculation-deactivated)

## ¿Como lo puedo usar?
## How can you use it? 🛠️

#### A través del ejecutable
#### Using the executable

Usar CDR Toolkit es tan fácil como descargar el ejecutable, abrir una terminal donde tengas descargado el archivo y ejecutarlo, independientemente de la plataforma en la que te encuentres.
Using CDR Toolkit is as easy as downloading the executable, opening a terminal where you have the file downloaded and
running it, regardless of the platform you are on.

#### A través de cargo
#### Using Cargo

Cargo es el administrador de paquetes de Rust, puedes consultar más información sobre él [aquí](https://doc.rust-lang.org/cargo/).
Para utilizar cdr_toolkit con cargo, podemos instalarlo con el siguiente comando:
Cargo is the package manager for Rust, you can find more information about it [here](https://doc.rust-lang.org/cargo/).
To use cdr_toolkit with cargo, we can install it with the following command:

```shell
```bash
cargo install cdr_toolkit
```

Una vez instalado, podemos ejecutarlo directamente escribiendo el siguiente comando:
Once installed, we can run it directly by typing the following command:

```shell
```bash
cdr_toolkit
```

## Opciones de uso
## Functionalities ⚙️

Una ejecutado el programa, se nos presentará un menú con todas las opciones que podremos elegir:
Once the program is executed, we will be presented with a menu with all the options that we can choose:

### 1. Cálculo de Entropía
### 1. Entropy calculation

Nos permite realizar el cálculo de la Entropía de una fuente a partir de las probabilidades de sus símbolos a través de las siguiente fórmula:
It allows us to calculate the Entropy of a source from the probabilities of its symbols through the following formula:

$$ H(X) = \sum_{i=1}^{S} p_i \cdot \log_2 \frac{1}{p_i} $$

donde $S$ representa el tamaño del alfabeto y $p_i$ la probabilidad de cada símbolo.
where $S$ represents the size of the alphabet and $p_i$ the probability of each symbol.

### 2. Caracterización de un código
### 2. Code characterization

Realiza los cálculos básicos de la caracterización de una fuente. Estos son la Longitud media de los símbolos, la desigualdad de Kraft y la Eficiencia.
Estos se calculas a través de las siguientes fórmulas:
Make the basic calculations of the characterization of a source. These are the average length of the symbols,
the Kraft inequality and the Efficiency. These are calculated through the following formulas:

**Longitud media de las palabras código**
**Average length of the code words**

$$ L = \sum_{i=1}^{S} p_i \cdot l_i $$

**Desigualdad de Kraft**
**Kraft's inequality**

$$ K = \sum_{i=1}^{S} 2^{-l_i} $$

**Eficiencia del código fuente**
**Source code efficiency**

$$ Eficiencia = \frac{H(X)}{L} $$
$$ Efficiency = \frac{H(X)}{L} $$

### 3. Eficiencias mecanismos de control de flujo
### 3. Efficiency of flux control mechanisms

Calcula la eficiencia del mecanismo deseado, utilizando la fórmula correcta en cada caso dependiendo de los datos que se tengan.
Calculates the efficiency of the desired mechanism, using the correct formula in each case depending on the data
that is available.

$$ a = \frac{t_{prop}}{t_{frame}} = \frac{d \cdot R}{L \cdot v_{prop}} $$

#### Stop & Wait

$$ \eta_{SW} = \frac{t_{frame}}{t_{frame} + 2 \cdot t_{ptop}} = \frac{1}{1 + 2a} $$

#### Ventana Deslizante
#### Slippery Window

$$ \eta_{SW} = \frac{N \cdot t_{frame}}{t_{frame} + 2 \cdot t_{ptop}} = \frac{N}{1 + 2a} \text{, si } N \leq 2a + 1 \\ $$
$$ \eta_{SW} = \frac{N \cdot t_{frame}}{t_{frame} + 2 \cdot t_{ptop}} = \frac{N}{1 + 2a} \text{, if } N \leq 2a + 1 \\ $$

$$\eta_{SW} = 1 \text{, si } N \geq 2a + 1 $$

### 4. Eficiencias mecanismos de control de errores
### 4. Efficiency of error control mechanisms

Calcula la eficiencia del mecanismo deseado, utilizando la fórmula correcta en cada caso dependiendo de los datos que se tengan.
Calculates the efficiency of the desired mechanism, using the correct formula in each case depending on the data that is available.

$$ a = \frac{t_{prop}}{t_{frame}} = \frac{d \cdot R}{L \cdot v_{prop}} $$

Expand All @@ -98,40 +100,39 @@ $$ \eta = \frac{1 - p}{1 + 2a \cdot p}, N \geq 2a + 1 $$

$$ \eta = \frac{N(1 - p)}{(2a + 1)(1 - p + N \cdot p)}, N < 2a + 1 $$

#### Rechazo Selectivo
#### Selective Reject

$N \leq 2^{k - 1}$

$$ \eta = 1 - p, N \geq 2a + 1 $$

$$\eta = \frac{N(1 - p)}{2a + 1}, N < 2a + 1 $$

### 5. Eficiencia redes Ethernet
### 5. Ethernet networks efficiency

Calcula la eficiencia de una red Ethernet dadas las siguientes fórmulas.
Calculates the efficiency of an Ethernet network given the following formulas.

$$ A = \left(1 - \frac{1}{N}\right)^{N - 1} $$

$$ \eta = \frac{1}{1 + \frac{\tau_b}{L \cdot A}} $$

donde $L$ es el tamaño de las tramas en bits y $\tau_b$ un valor estandarizado:
where $L$ is the size of the frames in bits and $\tau_b$ a standardized value:

- 512 en Ethernet 10BASE-T y Ethernet 100BASE-T4
- 4096 en Ethernet 1000BASE-T
- 512 in Ethernet 10BASE-T and Ethernet 100BASE-T4
- 4096 in Ethernet 1000BASE-T

### 6. Eficiencia redes WiFi
### 6. Wi-Fi Networks Efficiency

Calcula la eficiencia de una red WiFi y la muestra a través de un gráfico. Este se guardará en directorio actual en un archivo con el nombre plot.png.
Calculates the efficiency of a Wi-Fi network.

### 7. Cálculo de checksums (Desactivado)
### 7. Checksums calculation (Deactivated)

Calcula un checksum a partir de los números dados. El cálculo se realiza utilizando el método de la suma en complemento a 1.
Calculates a checksum from the given numbers. The calculation is done using the complement to 1 sum method.

## Advertencia
## Warning ⚠️

Esta herramienta aún está en "beta", esto significa que podría tener algunos errores
o algún tipo de bug. Se recomienda encarecidamente seguir las instrucciones que
proporciona el programa.
This tool is still in "beta", this means that it could have some errors or bugs.
It is strongly recommended to follow the instructions provided by the program.

También se agradecería que si se encuentra algún tipo de bug o error, se me comunicara
para poder solucionarlo lo antes posible.
It would also be appreciated if any kind of bug or error is found, it is communicated to me
to be able to solve it as soon as possible.

0 comments on commit 9b06135

Please sign in to comment.