public class TLcdASDILiveDecoder extends ALcdASDIDecoder
Depending on the type of messages in the ASDI feed different
objects are added to the
objects have an
ILcdModelDescriptor that is an
ALcdASDIModelDescriptor. The method
allows to distinct between the different models.
Following table gives an overview of the different models in the
specifying for each a description, the messages taken into account,
the domain objects in the model and the value returned from
|Model description||ASDI messages||Domain objects||
|Flight plan data||FZ, AF, DZ, UZ, AZ, RZ and RT||
The amount of points kept for the
TLcdASDITrajectory objects associated
TLcdASDITrack can be limited with
Users of the live decoder that read the data in the
for instance for displaying it on a map, must be sure the data is consistent when using it.
This requires some synchronization.
Therefore, whenever the decoder adds a sub model to the
TLcdModelList, it takes a write lock on the
Whenever it makes a modification to one of the elements of a sub model, it takes
a write lock on the sub model. Users of the live decoder can and should then take the
appropriate read locks to avoid synchronization problems.
|Constructor and Description|
|Modifier and Type||Method and Description|
Modifies an existing
Returns the history length.
Sets the history length to the given length.
getMessageFilter, getStartTime, setMessageFilter, setStartTime
TLcdASDILiveDecoder, a decoder for decoding live ASDI data.
public void setHistoryLength(int aHistoryLength)
TLcdASDITrajectoryobjects associated with each
TLcdASDITrackto the given length.
aHistoryLength- The maximum amount of points that are kept in the history, 1 <= aHistoryLength, is
Integer.MAX_VALUEby default meaning all points are kept.
public int getHistoryLength()
public void decodeSFCT(java.io.InputStream aStream, int aFireEventMode, TLcdModelList aModelSFCT) throws java.io.IOException
TLcdModelListto contain new ASDI data read from the given
InputStream. This method does not return until all data is read. It is therefore advised to call it from a dedicated thread. To stop the decoding process, use
aStream- The stream to read an ASDI message from.
aFireEventMode- One of
ILcdFireEventMode.NO_EVENT. It allows to specify when and if any model events need to be fired when the model is changed by this decoder. If
FIRE_NOWis used, changes are immediately propagated, and the user of this method does not need to do anything else. If for example
FIRE_LATERis used, the events are collected. It is than up the the user of this method to fire those collected changes once in a while using
aModelSFCT- The model to modify.
java.io.IOException- In case of IO failure.