Commit 3b3cf3eb authored by Levent Görgü's avatar Levent Görgü
Browse files

UAV flies to cluster

parent 9414744f
/*
* 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();
}
......@@ -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);
}
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment