Class TLcdARINCModelDecoder
- All Implemented Interfaces:
ILcdInputStreamFactoryCapable,ILcdModelDecoder,ILcdStatusSource
TLcdARINCDecoder can be used.
Input files
| File | Required | Entry point | Description |
|---|---|---|---|
| *.txt | x | x | TXT file containing the ARINC data |
| *.dat | x | x | DAT file containing the ARINC data |
| *.pc | x | x | PC file containing the ARINC data |
| *.ari | x | x | ARI file containing the ARINC data |
Supported file transfer protocols
- This model decoder supports all transfer protocols that are supported by
the
ILcdInputStreamFactoryof this decoder.
Model structure
- This model decoder returns a
model listwith a model for each data type in the input. - All models returned by this model decoder implement
ILcd2DBoundsIndexedModel.
Model descriptor
- All models returned by this model decoder have a
TLcdARINC...Descriptor. - The type name of the model descriptors is
ARINC.
Model reference
- All models returned by this model decoder have an
ILcdGeodeticReference.
Model elements
- All ARINC model elements use an
ARINC data type. For more information about the model and its elements, see thecom.luciad.format.arinc.modelpackage and its sub-packages.
Sample code
ILcdModelDecoder decoder = new TLcdARINCModelDecoder();
ILcdModel model = decoder.decode( "arinc_data.dat" );
Performance tips
Thread safety
- The decoding of models is thread-safe, as long as no properties are changed during the decoding.
- The decoded models are thread-safe for read access.
Supported versions
- The decoder supports version 15, 17 and 18 of the ARINC 424 specification. The ARINC 424 specification can be obtained from the ARINC website.
Limitations
-
The following objects in ARINC data are not decoded:
- Airways Markers
- Path points, GLS
- Preferred Routes, Company Routes
- Cruising Tables
- Airport Gates
- Geographical Reference Table
- Flight Planning Arrival/Departure Data
- MLS (Microwave landing systems)
-
ARINC data can be supplied with respect to different geodetic datums. The LuciadLightspeed ARINC package supports the following geodetic datums (specified by their three character representation as used in the ARINC specification): ADI, AFG, AGD, AGE, ANS, AIN, AIO, ARF, ARS, AUA, AUG, BAT, BEL, BER, BOO, BRN, BUR, CAI, CAP, CGE, CHI, CHU, COA, DGI, EUR, EUS, EUT, FAH, GEO, GRK, GRX, GUA, HEN, HJO, HTN, IGF, INF, INH, IDN, IRL, KAN, KEA, LEH, LIB, LUZ, MIK, MAH, MAS, MER, MOD, MIN, NAH, NAP, NAS, NAU, NAW, NAR, NSD, NTH, OEG, OGB, PIE, POT, PTN, PRD, PRP, PUK, QAT, QUO, ROM, SAP, SCK, SAN, SAD, STO, TAN, TIL, TOY, TOK, TRI, U (WGS84), VOI, VOR, WGC, WGE, YAC, ZAN.
Objects containing data given in an unsupported datum, will be ignored by the decoder and thus not be added to the model.
- Since:
- 2014.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddStatusListener(ILcdStatusListener aListener) Registers the given listener so it will receive status events from this source.booleancanDecodeSource(String aSourceName) Checks whether this model decoder can decode the specified data source.Creates a new model from the given data source.Returns the (geodetic) bounds that will be used as a filter on the model created by this mode decoder.Returns a short, displayable name for the format that is decoded by thisILcdModelDecoder.Returns the input stream factory that is used.voidremoveStatusListener(ILcdStatusListener aListener) Removes the specified listener so it is no longer notified.voidsetBoundsToFilterOn(ILcdBounds aBoundsToFilterOn) Specifies (geodetic) bounds that will be used as a filter on the model created by this model decoder.voidsetInputStreamFactory(ILcdInputStreamFactory aInputStreamFactory) Sets the input stream factory to be used.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.luciad.model.ILcdModelDecoder
canDecodeSource, decodeModelMetadata, decodeModelMetadata, decodeSource, discoverDataSources
-
Constructor Details
-
TLcdARINCModelDecoder
public TLcdARINCModelDecoder()Creates a new model decoder that handles all types.
-
-
Method Details
-
setBoundsToFilterOn
Specifies (geodetic) bounds that will be used as a filter on the model created by this model decoder.If this bounds is
null, all objects found in the data source will be inserted into the model. If this bounds is notnull, only the objects whose bounds interact with the specified bounds will be inserted into the model.- Parameters:
aBoundsToFilterOn- the bounds to be used as a filter- See Also:
-
getBoundsToFilterOn
Returns the (geodetic) bounds that will be used as a filter on the model created by this mode decoder.- Returns:
- the bounds that will be used as a filter on the model created by this model
- See Also:
-
setInputStreamFactory
Description copied from interface:ILcdInputStreamFactoryCapableSets the input stream factory to be used.- Specified by:
setInputStreamFactoryin interfaceILcdInputStreamFactoryCapable- Parameters:
aInputStreamFactory- the input stream factory to be used.
-
getInputStreamFactory
Description copied from interface:ILcdInputStreamFactoryCapableReturns the input stream factory that is used.- Specified by:
getInputStreamFactoryin interfaceILcdInputStreamFactoryCapable- Returns:
- the input stream factory that is used.
-
getDisplayName
Description copied from interface:ILcdModelDecoderReturns a short, displayable name for the format that is decoded by thisILcdModelDecoder.- Specified by:
getDisplayNamein interfaceILcdModelDecoder- Returns:
- the displayable name of this
ILcdModelDecoder.
-
canDecodeSource
Checks whether this model decoder can decode the specified data source. It is acceptable for this method to returntruefor a source name whiledecodethrows an exception for that same source name.For performance reasons, we strongly recommend that this will only be a simple test. For example: check the file extension of a file, but not that the file exists or contains expected content.
By default, the implementation of this method only accepts files with one of the following extensions:".txt", ".dat", ".pc", ".ari". In order to accept more source names, this method can be overridden. This can for example be done to implement a more robust (but slower) check to see if a file is a valid ARINC file, see for exampleTLcdARINCDecoder.canDecodeSource(String).- Specified by:
canDecodeSourcein interfaceILcdModelDecoder- Parameters:
aSourceName- the data source to be verified; typically a file name or a URL.- Returns:
trueif this decoder can likely decode the data specified by the source name,falseotherwise.- See Also:
-
decode
Description copied from interface:ILcdModelDecoderCreates a new model from the given data source.- Specified by:
decodein interfaceILcdModelDecoder- Parameters:
aSourceName- the data source to be decoded; typically a file name or a URL.- Returns:
- A model containing the decoded data. While
nullis allowed, implementors are advised to throw an error instead. - Throws:
IOException- for any exceptions caused by IO problems or invalid data. Since decoding invalid data almost always results in RunTimeExceptions (NullPointerException, IndexOutOfBoundsException, IllegalArgumentException, ...) on unexpected places, implementations are advised to catch RuntimeExceptions in their decode() method, and wrap them into an IOException, as illustrated in the code snippet below.public ILcdModel decode( String aSourceName ) throws IOException { try (InputStream input = fInputStreamFactory.createInputStream(aSourceName)) { // Perform decoding ... } catch (RuntimeException e) { throw new IOException(e); } }- See Also:
-
addStatusListener
Description copied from interface:ILcdStatusSourceRegisters the given listener so it will receive status events from this source.
In case you need to register a listener which keeps a reference to an object with a shorter life-time than this status source, you can use a
ALcdWeakStatusListenerinstance as status listener.- Specified by:
addStatusListenerin interfaceILcdStatusSource- Parameters:
aListener- The listener to be notified when the status has changed.
-
removeStatusListener
Description copied from interface:ILcdStatusSourceRemoves the specified listener so it is no longer notified.- Specified by:
removeStatusListenerin interfaceILcdStatusSource- Parameters:
aListener- The listener to remove.
-