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
API
Commits
3b3cf3eb
Commit
3b3cf3eb
authored
Apr 25, 2023
by
Levent Görgü
Browse files
UAV flies to cluster
parent
9414744f
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/de/tudarmstadt/maki/simonstrator/api/component/sensor/location/Cluster.java
0 → 100644
View file @
3b3cf3eb
/*
* Copyright (c) 2005-2010 KOM – Multimedia Communications Lab
*
* This file is part of Simonstrator.KOM.
*
* Simonstrator.KOM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* PeerfactSim.KOM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PeerfactSim.KOM. If not, see <http://www.gnu.org/licenses/>.
*
*/
package
de.tudarmstadt.maki.simonstrator.api.component.sensor.location
;
import
java.util.LinkedHashMap
;
import
java.util.LinkedHashSet
;
import
java.util.LinkedList
;
import
de.tudarmstadt.maki.simonstrator.api.component.overlay.OverlayContact
;
public
interface
Cluster
<
S
extends
Location
>
{
public
LinkedHashSet
<
OverlayContact
>
getClusterNodes
();
public
LinkedHashMap
<
OverlayContact
,
S
>
getClusterNodesAsHashMap
();
public
int
getClusterHash
();
public
void
removeNode
(
OverlayContact
node
);
public
boolean
containsNode
(
OverlayContact
node
);
public
LinkedList
<
S
>
getConvexHull
();
}
src/de/tudarmstadt/maki/simonstrator/api/uavsupport/communication/BaseToUAVInterface.java
View file @
3b3cf3eb
...
...
@@ -26,8 +26,10 @@ import java.util.LinkedList;
import
de.tudarmstadt.maki.simonstrator.api.component.overlay.OverlayContact
;
import
de.tudarmstadt.maki.simonstrator.api.component.overlay.OverlayMessage
;
import
de.tudarmstadt.maki.simonstrator.api.component.sensor.location.Cluster
;
import
de.tudarmstadt.maki.simonstrator.api.component.sensor.location.Location
;
/**
* Interface simulating direct hardware connection from Base to UAVs.
*
...
...
@@ -38,27 +40,27 @@ import de.tudarmstadt.maki.simonstrator.api.component.sensor.location.Location;
* @param <S>
* Type of monitoring information from monitoring
*/
public
interface
BaseToUAVInterface
<
T
extends
OverlayMessage
,
S
extends
Location
>
{
public
interface
BaseToUAVInterface
<
T
extends
OverlayMessage
,
S
extends
Location
,
U
extends
Cluster
>
{
/**
* Connect the UAV to the base.
*
* @param uav
*/
public
void
connectUAVtoBase
(
UAVToBaseInterface
<
T
,
S
>
uav
);
public
void
connectUAVtoBase
(
UAVToBaseInterface
<
T
,
S
,
U
>
uav
);
/**
* Disconnect UAV from base.
*
* @param uav
*/
public
void
disconnectUAV
(
UAVToBaseInterface
<
T
,
S
>
uav
);
public
void
disconnectUAV
(
UAVToBaseInterface
<
T
,
S
,
U
>
uav
);
/**
* Mark an already connected UAV to be ready for assignments.
*
* @param uav
*/
public
void
readyUAV
(
UAVToBaseInterface
<
T
,
S
>
uav
);
public
void
readyUAV
(
UAVToBaseInterface
<
T
,
S
,
U
>
uav
);
/**
* Update the message buffer with a given list of buffered messages.
...
...
@@ -78,4 +80,13 @@ public interface BaseToUAVInterface<T extends OverlayMessage, S extends Location
public
void
addMonitoringData
(
LinkedHashMap
<
OverlayContact
,
LinkedList
<
S
>>
monitoringData
,
boolean
acquiredByMonitoringUAV
);
// /**
// * Update the cluster data information.
// *
// * @param clusterData
// */
public
void
addClusterData
(
LinkedHashSet
<
U
>
clusterInformation
,
boolean
acquiredByMonitoringUAV
);
// public void addAerialGroundMonitoring(AerialCommunication
// aerialGroundMonitoringComponent);
}
src/de/tudarmstadt/maki/simonstrator/api/uavsupport/communication/UAVToBaseInterface.java
View file @
3b3cf3eb
...
...
@@ -2,6 +2,7 @@ package de.tudarmstadt.maki.simonstrator.api.uavsupport.communication;
import
de.tudarmstadt.maki.simonstrator.api.Host
;
import
de.tudarmstadt.maki.simonstrator.api.component.overlay.OverlayMessage
;
import
de.tudarmstadt.maki.simonstrator.api.component.sensor.location.Cluster
;
import
de.tudarmstadt.maki.simonstrator.api.component.sensor.location.Location
;
import
de.tudarmstadt.maki.simonstrator.api.uavsupport.Actuator
;
import
de.tudarmstadt.maki.simonstrator.api.uavsupport.strategy.UAVStrategy
;
...
...
@@ -18,9 +19,9 @@ import de.tudarmstadt.maki.simonstrator.api.uavsupport.strategy.UAVStrategy;
* @param <S>
* Type of monitoring information from monitoring
*/
public
interface
UAVToBaseInterface
<
T
extends
OverlayMessage
,
S
extends
Location
>
{
public
interface
UAVToBaseInterface
<
T
extends
OverlayMessage
,
S
extends
Location
,
U
extends
Cluster
>
{
public
void
connectToBase
(
BaseToUAVInterface
<
T
,
S
>
base
);
public
void
connectToBase
(
BaseToUAVInterface
<
T
,
S
,
U
>
base
);
public
void
setStrategy
(
UAVStrategy
strategy
);
...
...
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