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
b531a41c
Commit
b531a41c
authored
Sep 05, 2017
by
Julian Zobel
Browse files
Location can now be set (for LCN Demo)
parent
99e501dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/api/topology/movement/SimLocationActuator.java
View file @
b531a41c
...
...
@@ -77,4 +77,10 @@ public interface SimLocationActuator extends LocationActuator {
*/
public
void
setMovementSpeed
(
double
speed
);
/**
* For the LCN DEMO: Set position
*/
public
void
setRealPosition
(
PositionVector
position
);
}
src/de/tud/kom/p2psim/impl/topology/DefaultTopologyComponent.java
View file @
b531a41c
...
...
@@ -70,7 +70,8 @@ import de.tudarmstadt.maki.simonstrator.api.component.transport.ConnectivityList
* Default implementation of a {@link TopologyComponent}.
*
* @author Bjoern Richerzhagen
* @version 1.0, 29.02.2012
* @author Julian Zobel
* @version 1.01, 05.09.2017
*/
public
class
DefaultTopologyComponent
implements
TopologyComponent
{
...
...
@@ -78,7 +79,7 @@ public class DefaultTopologyComponent implements TopologyComponent {
private
SimHost
host
;
private
final
PositionVector
position
;
private
PositionVector
position
;
private
Topology
topology
;
...
...
@@ -198,6 +199,12 @@ public class DefaultTopologyComponent implements TopologyComponent {
return
position
;
}
@Override
public
void
setRealPosition
(
PositionVector
position
)
{
this
.
position
=
position
;
}
@Override
public
Topology
getTopology
()
{
return
topology
;
...
...
@@ -681,4 +688,5 @@ public class DefaultTopologyComponent implements TopologyComponent {
return
"TopoComp: "
+
getHost
().
getId
()
+
" at "
+
position
.
toString
();
}
}
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