Java Extensions for OMNeT++ 5.0 Henning Puttnies, Peter Danielis, - - PowerPoint PPT Presentation

java extensions for omnet 5 0
SMART_READER_LITE
LIVE PREVIEW

Java Extensions for OMNeT++ 5.0 Henning Puttnies, Peter Danielis, - - PowerPoint PPT Presentation

Institute of Applied Microelectronics and Computer Engineering Java Extensions for OMNeT++ 5.0 Henning Puttnies, Peter Danielis, Christian Koch, Dirk Timmermann University of Rostock, Germany Institute of Applied Microelectronics and Computer


slide-1
SLIDE 1

Institute of Applied Microelectronics and Computer Engineering

Java Extensions for OMNeT++ 5.0

Henning Puttnies, Peter Danielis, Christian Koch, Dirk Timmermann University of Rostock, Germany

slide-2
SLIDE 2

Institute of Applied Microelectronics and Computer Engineering

Motivation

 Network simulators: evaluation of innovative applications/protocols  Java:

  • Very predictable + easy to debug
  • Relatively platform independent (heterogeneous IoT scenarios)

 Combination of both in two steps:

  • 1. Java simulation models for early evaluation
  • 2. Derive Java prototype implementation to evaluate the approach on

different platforms

08/09/2017 2 OMNeT++ Community Summit 2017

slide-3
SLIDE 3

Institute of Applied Microelectronics and Computer Engineering

State of the Art – Java Network Simulators

08/09/2017 3 OMNeT++ Community Summit 2017

Name Existing Modules for Reuse Simulation Models in Java Still under Maintenance NS-3    JNS (NS-2 in JAVA)    JNetworkSim    JProwler    Java Simulator    Psimulator2 (for education)    No existing simulator supports Java network simulation sufficiently

slide-4
SLIDE 4

Institute of Applied Microelectronics and Computer Engineering

MyModel (Java) jsimple.exe (C++) cSimpleModule.cc cSimpleModule() handleMessage(cMessage *msg) JSimpleModule.cc JSimpleModule() handleMessage(cMessage *msg) MyModule.java MyModule() handleMessage(cMessage msg) JSimpleModule.java JSimpleModule() handleMessage(cMessage msg) long swigCPtr jobject javaPeer

Concept – Class Diagrams (Similar to OMNeT 4.6)

 Base on Java Native Interface (JNI)  MyModel: Java simulation model  jsimple.exe:

  • OMNeT++ simulation kernel
  • Extension modules (*.cc)

 JSimpleModule.cc:

  • Inherits from cSimpleModule.cc
  • javaPeer: pointer to SimpleModule.java

 JSimpleModule.java:

  • Java wrapper for JSimpleModule.cc
  • swigCPtr: pointer to JSimpleModule.cc

08/09/2017 4 OMNeT++ Community Summit 2017

slide-5
SLIDE 5

Institute of Applied Microelectronics and Computer Engineering

Concept – Execution Order (similar to OMNeT 4.6)

08/09/2017 5 OMNeT++ Community Summit 2017

 jsimple.exe: simulation executable  MySim.ini: loads a *.ned file that uses MyModule  initialize(): calls initJVM()  initJVM(): starts JVM  JVM is a shared library that can execute *.class files  Execution of Java simulation models is possible  MyModule(): calls JSimpleModule()  JSimpleModule(): calls C++ code C++ Java

Start jsimple.exe Read MySim.ini Call MyModule() Call JSimpleModule() Call JSimpleModule() via JNI JSimpleModule:: initialize() JSimpleModule() CSimpleModule() JUtil::initJVM() ... ... ...

slide-6
SLIDE 6

Institute of Applied Microelectronics and Computer Engineering

Evaluation – Combination of INET and Java

 Important for reuse of existing modules from INET  Never demonstrated before OMNeT++ 5.0  EtherHost: example Ethernet host  myEtherHost: own Ethernet host  EtherLLC: Link Layer  IEtherMAC: Mac Layer  EtherEchoSrv:

  • Registers at EtherLLC
  • Echoes received Ethernet

packets

  • Modifies Ethernet packets

(switches SRC and DEST)

08/09/2017 6 OMNeT++ Community Summit 2017

Combination of INET and Java is possible

EtherEchoSrv.java EtherLLC.h/.cc (INET) IEtherMAC.h/.cc (INET)

HostA

EtherHost.ned (INET)

HostB

myEtherHost.ned Ethernet

slide-7
SLIDE 7

Institute of Applied Microelectronics and Computer Engineering

Conclusion and Outlook

08/09/2017 7 OMNeT++ Community Summit 2017

 Outlook: Java extensions for OMNeT++ 5.1 (minor effort) Name Existing Modules for Reuse Simulation Models in Java Still Under Maintenance NS-3    JNS (NS-2 in JAVA)    JNetworkSim    JProwler    Java Simulator    Psimulator2 (for education)    Java + OMNeT 5.0   

slide-8
SLIDE 8

Institute of Applied Microelectronics and Computer Engineering

08/09/2017 8 OMNeT++ Community Summit 2017

Thank you for your attention. Questions?