Commit 3095f229 authored by Julian Zobel's avatar Julian Zobel
Browse files

Generics to interfaces between UAV and Base

parent 719143a1
......@@ -16,10 +16,17 @@ public interface AerialCommunication {
/**
* Start the communication protocol
*/
public void start(Callback cb);
public void start();
/**
* Pause the communication protocol
* Run a specific routing of the communication protocol.
*
* @param cb
*/
public void run(Callback cb);
/**
* Pause/stop a specific routing of the communication protocol.
*/
public void pause();
......
......@@ -20,31 +20,57 @@
package de.tudarmstadt.maki.simonstrator.api.uavsupport.communication;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
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.Location;
/**
* Interface simulating direct hardware connection from Base to UAVs.
*
* @author Julian Zobel
*
*/
public interface BaseToUAVInterface {
public interface BaseToUAVInterface<T extends OverlayMessage, S extends Location> {
/**
* Connect the UAV to the base.
*
* @param uav
*/
public void connectUAVtoBase(UAVToBaseInterface uav);
public void connectUAVtoBase(UAVToBaseInterface<T, S> uav);
/**
* Disconnect UAV from base.
*
* @param uav
*/
public void disconnectUAV(UAVToBaseInterface uav);
public void disconnectUAV(UAVToBaseInterface<T, S> uav);
/**
* Mark an already connected UAV to be ready for assignments.
*
* @param uav
*/
public void readyUAV(UAVToBaseInterface uav);
public void readyUAV(UAVToBaseInterface<T, S> uav);
/**
* Update the message buffer with a given list of buffered messages.
* Messages will only be added if not expired and not already in the buffer.
*
* @param communicationMessages
* List of data messages
*/
public void addCommunicationData(LinkedHashSet<T> communicationMessages);
/**
* Update the monitoring information with a map of monitored locations
* sorted by each encountered node.
*
* @param monitoringData
*/
public void addMonitoringData(LinkedHashMap<OverlayContact, LinkedList<S>> monitoringData);
}
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.Location;
import de.tudarmstadt.maki.simonstrator.api.uavsupport.Actuator;
import de.tudarmstadt.maki.simonstrator.api.uavsupport.strategy.UAVStrategy;
public interface UAVToBaseInterface {
public interface UAVToBaseInterface<T extends OverlayMessage, S extends Location> {
public void connectToBase(BaseToUAVInterface base);
public void connectToBase(BaseToUAVInterface<T, S> 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