Class ImportA2LSettings
- java.lang.Object
-
- com.piketec.tpt.api.importinterface.ImportInterfaceSettings
-
- com.piketec.tpt.api.importinterface.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 Summary
Constructors Constructor Description ImportA2LSettings(java.io.File a2lFile)
Creates a new instance to be passed toProject.importIO(ImportInterfaceSettings)
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.File
getA2lFile()
Gets the A2L file to import.java.lang.String
getA2lFilePath()
Gets the absolute path to the A2L file to import.java.io.File
getDcmFileOrNull()
Gets the DCM file to import.java.lang.String
getDcmFilePathOrNull()
Gets the absolute path to the DCM file to import.java.lang.String
getDefaultRasterNameOrNull()
Gets the raster name that will be entered into the measurement mapping flavor column raster_name for channels or measurements.java.lang.String
getDeviceNameOrNull()
Gets the device name for the Intel HEX file import.java.util.Collection<java.lang.String>
getFunctionsForMeasurementImportOrNull()
Gets a collection of function names.java.io.File
getHexFileOrNull()
Gets the Intel HEX file to import.java.lang.String
getHexFilePathOrNull()
Gets the absolute path to the Intel HEX file to import.java.io.File
getInterfaceFileOrNull()
Gets the text file containing interface information to reduce the imported declarations ornull
.java.lang.String
getInterfaceFilePathOrNull()
Gets the absolute path to the text file containing interface information to reduce the imported declarations ornull
.Parameter.ExchangeMode
getParameterExchangeMode()
Gets the exchange mode that will be set for imported parameters.boolean
isArrayDimensionsFromA2L()
Returnstrue
if array dimensions are read from A2L instead of given HEX or DCM file.boolean
isImportParametersOnly()
Returns wheter or not the import is restricted to entries from the parameter file.boolean
isSplitArraySignalsIntoScalars()
Returns whether or not arrays will be split into multiple scalar signals.boolean
isSplitArrayStartIndexIsOne()
Returns whether or not the suffix of the scalar signals resulting by splitting an array starts with "_000" or "_001".void
setA2lFile(java.io.File a2lFile)
Sets the A2L file to import.void
setA2lFileByPath(java.lang.String a2lFile)
Sets the A2L file to import.void
setArrayDimensionsFromA2L(boolean arrayDimensionsFromA2L)
Sets whether or not to read array dimensions from A2L instead of given HEX or DCM file.void
setDcmFileOrNull(java.io.File dcmFileOrNull)
Sets the DCM file to import.void
setDcmFileOrNullByPath(java.lang.String dcmFileOrNull)
Sets the DCM file to import.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.void
setDeviceName(java.lang.String deviceNameOrNull)
Sets the device name for the Intel HEX file import.void
setFunctionsForMeasurementImportOrNull(java.util.Collection<java.lang.String> functionsOrNull)
Sets a collection of function names.void
setHexFileOrNull(java.io.File hexFileOrNull)
Sets the Intel HEX file to import.void
setHexFileOrNullByPath(java.lang.String hexFileOrNull)
Sets the Intel HEX file to import.void
setImportParametersOnly(boolean importParametersOnly)
Sets whether or not to restrict the import to entries from the parameter file.void
setInterfaceFileOrNull(java.io.File interfaceFileOrNull)
Sets the text file containing interface information to reduce the imported declarations ornull
.void
setInterfaceFilePathOrNull(java.lang.String interfaceFileOrNull)
Sets the text file containing interface information to reduce the imported declarations ornull
.void
setParameterExchangeMode(Parameter.ExchangeMode parameterExchangeMode)
Sets the exchange mode that will be set for imported parameters.void
setSplitArraySignalsIntoScalars(boolean splitArraySignals)
Sets whether or not array signals will be split into multiple scalar signals.void
setSplitArrayStartIndexIsOne(boolean splitArrayStartIndexIsOne)
Sets whether or not the suffix of the scalar signals resulting by splitting an array starts with "_000" or "_001".-
Methods inherited from class com.piketec.tpt.api.importinterface.ImportInterfaceSettings
getMappingOrNull, getSynchronizationMethod, setMappingOrNull, setSynchronizationMethod
-
-
-
-
Constructor Detail
-
ImportA2LSettings
public ImportA2LSettings(java.io.File a2lFile)
Creates a new instance to be passed toProject.importIO(ImportInterfaceSettings)
.- Parameters:
a2lFile
- The A2L file to be imported. Can benull
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 ornull
. 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 ornull
. 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 ornull
. If an interface file is given, only channels, parameters, and constants listed there will be imported.- Parameters:
interfaceFileOrNull
- the interface file ornull
to set
-
setInterfaceFilePathOrNull
public void setInterfaceFilePathOrNull(java.lang.String interfaceFileOrNull)
Sets the text file containing interface information to reduce the imported declarations ornull
. If an interface file is given, only channels, parameters, and constants listed there will be imported.- Parameters:
interfaceFileOrNull
- the path to the interface file ornull
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()
Returnstrue
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 isnull
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 isnull
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 ornull
-
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 ornull
.
-
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 ornull
.
-
getDeviceNameOrNull
public java.lang.String getDeviceNameOrNull()
Gets the device name for the Intel HEX file import. Can benull
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 benull
to import a generic device.- Parameters:
deviceNameOrNull
- the device name ornull
-
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 ornull
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 ornull
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 benull
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 benull
or empty to use no default raster name.- Parameters:
defaultRasterNameOrNull
- the default raster name ornull
-
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
-
-