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
c5beb3fb
Commit
c5beb3fb
authored
Jan 31, 2017
by
Clemens Krug
Browse files
Basic Server/Client implementation
+ Added a server + Basic communication protocol + Basic attraction point
parent
162b0813
Changes
2
Show whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/topology/movement/modularosm/attraction/BasicAttractionPoint.java
0 → 100644
View file @
c5beb3fb
package
de.tud.kom.p2psim.impl.topology.movement.modularosm.attraction
;
import
de.tud.kom.p2psim.impl.topology.PositionVector
;
import
de.tudarmstadt.maki.simonstrator.api.component.sensor.location.AttractionPoint
;
/**
* A basic attraction point, as simple as it can get. Really just a named location
* without any checks performed.
*/
public
class
BasicAttractionPoint
extends
PositionVector
implements
AttractionPoint
{
private
String
name
;
private
double
weight
=
0
;
private
double
radius
=
0
;
public
BasicAttractionPoint
(
String
name
,
PositionVector
pos
)
{
super
(
pos
);
this
.
name
=
name
;
}
@Override
public
String
getName
()
{
return
name
;
}
@Override
public
double
getWeight
()
{
return
weight
;
}
@Override
public
double
getRadius
()
{
return
radius
;
}
@Override
public
void
setWeight
(
double
weight
)
{
this
.
weight
=
weight
;
}
@Override
public
void
setRadius
(
double
radius
)
{
this
.
radius
=
radius
;
}
@Override
public
AttractionPoint
clone
(
String
newName
)
{
return
new
BasicAttractionPoint
(
newName
,
this
);
}
}
src/de/tud/kom/p2psim/impl/topology/movement/modularosm/transition/ManualAssignmentStrategy.java
View file @
c5beb3fb
...
...
@@ -36,7 +36,6 @@ public class ManualAssignmentStrategy implements ITransitionStrategy
@Override
public
void
reachedAttractionPoint
(
SimLocationActuator
ms
)
{
}
@Override
...
...
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