From 800b2098ae47743ce15d6f49512d4d017279be2c Mon Sep 17 00:00:00 2001
From: Loic Guegan <manzerbredes@mailbox.org>
Date: Tue, 13 Sep 2022 21:57:32 +0200
Subject: Update manual

---
 manual/manual.tex | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 54 insertions(+), 4 deletions(-)

(limited to 'manual/manual.tex')

diff --git a/manual/manual.tex b/manual/manual.tex
index 4af9323..ed7508f 100644
--- a/manual/manual.tex
+++ b/manual/manual.tex
@@ -11,13 +11,12 @@
 \usepackage[T1]{fontenc}
 \usepackage{svg}
 \usepackage[most]{tcolorbox}
+\usepackage{adjustbox}
 
 % Packages setups
 \graphicspath{{./assets}}
 
 % Commands
-\newcommand{\stateoff}{"\textit{off}"\xspace}
-\newcommand{\stateon}{"\textit{on}"\xspace}
 \newcommand{\version}{\InputIfFileExists{version}{}{version}}
 \newcommand*{\addsource}[2]{\vspace{0.3cm}\begin{tcolorbox}[breakable,enhanced,arc=1.4mm,arc is angular,title=\textbf{\small#1}]\inputminted[breaklines,fontsize=\scriptsize]{#2}{#1}\end{tcolorbox}}
 \newenvironment{tabminted}[1]
@@ -124,8 +123,9 @@ Lets see in details the format of each section.
 \subsection{General}
 This section is used to settings up the overall parameters of esds. Table \ref{keywords:general} reference all the keywords for this section of the platform file.
 
-\begin{table}[]
+\begin{table}
   \centering
+  \begin{adjustbox}{width=0.7\textwidth}
   \begin{tabular}{m{0.25\textwidth}m{0.3\textwidth}p{0.4\textwidth}}
     \toprule
     \textbf{Keyword} & \textbf{Description} & \textbf{Example} \\ \midrule
@@ -167,11 +167,61 @@ breakpoints_callback:
   callback: "callback"
     \end{tabminted}
     \\ \bottomrule
-\end{tabular}
+  \end{tabular}
+  \end{adjustbox}
   \caption{Usable keywords in the general section of a esds platform file.}
   \label{keywords:general}
 \end{table}
 
+\subsection{Node}
+The node section is used configure the simulated node of esds. Table \ref{keywords:nodes} references
+all the keywords used in the nodes section.
+
+\begin{table}
+  \centering
+  \begin{adjustbox}{width=0.7\textwidth}
+  \begin{tabular}{m{0.25\textwidth}m{0.3\textwidth}p{0.4\textwidth}}
+    \toprule
+    \textbf{Keyword} & \textbf{Description} & \textbf{Example} \\ \midrule
+
+    \textbf{count} & Number of simulated nodes &
+    \begin{tabminted}{yaml}
+nodes: 5
+    \end{tabminted}
+    \\ \cmidrule{1-3}
+    
+    \textbf{implementations} & Bind each node to their respective implementation (uses \textbf{the range syntax}) &
+    \begin{tabminted}{yaml}
+implementations:
+   - 0 sender.py
+   - 1-@ receiver.py
+    \end{tabminted}
+    \\ \cmidrule{1-3}
+    
+    \textbf{arguments} & Define the arguments that should be pass to each node implementation (keys of each element uses \textbf{the range syntax}) &
+    \begin{tabminted}{yaml}
+arguments: {
+        "all": 2 
+}
+    \end{tabminted}
+    \\ \bottomrule
+  \end{tabular}
+  \end{adjustbox}
+  \caption{Usable keywords in the nodes section of a esds platform file.}
+  \label{keywords:nodes}
+\end{table}
+
+Many 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
+node will have an allocated $id$ such that $id \in [0,1,...,p-1]$. Here are examples of the range
+syntax for a simulation that uses 5 nodes:
+\begin{itemize}
+\item \makebox[2cm]{\textbf{0,1,2,3}\hfill} Node 0,1,2 and 3
+\item \makebox[2cm]{\textbf{0-2}\hfill} Node 0,1 and 2
+\item \makebox[2cm]{\textbf{all}\hfill} Node 0,1,2,3 and 4
+\item \makebox[2cm]{\textbf{2-@}\hfill} Node 2,3 and 4
+\item \makebox[2cm]{\textbf{0-@}\hfill} Node 0,1,2,3 and 4
+\end{itemize}
 
 \end{document}
 
-- 
cgit v1.2.3

