Class TLcdARINCModelDecoder

java.lang.Object
com.luciad.format.arinc.TLcdARINCModelDecoder
All Implemented Interfaces:
ILcdInputStreamFactoryCapable, ILcdModelDecoder, ILcdStatusSource

This model decoder decodes all data from an ARINC file. For full control over the decoding process, e.g. in order to partially decode an ARINC file, 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 ILcdInputStreamFactory of this decoder.

Model structure

Model descriptor

  • All models returned by this model decoder have a TLcdARINC...Descriptor.
  • The type name of the model descriptors is ARINC.

Model reference

Model elements

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 Details

    • TLcdARINCModelDecoder

      public TLcdARINCModelDecoder()
      Creates a new model decoder that handles all types.
  • Method Details

    • setBoundsToFilterOn

      public void setBoundsToFilterOn(ILcdBounds aBoundsToFilterOn)
      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 not null, 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

      public ILcdBounds 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

      public void setInputStreamFactory(ILcdInputStreamFactory aInputStreamFactory)
      Description copied from interface: ILcdInputStreamFactoryCapable
      Sets the input stream factory to be used.
      Specified by:
      setInputStreamFactory in interface ILcdInputStreamFactoryCapable
      Parameters:
      aInputStreamFactory - the input stream factory to be used.
    • getInputStreamFactory

      public ILcdInputStreamFactory getInputStreamFactory()
      Description copied from interface: ILcdInputStreamFactoryCapable
      Returns the input stream factory that is used.
      Specified by:
      getInputStreamFactory in interface ILcdInputStreamFactoryCapable
      Returns:
      the input stream factory that is used.
    • getDisplayName

      public String getDisplayName()
      Description copied from interface: ILcdModelDecoder
      Returns a short, displayable name for the format that is decoded by this ILcdModelDecoder.
      Specified by:
      getDisplayName in interface ILcdModelDecoder
      Returns:
      the displayable name of this ILcdModelDecoder.
    • canDecodeSource

      public boolean canDecodeSource(String aSourceName)
      Checks whether this model decoder can decode the specified data source. It is acceptable for this method to return true for a source name while decode throws 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 example TLcdARINCDecoder.canDecodeSource(String).

      Specified by:
      canDecodeSource in interface ILcdModelDecoder
      Parameters:
      aSourceName - the data source to be verified; typically a file name or a URL.
      Returns:
      true if this decoder can likely decode the data specified by the source name, false otherwise.
      See Also:
    • decode

      public ILcdModel decode(String aSourceName) throws IOException
      Description copied from interface: ILcdModelDecoder
      Creates a new model from the given data source.
      Specified by:
      decode in interface ILcdModelDecoder
      Parameters:
      aSourceName - the data source to be decoded; typically a file name or a URL.
      Returns:
      A model containing the decoded data. While null is 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

      public void addStatusListener(ILcdStatusListener aListener)
      Description copied from interface: ILcdStatusSource

      Registers 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 ALcdWeakStatusListener instance as status listener.

      Specified by:
      addStatusListener in interface ILcdStatusSource
      Parameters:
      aListener - The listener to be notified when the status has changed.
    • removeStatusListener

      public void removeStatusListener(ILcdStatusListener aListener)
      Description copied from interface: ILcdStatusSource
      Removes the specified listener so it is no longer notified.
      Specified by:
      removeStatusListener in interface ILcdStatusSource
      Parameters:
      aListener - The listener to remove.