Commit a1e298a9 authored by Hejing Li's avatar Hejing Li Committed by Antoine Kaufmann
Browse files

doc: add how to integrate a new simulator

parent 14466c9b
......@@ -21,6 +21,7 @@
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.. _Simulator Adapters:
###################################
Simulator Adapters
###################################
......
......@@ -79,6 +79,20 @@ Add a Custom Image
Integrate a New Simulator
******************************
The simulator to be integrated should have its SimBricks adapter ready. Here we assume you already implemented SimBricks adapter for the simulator. Please refer to :ref:`Simulator Adapters <Simulator Adapters>` Section for more detail about how a SimBricks adapter works and how someone can implement it.
The next step is to add the command for launching the simulator to the orchestration framework. The class :class:`~simbricks.orchestration.simulators.Simulator` in ``experiments/simbricks/orchestration/simulators.py``, provides methods to set the command and configure the parameters to the simulator. There are several child classes inheriting from class :class:`~simbricks.orchestration.simulators.Simulator` including :class:`~simbricks.orchestration.simulators.PCIDevSim`, :class:`~simbricks.orchestration.simulators.NICSim`, :class:`~simbricks.orchestration.simulators.NetSim`, :class:`~simbricks.orchestration.simulators.HostSim` etc. You can create a new class for your simulator inheriting from one of these classes according to the simulator's category.
Below is an example of adding a class for ``NS3`` simulator.
.. literalinclude:: /../experiments/simbricks/orchestration/simulators.py
:linenos:
:lineno-start: 585
:lines: 585 - 598
:language: python
:name: NS3 simulator class
:caption: NS3 simulator class
******************************
Add a New Interface
******************************
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment