## 5 Network Setup and Results: A Case Example
### Nodes Configuration  
After the nodes deployment, they must be configured in order to represent the scenario that the user wants to simulate. OMNeT++ allows configuring a node in two ways: (i) directly modifying the NED file of the network, either via text editor or through the OMNeT++ GUI [18] (see Figure 9) or (ii) overwriting the parameters in the _.ini_ file (initialisation file).  
While from a practical point of view the two methods are idempotent, changing the NED file better suits \"architectural\" changes (e.g., the number of Virtual Channels of a node), while changing the initialisation file is preferable to configure \"per-run\" parameters (e.g., the Expected Bandwidth of a Virtual Channel).  
In this example (see Figure 10), the network comprises the following nodes:  
Figure 9: Network setup and parameter configuration for a SpaceFibre endpoint and its internal Compression/Decompression module (CODEC).  
* a simulated SpaceFibre data sink (_spfiEndpointSink_ + _spfiSink_) with four Virtual Channels. The application does not produce any data but consumes all incoming packets as soon as they are received;
* a simulated SpaceFibre data source (_spfiEndpointSource_ + _spfiSource_) with four Virtual Channels. The application tries to send data on every Virtual Channel at maximum rate to the sink;
* a simulated SpaceWire data source (_spwEndpointSource_ + _spwSource_). The application tries to send data on the link at maximum rate to the sink;
* an external hardware node (_spwEndpointHIL_ + _HILSpw_), realising the bridge to the SpaceWire PXI analyser. The PXI analyser tries to send data at maximum rate to the sink;
* a Routing Switch, comprising two SpaceFibre ports and two SpaceWire ports.  
All the SpaceFibre links are configured with a link rate of 2.5 Gbps (2 Gbps of useful data, taking into account the 8b/10b encoding), while the SpaceWire links (both simulated and physical) are set to 50 Mbps (40 Mbps of useful data, taking into account the parity and control bits).  
Table 2 summarizes the main configuration parameters of the ports, with the Expected Bandwidths and the generated packets size. No protocol is being used on top of SpaceFibre and SpaceWire, so raw data are generated. The Expected Bandwidth is a SpaceFibre parameter defining the percentage of the total link bandwidth assigned to each Virtual Channel. As far as a Virtual Channel has data to send, this mechanism guarantees at least the assigned portion of the link capacity to that Virtual Channel. In case it has no data to send, this capacity is split among the other Virtual Channels. Table 3 represents the Virtual Network mapping inside the Routing Switch. Note that the SpaceWire ports are mapped to Virtual Network 1, so the wormholes will be established with Virtual Channel 1 of the output SpaceFibre port.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Port** & **Expected Bandwidth (per VC)** & **Packet Length (Bytes)** \\ \hline
**SpFi Data Source** & [10\%, 20\%, 30\%, 35\%] & 100,000 (all VCs) \\
**SpW Data Source** & & - 100,000 \\
**HIL Data Source** & [10\%, 20\%, 30\%, 35\%] & 100,000 (all VCs) \\
**Routing Switch (SpFi output port to Sink)** & [10\%, 20\%, 30\%, 35\%] & - \\ \hline \hline \end{tabular}
\end{table}
Table 2: Ports configuration parameters.  
Figure 10: Example network simulated in SHINE.  
\begin{table}
\begin{tabular}{l c} \hline \hline
**Port** & **Virtual Channels to Virtual Networks mapping** \\ \hline
**SpFi Data Source Port** & [0, 1, 2, 3] \\
**SpW Data Source Port** & [1] \\
**HIL Data Source Port** & [1] \\
**SpFi Data Sink Port** & [0, 1, 2, 3] \\ \hline \hline \end{tabular}
\end{table}
Table 3: Routing Switch Virtual Networks.