Class TLcdARINCDecoder
- All Implemented Interfaces:
ILcdARINCDecoder,ILcdInputStreamFactoryCapable,ILcdModelDecoder
ILcdARINCDecoder.
Input
| File | Required | Entry point | Description |
|---|---|---|---|
| *.dat | x | Data file containing a ARINC data | |
| *.pc | x | Data file containing a ARINC data |
Supported transfer protocols
- This model decoder supports all transfer protocols that are supported by
the
ILcdInputStreamFactoryof this decoder.
Model structure
- This model decoder creates a model per ARINC file.
- All models returned by this model decoder implement
ILcd2DBoundsIndexedModel.
Model descriptor
- All models returned by this model decoder have a
TLcdARINC...ModelDescriptoraccording to the object type. - The type name of the model descriptor is the "ARINC", and display name changes by the object type.
| Model Descriptor | Display Name |
|---|---|
| TLcdARINCDMEModelDescriptor | DME |
| TLcdARINCILSModelDescriptor | ILS |
| TLcdARINCMarkerModelDescriptor | Marker |
| TLcdARINCNDBModelDescriptor | NDB |
| TLcdARINCTACANModelDescriptor | TACAN |
| TLcdARINCVORModelDescriptor | VOR |
| TLcdARINCWayPointModelDescriptor | Waypoint |
Model reference
- All models returned by this model decoder have a
TLcdGeodeticReference. - The used datum is a standard
TLcdGeodeticDatum(WGS-84).
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 TLcdARINCDecoder();
ILcdModel model = decoder.decode("arinc.pc");
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 and specifications
- This decoder supports version 15, 17 and 18 of the ARINC 424 specification.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newTLcdARINCDecoderobject with noILcdARINCHandlerinstalled. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddHandlerForTypeToBeDecoded(ILcdARINCHandler aHandler) Adds anILcdARINCHandlerto the decoder.booleancanDecodeSource(String aSource) Returns true when the file or data source pointed to by 'aSource' is recognized as a decodable Arinc format.Decodes the given source and returns anILcdModelcontaining the decoded ARINC objects.Returns the (geodetic) bounds to filter on.Returns a short, displayable name for the format that is decoded by thisILcdModelDecoder.Returns the error message of the last decode call (when an error occurred).getHandlerForTypeToBeDecoded(int aIndex) Returns the handler with the given index.intReturns the number of handlers set on this decoder.Returns the initial bounds for each model created in thedecodemethod.Returns the input stream factory that is currently used for creating input streams given source names.static booleanDeprecated.This method has been deprecated.voidRemoves all handlers from this decoder.voidsetBoundsToFilterOn(ILcdBounds aBoundsToFilterOn) Specifies the (geodetic) bounds that will be used as a filter on each model created in thedecodemethod.voidsetInitialBounds(ILcdBounds aInitialBounds) Specifies the bounds to be used as initial bounds for each model created in thedecodemethod.voidsetInputStreamFactory(ILcdInputStreamFactory aInputStreamFactory) Sets the input stream factory that will be used for creating input streams given source names.static voidsetTraceOn(boolean aTraceOn) Deprecated.This method has been deprecated.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
-
TLcdARINCDecoder
public TLcdARINCDecoder()Constructs a newTLcdARINCDecoderobject with noILcdARINCHandlerinstalled. To decode one or more ARINC domain objects (e.g. navaids, routes, airspaces, ...), it is necessary to register one or moreILcdARINCHandlerobjects throughaddHandlerForTypeToBeDecoded(ILcdARINCHandler).
-
-
Method Details
-
canDecodeSource
Returns true when the file or data source pointed to by 'aSource' is recognized as a decodable Arinc format.- Specified by:
canDecodeSourcein interfaceILcdModelDecoder- Parameters:
aSource- the source to be decoded- Returns:
- true for Arinc data sources
- See Also:
-
decode
Decodes the given source and returns anILcdModelcontaining the decoded ARINC objects. Before invoking this method, a handler (ILcdARINCHandler) should be registered on this decoder for each type of object that must be decoded, throughaddHandlerForTypeToBeDecoded(ILcdARINCHandler). For example, aTLcdARINCAerodromeHandlercan be registered to decode Aerodrome objects. For each handler registered on this decoder, a new model will be created. When multiple handlers are registered, aTLcdModelListis returned containing all the created models, with an instance ofTLcdARINCModelListDescriptoras model descriptor. If necessary, this model list can be decomposed back into a set of individual models If no handlers are registered at all, an empty model will be returned.- Specified by:
decodein interfaceILcdModelDecoder- Parameters:
aSource- the full path to the file to be decoded, including the file name.- Returns:
- a model containing the decoded objects (possibly as a set of sub models).
- Throws:
IOException- thrown if an error occurs during the read process.- See Also:
-
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.
-
addHandlerForTypeToBeDecoded
Description copied from interface:ILcdARINCDecoderAdds anILcdARINCHandlerto the decoder.Each handler will generate an
ILcdModelcontaining one specific kind of domain object. At the end of the decode process, the models created by the available handlers will be brought together in aTLcdModelList.- Specified by:
addHandlerForTypeToBeDecodedin interfaceILcdARINCDecoder- Parameters:
aHandler- anILcdARINCHandlerimplementation- See Also:
-
getHandlerForTypeToBeDecoded
Description copied from interface:ILcdARINCDecoderReturns the handler with the given index.- Specified by:
getHandlerForTypeToBeDecodedin interfaceILcdARINCDecoder- Parameters:
aIndex- the index in the list of handlers- Returns:
- the handler at the given index
- See Also:
-
getHandlerForTypeToBeDecodedCount
public int getHandlerForTypeToBeDecodedCount()Description copied from interface:ILcdARINCDecoderReturns the number of handlers set on this decoder.- Specified by:
getHandlerForTypeToBeDecodedCountin interfaceILcdARINCDecoder- Returns:
- the number of handlers
- See Also:
-
removeAllHandlersForTypeToBeDecoded
public void removeAllHandlersForTypeToBeDecoded()Description copied from interface:ILcdARINCDecoderRemoves all handlers from this decoder.- Specified by:
removeAllHandlersForTypeToBeDecodedin interfaceILcdARINCDecoder- See Also:
-
getErrorMessage
Description copied from interface:ILcdARINCDecoderReturns the error message of the last decode call (when an error occurred).Note: the error message can only be retrieved once after a decode call.
- Specified by:
getErrorMessagein interfaceILcdARINCDecoder- Returns:
- a string containing the errors occurred during the last decode process
-
getBoundsToFilterOn
Description copied from interface:ILcdARINCDecoderReturns the (geodetic) bounds to filter on.- Specified by:
getBoundsToFilterOnin interfaceILcdARINCDecoder- Returns:
- the bounds to be filtered on
- See Also:
-
getInitialBounds
Description copied from interface:ILcdARINCDecoderReturns the initial bounds for each model created in thedecodemethod.- Specified by:
getInitialBoundsin interfaceILcdARINCDecoder- Returns:
- the initial bounds for each model created
in the
decodemethod - See Also:
-
setBoundsToFilterOn
Description copied from interface:ILcdARINCDecoderSpecifies the (geodetic) bounds that will be used as a filter on each model created in thedecodemethod.If this bounds is null, all objects found in the input file 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.
- Specified by:
setBoundsToFilterOnin interfaceILcdARINCDecoder- Parameters:
aBoundsToFilterOn- the bounds to be used as a filter
-
setInitialBounds
Description copied from interface:ILcdARINCDecoderSpecifies the bounds to be used as initial bounds for each model created in thedecodemethod.This bounds should be large enough to enclose (most of) the model objects. This option can improve performance by avoiding too many expansions of the model bounds.
This parameter may be null.
Note: This bounds is not a filter! If a model objects bounds does not interact with aInitialBounds, aInitialBounds will be enlarged to enclose the object.
- Specified by:
setInitialBoundsin interfaceILcdARINCDecoder- Parameters:
aInitialBounds- the initial bounds for each model created in thedecodemethod
-
setInputStreamFactory
Sets the input stream factory that will be used for creating input streams given source names.- Specified by:
setInputStreamFactoryin interfaceILcdInputStreamFactoryCapable- Parameters:
aInputStreamFactory- the input stream factory to be used.
-
getInputStreamFactory
Returns the input stream factory that is currently used for creating input streams given source names.- Specified by:
getInputStreamFactoryin interfaceILcdInputStreamFactoryCapable- Returns:
- the input stream factory that is currently used.
-
isTraceOn
public static boolean isTraceOn()Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Returnstrueif tracing is enabled for this class.- Returns:
- true if tracing is enabled for this class, false otherwise.
-
setTraceOn
public static void setTraceOn(boolean aTraceOn) Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Enables tracing for this class instance. Calling this method with eithertrueorfalseas argument automatically turns off tracing for all other class instances for whichsetTraceOnhas not been called. If the argument isfalsethen only the informative, warning and error log messages are recorded.- Parameters:
aTraceOn- if true then all log messages are recorded for this instance. If false, then only the informative, warning and error log messages are recorded.
-