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
ILcdInputStreamFactory
of 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...ModelDescriptor
according 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.model
package 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
ConstructorDescriptionConstructs a newTLcdARINCDecoder
object with noILcdARINCHandler
installed. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addHandlerForTypeToBeDecoded
(ILcdARINCHandler aHandler) Adds anILcdARINCHandler
to the decoder.boolean
canDecodeSource
(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 anILcdModel
containing 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.int
Returns the number of handlers set on this decoder.Returns the initial bounds for each model created in thedecode
method.Returns the input stream factory that is currently used for creating input streams given source names.static boolean
Deprecated.This method has been deprecated.void
Removes all handlers from this decoder.void
setBoundsToFilterOn
(ILcdBounds aBoundsToFilterOn) Specifies the (geodetic) bounds that will be used as a filter on each model created in thedecode
method.void
setInitialBounds
(ILcdBounds aInitialBounds) Specifies the bounds to be used as initial bounds for each model created in thedecode
method.void
setInputStreamFactory
(ILcdInputStreamFactory aInputStreamFactory) Sets the input stream factory that will be used for creating input streams given source names.static void
setTraceOn
(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, wait
Methods inherited from interface com.luciad.model.ILcdModelDecoder
canDecodeSource, decodeModelMetadata, decodeModelMetadata, decodeSource, discoverDataSources
-
Constructor Details
-
TLcdARINCDecoder
public TLcdARINCDecoder()Constructs a newTLcdARINCDecoder
object with noILcdARINCHandler
installed. To decode one or more ARINC domain objects (e.g. navaids, routes, airspaces, ...), it is necessary to register one or moreILcdARINCHandler
objects 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:
canDecodeSource
in interfaceILcdModelDecoder
- Parameters:
aSource
- the source to be decoded- Returns:
- true for Arinc data sources
- See Also:
-
decode
Decodes the given source and returns anILcdModel
containing 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, aTLcdARINCAerodromeHandler
can be registered to decode Aerodrome objects. For each handler registered on this decoder, a new model will be created. When multiple handlers are registered, aTLcdModelList
is returned containing all the created models, with an instance ofTLcdARINCModelListDescriptor
as 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:
decode
in 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:ILcdModelDecoder
Returns a short, displayable name for the format that is decoded by thisILcdModelDecoder
.- Specified by:
getDisplayName
in interfaceILcdModelDecoder
- Returns:
- the displayable name of this
ILcdModelDecoder
.
-
addHandlerForTypeToBeDecoded
Description copied from interface:ILcdARINCDecoder
Adds anILcdARINCHandler
to the decoder.Each handler will generate an
ILcdModel
containing 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:
addHandlerForTypeToBeDecoded
in interfaceILcdARINCDecoder
- Parameters:
aHandler
- anILcdARINCHandler
implementation- See Also:
-
getHandlerForTypeToBeDecoded
Description copied from interface:ILcdARINCDecoder
Returns the handler with the given index.- Specified by:
getHandlerForTypeToBeDecoded
in 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:ILcdARINCDecoder
Returns the number of handlers set on this decoder.- Specified by:
getHandlerForTypeToBeDecodedCount
in interfaceILcdARINCDecoder
- Returns:
- the number of handlers
- See Also:
-
removeAllHandlersForTypeToBeDecoded
public void removeAllHandlersForTypeToBeDecoded()Description copied from interface:ILcdARINCDecoder
Removes all handlers from this decoder.- Specified by:
removeAllHandlersForTypeToBeDecoded
in interfaceILcdARINCDecoder
- See Also:
-
getErrorMessage
Description copied from interface:ILcdARINCDecoder
Returns 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:
getErrorMessage
in interfaceILcdARINCDecoder
- Returns:
- a string containing the errors occurred during the last decode process
-
getBoundsToFilterOn
Description copied from interface:ILcdARINCDecoder
Returns the (geodetic) bounds to filter on.- Specified by:
getBoundsToFilterOn
in interfaceILcdARINCDecoder
- Returns:
- the bounds to be filtered on
- See Also:
-
getInitialBounds
Description copied from interface:ILcdARINCDecoder
Returns the initial bounds for each model created in thedecode
method.- Specified by:
getInitialBounds
in interfaceILcdARINCDecoder
- Returns:
- the initial bounds for each model created
in the
decode
method - See Also:
-
setBoundsToFilterOn
Description copied from interface:ILcdARINCDecoder
Specifies the (geodetic) bounds that will be used as a filter on each model created in thedecode
method.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:
setBoundsToFilterOn
in interfaceILcdARINCDecoder
- Parameters:
aBoundsToFilterOn
- the bounds to be used as a filter
-
setInitialBounds
Description copied from interface:ILcdARINCDecoder
Specifies the bounds to be used as initial bounds for each model created in thedecode
method.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:
setInitialBounds
in interfaceILcdARINCDecoder
- Parameters:
aInitialBounds
- the initial bounds for each model created in thedecode
method
-
setInputStreamFactory
Sets the input stream factory that will be used for creating input streams given source names.- Specified by:
setInputStreamFactory
in 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:
getInputStreamFactory
in 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.Returnstrue
if 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 eithertrue
orfalse
as argument automatically turns off tracing for all other class instances for whichsetTraceOn
has not been called. If the argument isfalse
then 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.
-