EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.simulation.abstractsimengine.desmoj]

COVERAGE SUMMARY FOR SOURCE FILE [DesmoJExperiment.java]

nameclass, %method, %block, %line, %
DesmoJExperiment.java0%   (0/2)0%   (0/8)0%   (0/77)0%   (0/19)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class DesmoJExperiment0%   (0/1)0%   (0/6)0%   (0/61)0%   (0/16)
DesmoJExperiment (DesmoJModel): void 0%   (0/1)0%   (0/29)0%   (0/7)
getCurrentSimulationTime (): double 0%   (0/1)0%   (0/6)0%   (0/1)
getExperiment (): Experiment 0%   (0/1)0%   (0/3)0%   (0/1)
scheduleEvent (AbstractExperiment$IEvent, double): void 0%   (0/1)0%   (0/15)0%   (0/3)
startSimulator (): void 0%   (0/1)0%   (0/4)0%   (0/2)
stopSimulator (): void 0%   (0/1)0%   (0/4)0%   (0/2)
     
class DesmoJExperiment$10%   (0/1)0%   (0/2)0%   (0/16)0%   (0/4)
DesmoJExperiment$1 (DesmoJExperiment, Model, String, boolean, AbstractExperim... 0%   (0/1)0%   (0/12)0%   (0/2)
eventRoutine (): void 0%   (0/1)0%   (0/4)0%   (0/2)

1package de.uka.ipd.sdq.simulation.abstractsimengine.desmoj;
2 
3import de.uka.ipd.sdq.simulation.abstractsimengine.AbstractExperiment;
4import desmoj.core.simulator.Experiment;
5import desmoj.core.simulator.ExternalEvent;
6import desmoj.core.simulator.TimeSpan;
7 
8/**
9 * @author Steffen Becker
10 * @author Philipp Merkle
11 */
12public class DesmoJExperiment extends AbstractExperiment {
13 
14    private Experiment experiment;
15    
16    private DesmoJModel desmojModel;
17 
18    public DesmoJExperiment(DesmoJModel model) {
19        super(model);
20        
21        this.desmojModel = model;
22        this.experiment = new Experiment(model.getConfiguration().getNameExperimentRun());
23        this.desmojModel.connectToExperiment(experiment);
24        this.experiment.setShowProgressBar(false);
25        
26        this.scheduleEvent(this.CHECK_EVENT, 1);
27    }
28 
29    public double getCurrentSimulationTime() {
30        return experiment.getSimClock().getTime().getTimeAsDouble();
31    }
32 
33    public Experiment getExperiment() {
34        return this.experiment;
35    }
36 
37    @Override
38    public void scheduleEvent(final IEvent event, final double delay) {
39        new ExternalEvent(desmojModel, "StopEvent", false) {
40            @Override
41            public void eventRoutine() {
42                event.run();
43            }
44        }.schedule(new TimeSpan(delay));
45    }
46 
47    @Override
48    public void startSimulator() {
49        this.experiment.start();
50    }
51 
52    @Override
53    public void stopSimulator() {
54        // TODO in Desmo-J, "stopped" experiments can be proceeded. Check, if it is here necessary
55        // to abort the experiment instead.
56        this.experiment.stop();
57    }
58 
59}

[all classes][de.uka.ipd.sdq.simulation.abstractsimengine.desmoj]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov