Class ImportA2LSettings

  • All Implemented Interfaces:
    java.io.Serializable

    public class ImportA2LSettings
    extends ImportInterfaceSettings
    ImportInterfaceSettings to import from an A2L file (including dcm, hex and txt file import).
    Author:
    Copyright (c) 2014-2024 Piketec GmbH - MIT License (MIT) - All rights reserved
    See Also:
    Serialized Form
    • Constructor Detail

      • ImportA2LSettings

        public ImportA2LSettings​(java.io.File a2lFile)
        Creates a new instance to be passed to Project.importIO(ImportInterfaceSettings).
        Parameters:
        a2lFile - The A2L file to be imported. Can be null but has to be set before invoking the import.
    • Method Detail

      • getA2lFile

        public java.io.File getA2lFile()
        Gets the A2L file to import.
        Returns:
        the a2lFile
      • getA2lFilePath

        public java.lang.String getA2lFilePath()
        Gets the absolute path to the A2L file to import.
        Returns:
        the a2lFile path
      • setA2lFile

        public void setA2lFile​(java.io.File a2lFile)
        Sets the A2L file to import.
        Parameters:
        a2lFile - the a2lFile to set
      • setA2lFileByPath

        public void setA2lFileByPath​(java.lang.String a2lFile)
        Sets the A2L file to import.
        Parameters:
        a2lFile - the path to the file to set
      • getInterfaceFileOrNull

        public java.io.File getInterfaceFileOrNull()
        Gets the text file containing interface information to reduce the imported declarations or null. If an interface file is given, only channels, parameters, and constants listed there will be imported.
        Returns:
        the interface file or null
      • getInterfaceFilePathOrNull

        public java.lang.String getInterfaceFilePathOrNull()
        Gets the absolute path to the text file containing interface information to reduce the imported declarations or null. If an interface file is given, only channels, parameters, and constants listed there will be imported.
        Returns:
        the path to the interface file or null
      • setInterfaceFileOrNull

        public void setInterfaceFileOrNull​(java.io.File interfaceFileOrNull)
        Sets the text file containing interface information to reduce the imported declarations or null. If an interface file is given, only channels, parameters, and constants listed there will be imported.
        Parameters:
        interfaceFileOrNull - the interface file or null to set
      • setInterfaceFilePathOrNull

        public void setInterfaceFilePathOrNull​(java.lang.String interfaceFileOrNull)
        Sets the text file containing interface information to reduce the imported declarations or null. If an interface file is given, only channels, parameters, and constants listed there will be imported.
        Parameters:
        interfaceFileOrNull - the path to the interface file or null to set
      • isImportParametersOnly

        public boolean isImportParametersOnly()
        Returns wheter or not the import is restricted to entries from the parameter file.
        Returns:
        true if only entries from the parameter file shall be imported.
      • setImportParametersOnly

        public void setImportParametersOnly​(boolean importParametersOnly)
        Sets whether or not to restrict the import to entries from the parameter file.
        Parameters:
        importParametersOnly - true if only entries from the parameter file shall be imported.
      • isArrayDimensionsFromA2L

        public boolean isArrayDimensionsFromA2L()
        Returns true if array dimensions are read from A2L instead of given HEX or DCM file.
        Returns:
        true if array dimensions are read from A2L instead of given HEX or DCM file
      • setArrayDimensionsFromA2L

        public void setArrayDimensionsFromA2L​(boolean arrayDimensionsFromA2L)
        Sets whether or not to read array dimensions from A2L instead of given HEX or DCM file.
        Parameters:
        arrayDimensionsFromA2L - true if array dimensions shall be read from A2L file
      • getFunctionsForMeasurementImportOrNull

        public java.util.Collection<java.lang.String> getFunctionsForMeasurementImportOrNull()
        Gets a collection of function names. If the collection is null all measurements will be imported. If not, only measurements that are matching the name of an argument of one of the specified functions will be imported.
        Returns:
        the collection of function names or null
      • setFunctionsForMeasurementImportOrNull

        public void setFunctionsForMeasurementImportOrNull​(java.util.Collection<java.lang.String> functionsOrNull)
        Sets a collection of function names. If the collection is null all measurements will be imported. If not, only measurements that are matching the name of an argument of one of the specified functions will be imported.
        Parameters:
        functionsOrNull - the collection of function names or null
      • getHexFileOrNull

        public java.io.File getHexFileOrNull()
        Gets the Intel HEX file to import. You can either import a hex file or a dcm file. If both are set only the hex file will be taken into account.
        Returns:
        the hex file to import
      • getHexFilePathOrNull

        public java.lang.String getHexFilePathOrNull()
        Gets the absolute path to the Intel HEX file to import. You can either import a hex file or a dcm file. If both are set only the hex file will be taken into account.
        Returns:
        the path to the hex file to import
      • setHexFileOrNull

        public void setHexFileOrNull​(java.io.File hexFileOrNull)
        Sets the Intel HEX file to import. You can either import a hex file or a dcm file. If both are set only the hex file will be taken into account.
        Parameters:
        hexFileOrNull - the Intel HEX file to import or null.
      • setHexFileOrNullByPath

        public void setHexFileOrNullByPath​(java.lang.String hexFileOrNull)
        Sets the Intel HEX file to import. You can either import a hex file or a dcm file. If both are set only the hex file will be taken into account.
        Parameters:
        hexFileOrNull - the path to the Intel HEX file to import or null.
      • getDeviceNameOrNull

        public java.lang.String getDeviceNameOrNull()
        Gets the device name for the Intel HEX file import. Can be null to import a generic device.
        Returns:
        the device name or null.
      • setDeviceName

        public void setDeviceName​(java.lang.String deviceNameOrNull)
        Sets the device name for the Intel HEX file import. Can be null to import a generic device.
        Parameters:
        deviceNameOrNull - the device name or null
      • getDcmFileOrNull

        public java.io.File getDcmFileOrNull()
        Gets the DCM file to import. You can either import a hex file or a dcm file. If both are set only the hex file will be taken into account.
        Returns:
        the DCM file or null
      • getDcmFilePathOrNull

        public java.lang.String getDcmFilePathOrNull()
        Gets the absolute path to the DCM file to import. You can either import a hex file or a dcm file. If both are set only the hex file will be taken into account.
        Returns:
        the path to the DCM file or null
      • setDcmFileOrNull

        public void setDcmFileOrNull​(java.io.File dcmFileOrNull)
        Sets the DCM file to import. You can either import a hex file or a dcm file. If both are set only the hex file will be taken into account.
        Parameters:
        dcmFileOrNull - the DCM file or null to set
      • setDcmFileOrNullByPath

        public void setDcmFileOrNullByPath​(java.lang.String dcmFileOrNull)
        Sets the DCM file to import. You can either import a hex file or a dcm file. If both are set only the hex file will be taken into account.
        Parameters:
        dcmFileOrNull - the path to the DCM file or null to set
      • getDefaultRasterNameOrNull

        public java.lang.String getDefaultRasterNameOrNull()
        Gets the raster name that will be entered into the measurement mapping flavor column raster_name for channels or measurements. Can be null or empty to use no default raster name.
        Returns:
        the default raster name
      • setDefaultRasterNameOrNull

        public void setDefaultRasterNameOrNull​(java.lang.String defaultRasterNameOrNull)
        Sets the raster name that will be entered into the measurement mapping flavor column raster_name for channels or measurements. Can be null or empty to use no default raster name.
        Parameters:
        defaultRasterNameOrNull - the default raster name or null
      • isSplitArraySignalsIntoScalars

        public boolean isSplitArraySignalsIntoScalars()
        Returns whether or not arrays will be split into multiple scalar signals.
        Returns:
        true if array signals will be split into multiple scalar signals.
      • setSplitArraySignalsIntoScalars

        public void setSplitArraySignalsIntoScalars​(boolean splitArraySignals)
        Sets whether or not array signals will be split into multiple scalar signals.
        Parameters:
        splitArraySignals - true if array signals shall be split into multiple scalar signals.
      • isSplitArrayStartIndexIsOne

        public boolean isSplitArrayStartIndexIsOne()
        Returns whether or not the suffix of the scalar signals resulting by splitting an array starts with "_000" or "_001".
        Returns:
        true if the suffix starts counting with "1", false if the suffix starts counting with "0"
        See Also:
        setSplitArraySignalsIntoScalars(boolean)
      • setSplitArrayStartIndexIsOne

        public void setSplitArrayStartIndexIsOne​(boolean splitArrayStartIndexIsOne)
        Sets whether or not the suffix of the scalar signals resulting by splitting an array starts with "_000" or "_001".
        Parameters:
        splitArrayStartIndexIsOne - true if the suffix starts counting with "1", false if the suffix starts counting with "0"
        See Also:
        setSplitArraySignalsIntoScalars(boolean)
      • getParameterExchangeMode

        public Parameter.ExchangeMode getParameterExchangeMode()
        Gets the exchange mode that will be set for imported parameters.
        Returns:
        the parameter exchange mode
      • setParameterExchangeMode

        public void setParameterExchangeMode​(Parameter.ExchangeMode parameterExchangeMode)
        Sets the exchange mode that will be set for imported parameters.
        Parameters:
        parameterExchangeMode - the new parameter exchange mode