summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2023-06-29 11:10:26 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2023-06-29 11:10:26 +0200
commit0177500584de83145f3a5620d61013043027a6a4 (patch)
tree8c13f7ef7939458adc65a24e0b21cc791275b74b
parentc1ac340350da708232550725acacb52508afb604 (diff)
Update user manual
-rwxr-xr-xmanual/assets/orchestrator.py4
-rw-r--r--manual/assets/output.txt4
-rw-r--r--manual/assets/platform.yaml1
-rw-r--r--manual/manual.pdfbin356896 -> 381724 bytes
-rw-r--r--manual/manual.tex44
5 files changed, 37 insertions, 16 deletions
diff --git a/manual/assets/orchestrator.py b/manual/assets/orchestrator.py
index a697aa8..f04bd49 100755
--- a/manual/assets/orchestrator.py
+++ b/manual/assets/orchestrator.py
@@ -10,8 +10,8 @@ L=np.full((n,n),0) # Latency 0s
s=esds.Simulator({"wlan0":{"bandwidth":B, "latency":L, "is_wired":False}})
##### Instantiate nodes with their implementation
-s.create_node("node",args="sender") # Use node.py for the first node with "sender" as argument
-s.create_node("node",args="receiver") # Now the second node
+s.create_node("node",interfaces=["wlan0"],args="sender") # Use node.py for the first node, specify the vailable communication interfaces and use "sender" as argument
+s.create_node("node",interfaces=["wlan0"],args="receiver") # Now the second node
##### Run the simulation
s.run(interferences=True)
diff --git a/manual/assets/output.txt b/manual/assets/output.txt
index f3cc6c7..a6cbe37 100644
--- a/manual/assets/output.txt
+++ b/manual/assets/output.txt
@@ -1,3 +1,3 @@
-[t=0.000,src=n0] Send 10 bytes on wlan0
-[t=0.002,src=n1] Receive 10 bytes on wlan0
+[t=0.000,src=n0,grp=def] Send 10 bytes on wlan0
+[t=0.002,src=n1,grp=def] Receive 10 bytes on wlan0
[t=0.002,src=esds] Simulation ends
diff --git a/manual/assets/platform.yaml b/manual/assets/platform.yaml
index 420565b..d0b2eb1 100644
--- a/manual/assets/platform.yaml
+++ b/manual/assets/platform.yaml
@@ -12,6 +12,7 @@ nodes:
interfaces:
wlan0:
type: "wireless"
+ nodes: all # All nodes are connected to this network
links:
- all 50kbps 0s all # All nodes are reachable by each other
txperfs:
diff --git a/manual/manual.pdf b/manual/manual.pdf
index a9395cb..b75fff6 100644
--- a/manual/manual.pdf
+++ b/manual/manual.pdf
Binary files differ
diff --git a/manual/manual.tex b/manual/manual.tex
index cb0024d..fff1e30 100644
--- a/manual/manual.tex
+++ b/manual/manual.tex
@@ -5,6 +5,7 @@
\usepackage{minted}
\usepackage{booktabs}
\usepackage{xspace}
+\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{makecell}
\usepackage[utf8]{inputenc}
@@ -60,11 +61,11 @@
\label{architecture}
\end{figure}
-ESDS simulator comprises two major components: 1) The Simulation Orchestrator (SO) 2) The Simulated
-Nodes (SN). This architecture is depicted in Figure \ref{architecture}. The SO is the main process
+The ESDS simulator comprises two major components: 1) The Simulation Orchestrator (SO) 2) The Simulated
+Nodes (SN). This architecture is depicted on Figure~\ref{architecture}. The SO is the main process
in charge of implementing the simulation main loop. It instantiates the network (e.g bandwidths and
-latencies), collects and processes the events (e.g communications,turn on/off). On the other hand,
-nodes are threads that implement the node behaviors.
+latencies matrices), collects and processes the events (e.g communications,turn on/off). On the other hand,
+the SNs are threads that implement the node behaviors by following so called \textit{node API}.
\section{Getting started}
@@ -87,6 +88,10 @@ Nodes implementations are written using python. Here is the implementation of th
the last \verb|platform.yaml| file:
\addsource{assets/node.py}{python}
+More details about implementations of nodes are availablein the
+\href{https://gitlab.com/manzerbredes/esds/-/raw/main/example/sender.py}{\textit{example code}} and the
+\href{https://gitlab.com/manzerbredes/esds/-/raw/main/example/sender.py}{\textit{ESDS implementation of the SNs interface}}.
+
\subsection{Execution}
\label{sec:firstsimulation:execution}
@@ -199,6 +204,15 @@ implementations:
- 1-@ receiver.py
\end{tabminted}
\\ \cmidrule{1-3}
+
+ \textbf{groups} & Specify the group to use in the nodes log reports. Useful to filter logs. By default, nodes are in the \textit{def} group. &
+ \begin{tabminted}{yaml}
+groups:
+ - 0 groupA
+ - 1-@ groupB
+ \end{tabminted}
+ \\ \cmidrule{1-3}
+
\textbf{arguments} & Define the arguments that will be passed to each node implementation (keys of each element uses \textbf{the range syntax}). &
\begin{tabminted}{yaml}
@@ -212,8 +226,8 @@ arguments:
\label{keywords:nodes}
\end{table}
-Several entries in the platform file use a \textbf{range syntax} to map informations (node
-implementations, links etc.) to node $ids$. Indeed, when running a simulation with $p$ nodes, each
+Several entries in the platform file use a \textbf{range syntax} to bind data (node
+implementations, links etc.) to node $ids$. For a simulation with $p$ nodes, each
node will have an allocated $id$ such that $id \in [0,1,...,p-1]$. Here are examples of valid range
syntax for a simulation that uses 5 nodes:
\begin{itemize}
@@ -242,8 +256,15 @@ available keywords.
type: "wireless"
\end{tabminted}
\\ \cmidrule{1-3}
+
+ \textbf{nodes} & Specify the nodes that have access the current network/interface (uses the \textbf{range syntax}) &
+ \begin{tabminted}{yaml}
+nodes: 2-@
+ \end{tabminted}
+ \\ \cmidrule{1-3}
+
- \textbf{links} & List all the links between nodes on the interface (uses \textbf{the range syntax}). &
+ \textbf{links} & List all the links between nodes on the interface (uses the \textbf{range syntax}). &
\begin{tabminted}{yaml}
links:
# Link node 0 to node 1:
@@ -255,7 +276,7 @@ links:
\textbf{txprefs} & Define the transmission performance of each wireless node (keys of each element uses \textbf{the range syntax}). This keyword is only available for wireless interfaces. &
\begin{tabminted}{yaml}
-txprefs:
+txperfs:
- 0 10kbps 0s
- 1 10kbps 5s
\end{tabminted}
@@ -266,10 +287,9 @@ txprefs:
\label{keywords:interfaces}
\end{table}
-In esds, txprefs (or transmission preferences) corresponds to the transmission performance of the
-wireless interface. It is used to compute the transmission duration of the wireless
-communication. When using custom orchestrator instantiation, the txprefs can be assigned on the
-diagonal components of the bandwidth and latency matrices.
+In esds, txperfs (or transmission performance) corresponds to the transmission performance on the
+wireless interface. It is used to compute the transmission duration of wireless communications.
+When using custom orchestrator instantiation, the txperfs parameter of a given node can be assigned by fixing the diagonal components of the bandwidth and latency matrices.
\end{document}