source: xssim/trunk/src/simulator/stats/implementation/LinkStats.java @ 104

Revision 104, 1.7 KB checked in by wojtekp, 13 years ago (diff)
  • Property svn:mime-type set to text/plain
Line 
1package simulator.stats.implementation;
2
3import simulator.stats.implementation.out.StatsSerializer;
4
5/**
6 *
7 * @author Marcin Krystek
8 *
9 */
10public class LinkStats implements StatsInterface {
11
12        protected String linkName;
13        protected double flowsSize;
14        protected double startBaduRate;
15        protected double delay;
16        protected double load;
17        protected double reservationLoad;
18
19        private String[] headers = { "link name", "baud rate(bits/s)", "delay(ms)",
20                        "size of transmitted data(in bytes)", "load", "reservations load" };
21
22        LinkStats(String linkName) {
23                this.linkName = linkName;
24                init();
25        }
26
27        public void init() {
28                this.flowsSize = 0;
29                this.startBaduRate = 0;
30                this.delay = 0;
31                this.load = 0;
32                this.reservationLoad = 0;
33        }
34
35        public String getLinkName() {
36                return linkName;
37        }
38
39        public void setLinkName(String linkName) {
40                this.linkName = linkName;
41        }
42
43        public double getFlowsSize() {
44                return flowsSize;
45        }
46
47        public void setFlowsSize(double flowsSize) {
48                this.flowsSize = flowsSize;
49        }
50
51        public double getStartBaduRate() {
52                return startBaduRate;
53        }
54
55        public void setStartBaduRate(double startBaduRate) {
56                this.startBaduRate = startBaduRate;
57        }
58
59        public double getDelay() {
60                return delay;
61        }
62
63        public void setDelay(double delay) {
64                this.delay = delay;
65        }
66
67        public double getLoad() {
68                return load;
69        }
70
71        public void setLoad(double load) {
72                this.load = load;
73        }
74
75        public double getReservationLoad() {
76                return reservationLoad;
77        }
78
79        public void setReservationLoad(double reservationLoad) {
80                this.reservationLoad = reservationLoad;
81        }
82
83        public Object serialize(StatsSerializer serializer) {
84                return serializer.visit(this);
85        }
86
87        public String[] getHeaders() {
88                return headers;
89        }
90
91}
Note: See TracBrowser for help on using the repository browser.