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
3095f229
Commit
3095f229
authored
Jun 01, 2022
by
Julian Zobel
Browse files
Generics to interfaces between UAV and Base
parent
719143a1
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/de/tudarmstadt/maki/simonstrator/api/uavsupport/communication/AerialCommunication.java
View file @
3095f229
...
...
@@ -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
();
...
...
src/de/tudarmstadt/maki/simonstrator/api/uavsupport/communication/BaseToUAVInterface.java
View file @
3095f229
...
...
@@ -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
);
}
src/de/tudarmstadt/maki/simonstrator/api/uavsupport/communication/UAVToBaseInterface.java
View file @
3095f229
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
);
...
...
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