public interface Tracker
The AisPackets are assumed to arrive in timely order; i.e. by ever-increasing values of timestamp.
TODO: Identify further methods which can be shared between tracker implementations.
| Modifier and Type | Method and Description |
|---|---|
Target |
get(int mmsi)
Returns the latest target info for the specified MMSI number.
|
int |
size()
Returns the number of targets that is being tracked.
|
default void |
subscribeToPacketReader(AisPacketReader packetReader)
Start to track targets based on AisPackets received from an AisPacketReader.
|
default AisPacketStream.Subscription |
subscribeToPacketStream(AisPacketStream stream)
Start to track targets based on AisPackets received from an AisPacketStream.
|
void |
update(AisPacket aisPacket)
Update the tracker with a single AisPacket.
|
default AisPacketStream.Subscription subscribeToPacketStream(AisPacketStream stream)
stream - the AisPacketStream to track.default void subscribeToPacketReader(AisPacketReader packetReader) throws IOException
packetReader - the AisPacketReader to receive packets from.IOException - the io exceptionvoid update(AisPacket aisPacket)
aisPacket - the AIS packet.Target get(int mmsi)
mmsi - the MMSI numberint size()
Copyright © 2011–2019 Danish Maritime Authority. All rights reserved.