|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectPamguardMVC.PamObservable
PamguardMVC.PamDataBlock<AISDataUnit>
AIS.AISDataBlock
public class AISDataBlock
| Field Summary | |
|---|---|
private AISControl |
aisControl
|
private long |
emulatorTimeOffset
|
| Fields inherited from class PamguardMVC.PamObservable |
|---|
masterClockSample, objectChanged, overlayDraw, pamObservers, pamProfiler |
| Constructor Summary | |
|---|---|
AISDataBlock(AISControl aisControl,
PamProcess parentProcess)
|
|
| Method Summary | |
|---|---|
boolean |
addAISData(AISDataUnit newAISUnit)
aisDataUnit is always a new unit extracted from a group of AIS strings, but with a single lot of data. |
AISDataUnit |
findAISDataUnit(int mmsiNumber)
Find and AIS unit based on it's MMSI Number. |
EmulatedData |
getNextData()
|
boolean |
loadViewerData(long dataStart,
long dataEnd)
Instruction from the viewer scroll manager to load new data. |
boolean |
prepareDataSource(long[] timeLimits,
long timeOffset)
Prepare the data to be read into the emulator. |
private boolean |
wantData(AISDataUnit existingUnit,
AISDataUnit newUnit)
|
| Methods inherited from class PamguardMVC.PamObservable |
|---|
canDraw, clearchanged, countObservers, createKeyItem, deleteObserver, deleteObservers, drawDataUnit, findThreadedObserver, getCPUPercent, getCPUPercent, getHoverText, getLongestObserver, getPamObservers, getRequiredHistory, notifyObservers, notifyObservers, setChanged, setOverlayDraw, waitForThreadedObservers |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private AISControl aisControl
private long emulatorTimeOffset
| Constructor Detail |
|---|
public AISDataBlock(AISControl aisControl,
PamProcess parentProcess)
| Method Detail |
|---|
public boolean addAISData(AISDataUnit newAISUnit)
Whether or not we actually want this data is a complicated question.
If there is no limitation to range, we want it.
If range is limited and the new data is a position report we want it if it's in range.
If it's static data and does not match an existing set of data we don't want it since we don't know if it's in range or not.
If it's static data and matches existing data, then we want it.
If a new unit is created, notifications are sent out automatically. otherwise, generate one to notify observers.
newAISUnit - new AIS data unit
private boolean wantData(AISDataUnit existingUnit,
AISDataUnit newUnit)
public AISDataUnit findAISDataUnit(int mmsiNumber)
mmsiNumber -
public EmulatedData getNextData()
getNextData in interface NMEAEmulator
public boolean prepareDataSource(long[] timeLimits,
long timeOffset)
NMEAEmulatorThe task may be as simple as setting up an interator to go through the data already read into the datablock or it may involve setting up a new database query to get back to raw data.
prepareDataSource in interface NMEAEmulatortimeLimits - time limits for the emulationtimeOffset - time offset - between when the data
were collected and the time they should be emulated at.
public boolean loadViewerData(long dataStart,
long dataEnd)
PamDataBlock
loadViewerData in class PamDataBlock<AISDataUnit>dataStart - data start time in millisdataEnd - data end time in millis.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||