dls.properties Reference
Overview
Datalogic JavaPOS API provides basic API-wide configuration using the dls.properties file. This plain-text file contains key / value pairs containing API-wide configuration settings.
This file must appear in the current working directory of the application utilizing the Datalogic JavaPOS API in order to function properly.
Datalogic JavaPOS API uses default values where configuration items are missing from the dls.properties file. A warning is logged in most cases and the default value is used.
Reference
Each available property is discussed in the following sections. For each method, the following information is given: the default value, method for accessing the property from the com.dls.jpos.common.DLSProperties class and a short description of the property and the values that it accepts.
AutoLoadConfig
- Default: false
- Method: DLSProperties.getAutoLoadConfig
The AutoLoadConfig property indicates whether to automatically load configuration items on claim. This property accepts either true or false.
AvalancheEnabled
- Default: false
- Method: DLSProperties.getAvalancheEnabled
The AvalancheEnabled property indicates whether to enable Avalanche integration with the Datalogic JavaPOS API. This property accepts either true or false.
BtWaitTime
- Default: 1000
- Method: DLSProperties.getBluetoothWaitTime
The BtWaitTime property indicates the number of milliseconds to wait for a bluetooth device to be enumerated on a port. This property accepts a number indicating milliseconds.
ConvertBCDtoASCII
- Default: true
- Method: DLSProperties.getBCDToASCII
The ConvertBCDtoASCII property indicates whether to convert Binary-coded Decimal to ASCII characters for EAN-13_S labels. This property accepts true or false.
ECIEncodingFile
- Default: ./ECIEncoding.csv
- Method: DLSProperties.getECIEncodingFile
The ECIEncodingFile property indicates the path and filename of the file to use for Extended Channel Interpretation Encoding. The default value is the ECIEncoding.csv file located in the current working directory of the application.
EnableDisablePoll
- Default: false
- Method: DLSProperties.getEnableDisablePoll
The EnableDisablePoll property indicates whether to poll the enabled or disabled state of a device. This property accepts true or false.
EnableDisablePollRate
- Default: 1
- Method: DLSProperties.getEnableDisablePollRate
The EnableDisablePollRate property indicates the number of seconds that a device will be polled if the EnableDisablePoll property is set to true. This property accepts a number indicating seconds.
EnableECI
- Default: false
- Method: DLSProperties.getEnableECI
The EnableECI property indicates whether to use Extended Channel Interpretation for data labels. This property accepts true or false.
FirmwareSendNulls
- Default: true
- Method: DLSProperties.getSendNulls
The FirmwareSendNulls property indicates whether to send NULL values after a Host Download. This property accepts true or false.
FirmwareSendResets
- Default: true
- Method: DLSProperties.getSendFirmwareReset
The FirmwareSendResets property indicates whether to send a Reset command after a Host Download on USB Flash devices. This property accepts true or false.
GenerateStatsOnEveryClaim
- Default: true
- Method: DLSProperties.getStatsOnClaim
The GenerateStatsOnEveryClaim property indicates whether statistics are generated each time a device is claimed. This property accepts true or false.
HDLRecordRetry
- Default: 5
- Method: DLSProperties.getRecordRetry
The HDLRecordRetry property indicates the number of write attempts to make during Host Download before failing. This property expects a number indicating the number of times to retry.
IHSParserFile
- Default: ./IHSParser.csv
- Method: DLSProperties.getIHSParserFile
The IHSParserFile property indicates the path and filename of the CSV file containing parsing information for Datalogic implementations of the Information, Health and Statistics commands. The property defaults to the IHSParser.csv file in the current working directory of the applicaton. This property accepts a path and filename and does not require using a backslash character for Windows.
ImageDest
- Default: current working directory
- Method: DLSProperties.getImageDestination
The ImageDest property indicates the destination folder for storing images where image capture is supported. The property defaults to the current working directory of the application. This property accepts a path and does not require using a backslash character for Windows.
LabelIdentifiersFile
- Default: ./LabelIdentifiers.csv
- Method: DLSProperties.getLabelIdentifiersFile
The LabelIdentifiersFile property indicates a path and filename of the CSV file containing parsing information for Datalogic implementations of scanned labels. The property defaults to the LabelIdentifiers.csv file in the current working directory of the application. This property accepts a path and filename and does not require using a backslash character for Windows.
ObjWaitTime
- Default: 100
- Method: DLSProperties.getObjectWaitTime
The ObjWaitTime property indicates the number of milliseconds to wait before attempting to read a response to Information, Health, Statistics or Beep commands on USB-OEM devices. This property accepts a number indicating the number of milliseconds to wait.
PollRateForPortChange
- Default: 1000
- Method: DLSProperties.getPortPollRate
The PollRateForPortChange property indicates the rate in milliseconds at which to poll the port for USB-COM changes on Linux. This property accepts a number indicating the number of milliseconds between poll attempts.
PostRemovalErrorEvents
- Default: false
- Method: DLSProperties.getPostRemovalEvents
The PostRemovalErrorEvents property indicates whether to queue device error events after device removal. This property accepts true or false.
ResetTimeout
- Default: 60000
- Method: DLSProperties.getResetTimeout
The ResetTimeout property indicates the number of milliseconds to wait for a Reset command to finish before throwing an error. This property accepts a number indicating milliseconds.
RetryWaitTime
- Default: 1000
- Method: DLSProperties.getRetryWaitTime
The RetryWaitTime property indicates the number of milliseconds to wait before issuing a retry for certain USB-OEM tasks. This property accepts a number indicating milliseconds.
RFIDMaxRetry
- Default: 10
- Method: DLSProperties.getRFIDMaxRetry
The RFIDMaxRetry property indicates the maximum number of attempts to retry a read or write operation on a RFID tag. This property accepts a number indicating the maximum number of retries.
SendCookedData
- Default: false
- Method: DLSProperties.getSendCookedData
The SendCookedData property indicates whether to cause the scanner.getScanData method to return the getScanDataLabel method. When the SendCookedData is set to true, any call to scanner.getScanData will return scanner.getScanDataLabel instead. This property accepts true or false.
SuppressErrors
- Default: false
- Method: DLSProperties.getSuppressErrors
The SuppressErrors property indicates whether to suppress device error events. This property accepts true or false.
TempDir
- Default (Windows): %temp%
- Default (Linux): /tmp
- Method: DLSProperties.getTempDir
The TempDir property indicates the path to the folder to use for platform specific temporary files. Depending on the use of Windows or Linux, this property has differing default values. This property accepts a path.
ThrowExceptionOnScaleMotion
- Default: false
- Method: DLSProperties.getScaleMotionException
The ThrowExceptionOnScaleMotion property indicates whether to generate an error status when a scale is not stable. This property accepts true or false.
Timeout
- Default: 5000
- Method: DLSProperties.getCommandTimeout
The Timeout property indicates the number of milliseconds to wait for a response to a command. The property accepts a number indicating the number of milliseconds to wait.
This value is used generally for Direct I/O and command processing. The value of this particular timeout is also used when processing internal multi-byte Direct I/O single packets.
UseClaimLockFile
- Default: false
- Method: DLSProperties.getUseClaimLockFile
The UseClaimLockFile property indicates whether to use a lock file when claiming a device. This property accepts true or false.
Default configuration file
Datalogic JavaPOS API is installed with the following default values in the dls.properties file.
#DLSJavaPOS properties file. Copyright (C) Datalogic ADC
#Thu Jun 29 10:45:50 PDT 2017
AutoLoadConfig=true
AvalancheEnabled=true
BtWaitTime=1000
ConvertBCDtoASCII=true
ECIEncodingFile=./ECIEncoding.csv
EnableDisablePoll=false
EnableDisablePollRate=1
EnableECI=false
FirmwareSendNulls=false
FirmwareSendReset=true
GenerateStatsOnEveryClaim=true
HDLRecordRetry=3
IHSParserFile=./IHSParser.csv
ImageDest=
LabelIdentifiersFile=./LabelIdentifiers.csv
ObjWaitTime=50
PollRateForPortChange=1000
PostRemovalErrorEvents=false
ResetTimeout=60000
RetryWaitTime=1000
RFIDMaxRetry=10
SendCookedData=false
SuppressErrors=false
TempDir=
ThrowExceptionOnScaleMotion=false
Timeout=5000
UseClaimLockFile=false
API Access
DLSProperties class
- Class: com.dls.jpos.common.DLSProperties
The dls.properties file is used to populate the singleton instance of DLSProperties. This class is part of the com.dls.jpos.common package and contains public methods for accessing or mutating each loaded property.
The singleton class loads the dls.properties file when instantiated and can be accessed at any time through the getInstance() method.
Example usage
Assuming that com.dls.jpos.common.DLSProperties has been imported, this will get the current value of the ObjWaitTime property.
DLSProperties dlsp = DLSProperties.getInstance();
int objWaitTime = dlsp.getObjectWaitTime();