Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simonstrator
PeerfactSim.KOM
Commits
151ba806
Commit
151ba806
authored
Nov 26, 2015
by
Nils Richerzhagen
Browse files
Merge branch 'master' into 'nr/master-debug'
Merge Master into nr/master-debug See merge request !24
parents
461c056b
4cdbe8c9
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/linklayer/mac/wifi/Ieee80211AdHocMac.java
View file @
151ba806
...
...
@@ -288,10 +288,9 @@ public class Ieee80211AdHocMac extends AbstractMacLayer {
* reseted to 0.
*/
protected
void
sendNextMessage
()
{
toSend
=
null
;
toSend
=
getQueueHead
()
;
retryCounter
=
0
;
if
(
getQueueSize
()
>
0
)
{
toSend
=
getQueueHead
();
if
(
toSend
!=
null
)
{
sendMessage
();
}
}
...
...
src/de/tud/kom/p2psim/impl/topology/views/VisualizationTopologyView.java
View file @
151ba806
...
...
@@ -338,9 +338,9 @@ public class VisualizationTopologyView extends JFrame implements TopologyView,
g2
.
setColor
(
Color
.
WHITE
);
g2
.
fillRect
(
0
,
0
,
VisualizationInjector
.
getWorldX
(),
VisualizationInjector
.
getWorldY
());
g2
.
setPaint
(
Color
.
BLACK
);
g2
.
drawString
(
"100 meters"
,
10
,
15
);
g2
.
drawLine
(
1
0
,
3
0
,
10
+
VisualizationInjector
.
scaleValue
(
100
),
3
0
);
g2
.
setPaint
(
Color
.
MAGENTA
);
g2
.
setStroke
(
new
BasicStroke
(
2
)
);
g2
.
drawLine
(
0
,
0
,
VisualizationInjector
.
scaleValue
(
100
),
0
);
}
}
...
...
src/de/tud/kom/p2psim/impl/topology/views/fiveg/AccessPointSegmentDatabase.java
View file @
151ba806
...
...
@@ -20,32 +20,20 @@
package
de.tud.kom.p2psim.impl.topology.views.fiveg
;
import
de.tudarmstadt.maki.simonstrator.api.Rate
;
import
de.tudarmstadt.maki.simonstrator.api.Time
;
public
class
AccessPointSegmentDatabase
extends
AbstractGridBasedTopologyDatabase
{
public
AccessPointSegmentDatabase
()
{
super
(
5
0
,
true
);
super
(
10
0
,
true
);
}
@Override
protected
Entry
createEntryFor
(
int
segmentID
,
boolean
isCloudlet
)
{
if
(
segmentID
==
105
)
{
/*
* FIXME just testing
*/
return
new
StaticEntry
(
segmentID
,
0
,
0
,
10
*
Time
.
MILLISECOND
,
10
*
Time
.
MILLISECOND
,
1000000
,
1000000
);
}
if
(
segmentID
==
240
)
{
/*
* FIXME just testing
*/
return
new
StaticEntry
(
segmentID
,
0
,
0
,
38
*
Time
.
MILLISECOND
,
38
*
Time
.
MILLISECOND
,
1000000
,
1000000
);
}
return
null
;
return
new
StaticEntry
(
segmentID
,
0
,
0
,
50
*
Time
.
MILLISECOND
,
50
*
Time
.
MILLISECOND
,
10
*
Rate
.
Mbit_s
,
10
*
Rate
.
Mbit_s
);
}
}
src/de/tud/kom/p2psim/impl/topology/views/visualization/world/FiveGVisualization.java
View file @
151ba806
...
...
@@ -35,6 +35,7 @@ import de.tud.kom.p2psim.impl.topology.views.FiveGTopologyView;
import
de.tud.kom.p2psim.impl.topology.views.VisualizationTopologyView.VisualizationInjector
;
import
de.tud.kom.p2psim.impl.topology.views.fiveg.AbstractGridBasedTopologyDatabase
;
import
de.tud.kom.p2psim.impl.topology.views.fiveg.FiveGTopologyDatabase.Entry
;
import
de.tudarmstadt.maki.simonstrator.api.Rate
;
import
de.tudarmstadt.maki.simonstrator.api.Time
;
/**
...
...
@@ -146,13 +147,17 @@ public class FiveGVisualization extends JComponent {
g2
.
setStroke
(
new
BasicStroke
(
(
float
)
(
10
*
entry
.
getDropProbability
(
isUpload
))));
g2
.
drawRect
(
x
,
y
,
stepSize
,
stepSize
);
g2
.
setColor
(
new
Color
(
0
,
0
,
0
,
100
));
g2
.
setColor
(
new
Color
(
255
,
255
,
255
,
255
));
g2
.
drawString
(
"L: "
+
entry
.
getLatency
(
isUpload
)
/
Time
.
MILLISECOND
+
" ms"
,
x
+
10
,
y
+
15
);
g2
.
drawString
(
"L: "
+
entry
.
getLatency
(
isUpload
)
/
Time
.
MILLISECOND
,
x
+
10
,
y
+
10
);
g2
.
drawString
(
"D: "
+
(
int
)
(
entry
.
getDropProbability
(
isUpload
)
*
100
),
"D: "
+
(
int
)
(
entry
.
getDropProbability
(
isUpload
)
*
100
)
+
" %"
,
x
+
10
,
y
+
25
);
g2
.
drawString
(
"BW: "
+
(
int
)
(
entry
.
getBandwidth
(
isUpload
)
/
Rate
.
kbit_s
)
+
" kBit/s"
,
x
+
10
,
y
+
35
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment