public abstract class ATBarcode
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static int |
INFO |
protected static int |
MAX_PARAM |
protected com.atid.lib.module.barcode.types.BarcodeType[] |
mBarcodeNames |
protected byte[] |
mDefaultOption |
protected boolean[] |
mDefaultState |
protected com.atid.lib.module.barcode.event.ATBarcodeEventManager |
mListeners |
protected com.atid.lib.module.barcode.module.ATModuleBarcode |
mModule |
protected com.atid.lib.device.IReader |
mReader |
protected java.lang.String |
TAG |
Constructor and Description |
---|
ATBarcode(com.atid.lib.device.IReader reader)
Create an instance of the ATBarcode class.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(IATBarcodeEventListener listener)
Add an event handler to receive events from the ATBarcode instance.
|
protected void |
assertAction() |
protected void |
assertAction(byte[] data) |
protected void |
assertModule() |
protected void |
assertModule(byte[] data) |
void |
clearListener()
Removes all event handlers from the ATBarcode instance.
|
void |
defaultOption()
Initializes symbol options of the barcode module to default values.
|
void |
defaultSymbol()
Initializes all symbol states of the barcode module to default values.
|
void |
destroy()
ATBarcode Destroys the instance and returns the resource.
|
void |
enableAllSymbol(boolean enabled)
Enables or disables all symbol states in the barcode module.
|
byte[] |
getBarcodeParam(byte[] names)
Returns the parameter value to the barcode module of the instrument.
|
java.lang.String |
getBarcodeParamString(java.lang.String names)
Returns the parameters of the barcode module in string format.
|
protected byte[] |
getBytes(com.atid.lib.module.barcode.types.BarcodeType[] names) |
protected abstract byte[] |
getBytes(com.atid.lib.module.barcode.types.BarcodeType[] names,
boolean[] enabled,
int start,
int end) |
protected abstract byte[] |
getBytes(com.atid.lib.module.barcode.types.BarcodeType[] names,
boolean enabled,
int start,
int end) |
protected byte[] |
getBytes(com.atid.lib.module.barcode.types.BarcodeType[] names,
int length) |
protected abstract byte[] |
getBytes(com.atid.lib.module.barcode.types.BarcodeType[] names,
int start,
int end) |
protected byte[] |
getBytes(SymbolStateList list) |
protected byte[] |
getBytes(SymbolStateList list,
int length) |
protected abstract byte[] |
getBytes(SymbolStateList list,
int start,
int length) |
java.nio.charset.Charset |
getCharset()
Returns The Charset to be used to decode the Barcode data
ATD100 is not supported.
|
protected java.lang.String |
getString(com.atid.lib.module.barcode.types.BarcodeType[] names) |
abstract com.atid.lib.module.barcode.types.BarcodePostType |
getSymbolPostState()
Returns the post office symbol set in the barcode module.
|
SymbolStateList |
getSymbolState()
Returns the status of all symbols in the barcode module.
|
protected abstract SymbolStateList |
getSymbolState(byte[] data) |
ModuleBarcodeType |
getType()
Returns the Barcode module type of the connected device.
|
abstract java.lang.String |
getVersion()
The Barcode module returns the version.
|
abstract boolean |
initMoudle()
After the Device is connected, it calls to instantiate the ATBarcode instance.
|
abstract boolean |
isSuportSelPost()
Returns whether the barcode module can select the post office symbol.
|
void |
PumpEvent(int event,
byte[] data)
Used internally by the SDK.
|
void |
removeListener(IATBarcodeEventListener listener)
Removes an event handler when it no longer needs to receive events from the ATBarcode instance.
|
void |
setBarcodeParam(byte[] params)
Set the parameter value on the barcode module of the machine.
|
void |
setBarcodeParamString(java.lang.String params)
Sets the parameters of the barcode module in string format.
|
void |
setCharset(java.nio.charset.Charset charset)
Sets The Charset to be used to decode the Barcode data.
|
protected void |
setException(ATException e) |
abstract void |
setSymbolPostState(com.atid.lib.module.barcode.types.BarcodePostType post)
Set the post office symbol in the bar code module.
|
void |
setSymbolState(SymbolStateList list)
Sets the symbol status of the barcode module.
|
ResultCode |
startDecode()
Instruct the instrument to read the bar code.
|
ResultCode |
stop()
Instructs the Device to stop the operation being performed.
|
protected static final int INFO
protected static final int MAX_PARAM
protected java.lang.String TAG
protected com.atid.lib.module.barcode.module.ATModuleBarcode mModule
protected com.atid.lib.device.IReader mReader
protected com.atid.lib.module.barcode.types.BarcodeType[] mBarcodeNames
protected byte[] mDefaultOption
protected boolean[] mDefaultState
protected com.atid.lib.module.barcode.event.ATBarcodeEventManager mListeners
public ATBarcode(com.atid.lib.device.IReader reader)
public void destroy()
public ModuleBarcodeType getType()
public void addListener(IATBarcodeEventListener listener)
listener
- An instance that implements the IATRfidUhfEventListener interface to receive events from RFID UHF modules.public void removeListener(IATBarcodeEventListener listener)
listener
- An instance that implements the IATRfidUhfEventListener interface to receive events from RFID UHF modules.public void clearListener()
public abstract boolean initMoudle()
public ResultCode startDecode()
public ResultCode stop()
public abstract java.lang.String getVersion() throws ATException
ATException
- An ATException exception is thrown if a failure occurs while setting data on the instrument or returning data.public void defaultSymbol() throws ATException
ATException
- An ATException exception is thrown if a failure occurs while setting data on the instrument or returning data.public void defaultOption() throws ATException
Item | Parameter | Value | |
Interleaved 2 of 5 | Length Type | Any Length | |
Matrix 2 of 5 | Length Type | Any Length | |
Discrete 2 of 5 | Length Type | Any Length | |
Code 128 | Length Type | Any Length | |
Code 39 | Length Type | Any Length | |
Code 93 | Length Type | Any Length | |
Code 11 | Length Type | Any Length | |
Codabar | Length Type | Any Length | |
MSI | Length Type | Any Length | |
Composite | UPC Composite Mode | UPC Never Linked |
ATException
- An ATException exception is thrown if a failure occurs while setting data on the instrument or returning data.public void enableAllSymbol(boolean enabled) throws ATException
enabled
- A boolean indicating whether to enable or disable symbol state.ATException
- An ATException exception is thrown if a failure occurs while setting data on the instrument or returning data.public SymbolStateList getSymbolState() throws ATException
ATException
- An ATException exception is thrown if a failure occurs while setting data on the instrument or returning data.public void setSymbolState(SymbolStateList list) throws ATException
list
- A SymbolStateList instance that manages the name and state of a symbol in pairs.ATException
- An ATException exception is thrown if a failure occurs while setting data on the instrument or returning data.public abstract boolean isSuportSelPost()
public abstract com.atid.lib.module.barcode.types.BarcodePostType getSymbolPostState() throws ATException
ATException
- An ATException exception is thrown if a failure occurs while setting data on the instrument or returning data.public abstract void setSymbolPostState(com.atid.lib.module.barcode.types.BarcodePostType post) throws ATException
post
- The BarcodePostType enumeration that indicates the selection status of the post office symbol.ATException
- An ATException exception is thrown if a failure occurs while setting data on the instrument or returning data.public byte[] getBarcodeParam(byte[] names) throws ATException
names
- A byte array that specifies the parameter name of the bar code module to be returned.ATException
- An ATException exception is thrown if a failure occurs while setting data on the instrument or returning data.public void setBarcodeParam(byte[] params) throws ATException
params
- A byte array that specifies the parameter names and values of the barcode module to be set.ATException
- An ATException exception is thrown if a failure occurs while setting data on the instrument or returning data.public java.lang.String getBarcodeParamString(java.lang.String names) throws ATException
names
- A string that specifies the Paraemter name of the barcode module to be returned.ATException
- An ATException exception is thrown if a failure occurs while setting data on the instrument or returning data.public void setBarcodeParamString(java.lang.String params) throws ATException
params
- A string that specifies the name and value of the parameter of the barcode module to be set.ATException
- An ATException exception is thrown if a failure occurs while setting data on the instrument or returning data.public java.nio.charset.Charset getCharset() throws ATException
ATException
- An ATException exception is thrown if a failure occurs while setting data on the instrument or returning data.public void setCharset(java.nio.charset.Charset charset) throws ATException
charset
- The Charset to be used to decode the bytesATException
- An ATException exception is thrown if a failure occurs while setting data on the instrument or returning data.protected void assertModule() throws ATException
ATException
protected void assertModule(byte[] data) throws ATException
ATException
protected void assertAction() throws ATException
ATException
protected void assertAction(byte[] data) throws ATException
ATException
protected void setException(ATException e)
public void PumpEvent(int event, byte[] data)
protected byte[] getBytes(com.atid.lib.module.barcode.types.BarcodeType[] names)
protected byte[] getBytes(com.atid.lib.module.barcode.types.BarcodeType[] names, int length)
protected abstract byte[] getBytes(com.atid.lib.module.barcode.types.BarcodeType[] names, int start, int end)
protected abstract byte[] getBytes(com.atid.lib.module.barcode.types.BarcodeType[] names, boolean[] enabled, int start, int end)
protected abstract byte[] getBytes(com.atid.lib.module.barcode.types.BarcodeType[] names, boolean enabled, int start, int end)
protected byte[] getBytes(SymbolStateList list)
protected byte[] getBytes(SymbolStateList list, int length)
protected abstract byte[] getBytes(SymbolStateList list, int start, int length)
protected abstract SymbolStateList getSymbolState(byte[] data)
protected java.lang.String getString(com.atid.lib.module.barcode.types.BarcodeType[] names)