Run org.eclipse.hawkbit.simulator.DeviceSimulator hawkBit APIs. The simulator supports DDI as well as the DMF integration APIs. In case there is no AMQP message broker (like rabbitMQ) running, you can disable the AMQP support for the device simulator, so the simulator is not trying to connect to an amqp message broker. This Cloudsim Tutorial will help you to setup it up using Eclipse IDE. Here We have used Eclipse Java IDE to configure CloudSim simulation toolkit. Following video demonstrates how to configure CloudSim 3.0.3 on ECLIPSE Java IDE.
Before you can run simulations you need to create
- a simulation configuration and
- a simulation runtime configuration.
Opening the Simulation Perspective
Open the simulation perspective, which provides you with the necessary views like the Simulation Statistics View. Select Window > Open Perspective > Other... and choose Process Simulation Perspectivein the upcoming dialog.
Now the simulation perspective opens with the following standard views needed for simulation:
You can adjust and extend the simulation perspective to your own requirements.
The Simulation View
To run simulations and obtain simulation results, you must display the Simulation Statistics View. In case it is not already open, display it via Window > Show View > Other ... and the following selection in the Show View pop-up dialog:
Starting and Stopping Simulations
You can
- start
- stop and
- pause
buttons with the corresponding buttons
in the simulation view.
The different tabbed panes in the simulation view will display the current values of runtime parameters (e.g. participant queue lengths). The time slider and the corresponding timestamps labels
will indicated the current position on the time axis during the simulation run.
After a simulation run is completed you can use the slider to review values of runtime parameters at any time in the simulation run interval.
Obtaining Tabular Results
The simulation view different tables are displaying runtime parameters. These tables and parameters are described in the following subsections.
Process Durations
Activity Durations
Transition Statistics
Participant Queue Lengths
Application Queue Lengths
Path Statistics
Drag and Drop To Microsoft Excel
You can drag and drop the content of any table in the simulation view into Microsoft Excel to further evaluate simulation results as indicated in the following screenshot after dragging and dropping from the activity statistics tab:
Obtaining Graphical Results
Obtaining Charts
To activate charts in the process model diagrams, push the chart button
in the simulation view. Charts will be displayed as follows.
You can enlarge the charts with moving the mouse cursor over the charts.
If you want to pin an enlarged chart, press the
button on the upper right corner of the enlarged chart.
Critical Paths
To visualize critical paths select a path from the Path pane in the simulation view
The corresponding path in the process model diagrams will be highlighted in red as follows
To deselect the highlighted path, select the top level entry in the Path pane:
Out of Memory Errors
If you have installed Eclipse Mars via the old-style installation process andan out of memory error occurs while running a simulation in the modelerplease increase the heap size available to Eclipse. To do this edit the eclipse.ini file, residing in your Eclipse folder.
Now set the minimal and maximal heap size, for example:
Hereby the -Xms option specifies the stack space and -Xmx the maximum heap size. MaxPermSize specifies the maximum PermGen size. PermGen means 'Permanent Generation' and it is a part of memory where all permanent objects are stored.
Note that these settings are already provided per default in case you have installedEclipse via the new Eclipse installer. Please refer to https://www.eclipse.org/downloads/installer.phpfor details.
The device simulator handles software update commands from the update server. It is designed to be used very conveniently,for example, from within a browser. Hence, all the endpoints use the GET verb.
Run on your own workstation
Or:
hawkBit APIs
The simulator supports DDI
as well as the DMF
integration APIs.
In case there is no AMQP message broker (like rabbitMQ) running, you can disable the AMQP support for the device simulator, so the simulator is not trying to connect to an amqp message broker.
Configuration property hawkbit.device.simulator.amqp.enabled=false
Usage
REST API
The device simulator exposes an REST-API which can be used to trigger device creation.
Optional parameters:
- name : name prefix simulated devices (default: 'dmfSimulated'), followed by counter
- amount : number of simulated devices (default: 20, capped at: 4000)
- tenant : in a multi-tenant ready hawkBit installation (default: 'DEFAULT')
- api : the API which should be used for the simulated device either
dmf
orddi
(default: 'dmf') - endpoint : URL which defines the hawkbit DDI base endpoint (default: 'http://localhost:8080')
- polldelay : number in seconds of the delay when DDI simulated devices should poll the endpoint (default: '30')
- gatewaytoken : an hawkbit gateway token to be used in case hawkbit does not allow anonymous access for DDI devices (default: ')
Example: for 20 simulated devices by DMF API (default)
Example: for 10 simulated devices that start with the name prefix 'activeSim':
Example: for 5 simulated devices that start with the name prefix 'ddi' using the Direct Device Integration API (http) authenticated by given gateway token, a pool interval of 10 seconds and a custom port for the DDI service.: