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

COVERAGE SUMMARY FOR SOURCE FILE [SimDelayResource.java]

nameclass, %method, %block, %line, %
SimDelayResource.java0%   (0/1)0%   (0/10)0%   (0/76)0%   (0/20)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class SimDelayResource0%   (0/1)0%   (0/10)0%   (0/76)0%   (0/20)
SimDelayResource (SchedulerModel, String, String): void 0%   (0/1)0%   (0/7)0%   (0/2)
dequeue (ISchedulableProcess): void 0%   (0/1)0%   (0/15)0%   (0/4)
doProcessing (ISchedulableProcess, int, double): void 0%   (0/1)0%   (0/23)0%   (0/4)
enqueue (ISchedulableProcess): void 0%   (0/1)0%   (0/12)0%   (0/3)
getQueueLengthFor (SimResourceInstance): int 0%   (0/1)0%   (0/3)0%   (0/1)
getRemainingDemand (ISchedulableProcess): double 0%   (0/1)0%   (0/5)0%   (0/1)
registerProcess (IRunningProcess): void 0%   (0/1)0%   (0/1)0%   (0/1)
start (): void 0%   (0/1)0%   (0/4)0%   (0/2)
stop (): void 0%   (0/1)0%   (0/1)0%   (0/1)
updateDemand (ISchedulableProcess, double): void 0%   (0/1)0%   (0/5)0%   (0/1)

1package de.uka.ipd.sdq.scheduler.resources.active;
2 
3import de.uka.ipd.sdq.scheduler.IRunningProcess;
4import de.uka.ipd.sdq.scheduler.ISchedulableProcess;
5import de.uka.ipd.sdq.scheduler.LoggingWrapper;
6import de.uka.ipd.sdq.scheduler.SchedulerModel;
7import de.uka.ipd.sdq.scheduler.events.DelayEvent;
8 
9public class SimDelayResource extends AbstractActiveResource {
10 
11        int num_running;
12        
13        public SimDelayResource(SchedulerModel model, String name, String id) {
14                super(model, -1, name, id);
15        }
16 
17 
18        public void start() {
19                this.num_running = 0;
20        }
21 
22        @Override
23        protected void dequeue(ISchedulableProcess process) {
24                this.num_running--;
25                fireStateChange(num_running, 0);
26                fireDemandCompleted(process);
27        }
28 
29        @Override
30        protected void doProcessing(ISchedulableProcess process, int resourceServiceId, double demand) {
31                LoggingWrapper.log("Delay: " + process + " demands " + demand);
32                new DelayEvent(getModel()).schedule(process, demand);
33                process.passivate();
34        }
35        
36        @Override
37        public double getRemainingDemand(ISchedulableProcess process) {
38                throw new UnsupportedOperationException("getRemainingDemand() not yet supported!");
39        }
40        
41        @Override
42        public void updateDemand(ISchedulableProcess process, double demand) {
43                throw new UnsupportedOperationException("updateDemand() not yet supported!");
44        }
45        
46        @Override
47        protected void enqueue(ISchedulableProcess process) {
48                this.num_running++;
49                fireStateChange(num_running, 0);
50        }
51 
52 
53        public void stop() {
54                
55        }
56 
57        public void registerProcess(IRunningProcess runningProcess) {
58                
59        }
60        
61 
62        public int getQueueLengthFor(SimResourceInstance simResourceInstance) {
63                return this.num_running;
64        }
65 
66 
67}

[all classes][de.uka.ipd.sdq.scheduler.resources.active]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov