|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.dalsemi.onewire.container.OneWireContainer | +--com.dalsemi.onewire.container.OneWireContainer16
1-Wire container for Java-powered iButton, DS195X. This container encapsulates the functionality of the iButton family type 16 and 96 (hex)
CommandAPDU
to create CommandAPDU
.
ResponseAPDU
to create ResponseAPDU
.
CommandAPDU
,
ResponseAPDU
Field Summary | |
static int |
AID_LENGTH_OFFSET
offset of AID length in applet APDU data stream |
static int |
AID_LENGTH_SIZE
size of AID length in byte |
static int |
AID_NAME_OFFSET
offset of AID name in applet APDU data stream |
static int |
AID_SIZE
maximum length of AID in byte |
static int |
APDU_PACKET_LENGTH
default APDU data packet length in byte |
static int |
APPLET_FILE_HEADER_SIZE
size of applet file header in byte |
static int |
PASSWORD_LENGTH_SIZE
size of password length in byte |
static int |
PASSWORD_SIZE
maximum length of password in byte |
Constructor Summary | |
OneWireContainer16()
Creates an empty OneWireContainer16. |
|
OneWireContainer16(DSPortAdapter sourceAdapter,
byte[] newAddress)
Creates a OneWireContainer16 with the provided adapter object and the address of this Java iButton. |
|
OneWireContainer16(DSPortAdapter sourceAdapter,
long newAddress)
Creates a OneWireContainer16 with the provided adapter object and the address of this Java iButton. |
|
OneWireContainer16(DSPortAdapter sourceAdapter,
String newAddress)
Creates a OneWireContainer16 with the provided adapter object and the address of this Java iButton. |
Method Summary | |
ResponseAPDU |
deleteAppletByAID(String aid)
Deletes an applet by its AID. |
ResponseAPDU |
deleteAppletByNumber(int index)
Deletes an applet by its installed number. |
ResponseAPDU |
deleteSelectedApplet()
Deletes the currently selected applet. |
ResponseAPDU |
getAIDByNumber(int index)
Gets the AID of the applet by its installed number. |
String |
getAlternateNames()
Gets the alternate Dallas Semiconductor part numbers or names. |
ResponseAPDU |
getAppletGCMode()
Gets the Applet Garbage Collection Mode. |
ResponseAPDU |
getATR()
Gets the Answer To Reset (ATR) from this Java iButton. |
CommandAPDU |
getCommandAPDUInfo()
Gets the current CommandAPDU sent to this Java iButton |
ResponseAPDU |
getCommandPINMode()
Gets the Command PIN Mode. |
ResponseAPDU |
getCommitBufferSize()
Gets the size of the Commit Buffer. |
String |
getDescription()
Gets a short description of the function of this Java iButton. |
ResponseAPDU |
getEphemeralGCMode()
Gets the Ephemeral Gabage Collection Mode. |
ResponseAPDU |
getErrorReportingMode()
Gets the Error Reporting Mode. |
ResponseAPDU |
getExceptionMode()
Gets the Exception Mode. |
ResponseAPDU |
getFirmwareVersionString()
Gets the firmware version string. |
ResponseAPDU |
getFreeRAM()
Gets the amount of free RAM in this Java iButton. |
ResponseAPDU |
getLastError()
Gets the last error value. |
int |
getLoadPacketSize()
Gets the size of the packets sent on load. |
ResponseAPDU |
getLoadPINMode()
Gets the Load PIN Mode. |
int |
getLoadRunTime()
Gets the load run time value set for this Java iButton |
int |
getMaxSpeed()
Gets the maximum speed this One-Wire device can communicate at. |
String |
getName()
Gets the Dallas Semiconductor part number of this Java iButton as a string. |
ResponseAPDU |
getPORCount()
Gets the number of times this Java iButton has been power-on-reset (POR) since the last master erase. |
ResponseAPDU |
getRandomBytes(int numBytes)
Gets requested number of bytes of random data generated by this Java iButton. |
ResponseAPDU |
getRealTimeClock()
Gets the Real Time Clock. |
ResponseAPDU |
getResponseAPDUInfo()
Gets the current ResponseAPDU received from this Java iButton |
ResponseAPDU |
getRestoreMode()
Gets the Restore Mode. |
int |
getRunTime()
Gets the run time value set for this Java iButton |
int |
getSelectRunTime()
Gets the select run time value set for this Java iButton |
ResponseAPDU |
loadApplet(InputStream appletInputStream,
String aid)
Loads an applet onto this Java iButton. |
ResponseAPDU |
loadApplet(String fileName,
String directoryName,
String aid)
Loads an applet onto this Java iButton. |
ResponseAPDU |
masterErase()
Clears all memory in this Java iButton. |
ResponseAPDU |
process(CommandAPDU capdu)
Sends a generic process command to this JavaiButton. |
ResponseAPDU |
select(String aid)
Selects an applet by AID. |
ResponseAPDU |
sendAPDU(CommandAPDU capdu,
int runTime)
Sends a CommandAPDU to this Java iButton. |
ResponseAPDU |
setAppletGCMode(int mode)
Sets the Applet Garbage Collection Mode. |
ResponseAPDU |
setCommandPINMode(int mode)
Sets the Command PIN Mode. |
ResponseAPDU |
setCommitBufferSize(int size)
Sets the Commit Buffer size. |
ResponseAPDU |
setCommonPIN(String newPIN)
Sets the Common PIN. |
ResponseAPDU |
setEphemeralGCMode(int mode)
Sets the Ephemeral Garbage Collection Mode. |
ResponseAPDU |
setErrorReportingMode(int mode)
Sets the Error Reporting mode. |
ResponseAPDU |
setExceptionMode(int mode)
Sets the Exception Mode. |
boolean |
setLoadPacketSize(int size)
Sets the size of the packets sent on load. |
ResponseAPDU |
setLoadPINMode(int mode)
Sets the Load PIN Mode. |
void |
setLoadRunTime(int newRunTime)
Sets the load operation run time value for this Java iButton. |
void |
setPIN(String passwd)
Sets the PIN used to communicate with this Java iButton. |
void |
setReadingRunTime(int newRunTime)
Sets the run time value for reading bytes from the output buffer of this Java iButton. |
ResponseAPDU |
setRestoreMode(int mode)
Sets the Restore Mode. |
void |
setRunTime(int newRunTime)
Sets the run time value for this Java iButton |
void |
setSelectRunTime(int newRunTime)
Sets the select operation run time value for this Java iButton. |
void |
setupContainer(DSPortAdapter sourceAdapter,
byte[] newAddress)
Provides an adapter object to access this Java iButton. |
void |
setupContainer(DSPortAdapter sourceAdapter,
long newAddress)
Provides an adapter object to access this Java iButton. |
void |
setupContainer(DSPortAdapter sourceAdapter,
String newAddress)
Provides an adapter object to access this Java iButton. |
void |
setupJibComm(DSPortAdapter sourceAdapter,
byte[] newAddress)
Provides an JibComm object to communicate
with this Java iButton. |
Methods inherited from class com.dalsemi.onewire.container.OneWireContainer |
doSpeed, equals, getAdapter, getAddress, getAddressAsLong, getAddressAsString, getMemoryBanks, hashCode, isAlarming, isPresent, setSpeed, toString |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int PASSWORD_LENGTH_SIZE
public static final int PASSWORD_SIZE
public static final int AID_LENGTH_SIZE
public static final int AID_SIZE
public static final int AID_LENGTH_OFFSET
public static final int AID_NAME_OFFSET
public static final int APPLET_FILE_HEADER_SIZE
public static int APDU_PACKET_LENGTH
Constructor Detail |
public OneWireContainer16()
setupContainer()
method before using this new container.This is one of the methods to construct a OneWireContainer16. The others are through creating a OneWireContainer16 with parameters.
OneWireContainer16(DSPortAdapter,byte[])
,
OneWireContainer16(DSPortAdapter,long)
,
OneWireContainer16(DSPortAdapter,String)
,
setupContainer(DSPortAdapter,byte[])
,
setupContainer(DSPortAdapter,long)
,
setupContainer(DSPortAdapter,String)
public OneWireContainer16(DSPortAdapter sourceAdapter, byte[] newAddress)
sourceAdapter
- adapter object required to communicate with
this Java iButtonnewAddress
- address of this Java iButtonAddress
,
OneWireContainer16()
,
OneWireContainer16(DSPortAdapter,long)
,
OneWireContainer16(DSPortAdapter,String)
public OneWireContainer16(DSPortAdapter sourceAdapter, long newAddress)
sourceAdapter
- adapter object required to communicate with
this Java iButtonnewAddress
- address of this Java iButtonAddress
,
OneWireContainer16()
,
OneWireContainer16(DSPortAdapter,byte[])
,
OneWireContainer16(DSPortAdapter,String)
public OneWireContainer16(DSPortAdapter sourceAdapter, String newAddress)
sourceAdapter
- adapter object required to communicate with
this Java iButtonnewAddress
- address of this Java iButtonAddress
,
OneWireContainer16()
,
OneWireContainer16(DSPortAdapter,byte[])
,
OneWireContainer16(DSPortAdapter,long)
Method Detail |
public String getName()
getName
in class OneWireContainer
public String getAlternateNames()
getAlternateNames
in class OneWireContainer
public String getDescription()
getDescription
in class OneWireContainer
public void setupContainer(DSPortAdapter sourceAdapter, byte[] newAddress)
setupContainer
in class OneWireContainer
sourceAdapter
- adapter object required to communicate with
this Java iButtonnewAddress
- address of this One-Wire device as a byte array.Address
public void setupContainer(DSPortAdapter sourceAdapter, long newAddress)
setupContainer
in class OneWireContainer
sourceAdapter
- adapter object required to communicate with
this Java iButtonnewAddress
- address of this One-Wire device as a longAddress
public void setupContainer(DSPortAdapter sourceAdapter, String newAddress)
setupContainer
in class OneWireContainer
sourceAdapter
- adapter object required to communicate with
this Java iButtonnewAddress
- address of this One-Wire device as a stringAddress
public void setupJibComm(DSPortAdapter sourceAdapter, byte[] newAddress)
JibComm
object to communicate
with this Java iButton.sourceAdapter
- adapter object required to communicate with
this Java iButtonnewAddress
- address of this One-Wire device as a byte arrayAddress
public int getMaxSpeed()
getMaxSpeed
in class OneWireContainer
public CommandAPDU getCommandAPDUInfo()
CommandAPDU
sent to this Java iButtonCommandAPDU
sent to this Java iButtonpublic ResponseAPDU getResponseAPDUInfo()
ResponseAPDU
received from this Java iButtonResponseAPDU
received from this Java iButtonpublic int getRunTime()
setRunTime(int)
public int getSelectRunTime()
setSelectRunTime(int)
public int getLoadRunTime()
setLoadRunTime(int)
public void setRunTime(int newRunTime) throws IllegalArgumentException
runTime
- a 4
bit value (0 -15
) that
represents the expected run time of the device
Actual run time is calculated as followed:
runTime * 250 + 62.5 mS
Therefore, 0 -> 0 * 250 + 62.5 = 62.5 mS
1 -> 1 * 250 + 62.5 = 312.5 mS
and so on.IllegalArgumentException
- Invalid run time valuegetRunTime()
public void setSelectRunTime(int newRunTime) throws IllegalArgumentException
runTime
- a 4
bit value (0 -15
) that
represents the expected run time of the device on a
select operation. This value should not be less than
the normal runTime
value.
Actual run time is calculated as followed:
runTime * 250 + 62.5 mS
Therefore, 0 -> 0 * 250 + 62.5 = 62.5 mS
1 -> 1 * 250 + 62.5 = 312.5 mS
and so on.IllegalArgumentException
- Invalid run time valuegetSelectRunTime()
public void setLoadRunTime(int newRunTime) throws IllegalArgumentException
runTime
value.runTime
- a 4
bit value (0 -15
) that
represents the expected run time of the device on a
final load packet. This value should not be less than
the normal runTime
value.
Actual run time is calculated as followed:
runTime * 250 + 62.5 mS
Therefore, 0 -> 0 * 250 + 62.5 = 62.5 mS
1 -> 1 * 250 + 62.5 = 312.5 mS
and so on.IllegalArgumentException
- Invalid run time valuegetLoadRunTime()
public void setReadingRunTime(int newRunTime) throws IllegalArgumentException
runTime
- a 4
bit value (0-15
) that
represents the run time of the device for reading
data from the output buffer of this Java Powered iButtonIllegalArgumentException
- Invalid run time valuegetLoadRunTime()
public boolean setLoadPacketSize(int size)
64
to 112
bytes.size
- new packet sizetrue
if packet size is set to the new value false
if invalid packet size is requestedgetLoadPacketSize()
,
loadApplet(java.io.InputStream, java.lang.String)
public int getLoadPacketSize()
setLoadPacketSize(int)
,
loadApplet(java.io.InputStream, java.lang.String)
public void setPIN(String passwd)
passwd
- PIN to be set and sent to this Java iButton for each command
that requires a PINgetCommandPINMode()
,
setCommandPINMode(int)
,
setCommonPIN(java.lang.String)
public ResponseAPDU getFreeRAM() throws OneWireException, OneWireIOException, IllegalArgumentException
ResponseAPDU
with a data field containing the amount
of free RAM in this Java iButton. Value returned is in little endian
format.
IllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]public ResponseAPDU getRandomBytes(int numBytes) throws OneWireException, OneWireIOException, IllegalArgumentException
numBytes
- the number of bytes requested. numByes
should not exceed 119
. If the number is greater
than 119
, the API only returns 119
.ResponseAPDU
with a data field containing random
bytes generated
IllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]public ResponseAPDU getFirmwareVersionString() throws OneWireException, OneWireIOException, IllegalArgumentException
ResponseAPDU
with a data field containing the firmware
version string of this Java iButton
IllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]public ResponseAPDU getLastError() throws OneWireException, OneWireIOException, IllegalArgumentException
1
), then this method
will return the value of the last exception. No PIN required.ResponseAPDU
containing the last exception value
IllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]getErrorReportingMode()
,
setErrorReportingMode(int)
public ResponseAPDU getErrorReportingMode() throws OneWireException, OneWireIOException, IllegalArgumentException
.033
version of the firmware. No PIN required.ResponseAPDU
containing the error reporting mode
IllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]getLastError()
,
setErrorReportingMode(int)
public ResponseAPDU setErrorReportingMode(int mode) throws OneWireException, OneWireIOException, IllegalArgumentException
1
), this Java iButton
stores the last exception value code. This code can be retreived by
calling getLastError()
.mode
- 1
to turn on Error Reporting Mode.
0
to turn off.ResponseAPDU
indicating success or failure
IllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]getLastError()
,
getErrorReportingMode()
public ResponseAPDU getAIDByNumber(int index) throws OneWireException, OneWireIOException, IllegalArgumentException
index
- installed number of the applet on this Java iButton to get
the AID ofResponseAPDU
containing the AID of the applet
requested
0-15
.
IllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]public ResponseAPDU deleteSelectedApplet() throws OneWireException, OneWireIOException, IllegalArgumentException
ResponseAPDU
indicating success or failure
IllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]deleteAppletByAID(java.lang.String)
,
deleteAppletByNumber(int)
public ResponseAPDU deleteAppletByNumber(int index) throws OneWireException, OneWireIOException, IllegalArgumentException
index
- installed number of the applet to deleteResponseAPDU
indicating success or failure
IllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]deleteAppletByAID(java.lang.String)
,
deleteSelectedApplet()
public ResponseAPDU deleteAppletByAID(String aid) throws OneWireException, OneWireIOException, IllegalArgumentException
aid
- AID of applet to be deletedResponseAPDU
indicating success or failure
IllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]deleteSelectedApplet()
,
deleteAppletByNumber(int)
public ResponseAPDU loadApplet(InputStream appletInputStream, String aid) throws OneWireException, OneWireIOException, IllegalArgumentException, IOException
AID_SIZE
.in
- Stream to read the applet fromaid
- AID of the applet to be loadedResponseAPDU
indicating success or failure
Possible return values are
IOException
- Problem reading applet from the streamIllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]getLoadPINMode()
,
setLoadPINMode(int)
public ResponseAPDU loadApplet(String fileName, String directoryName, String aid) throws OneWireException, OneWireIOException, IllegalArgumentException, FileNotFoundException, IOException
AID_SIZE
.fileName
- file name of the applet to be loaded into this Java iButtondirectoryName
- path to the applet to be loadedaid
- AID of the applet to be loadedResponseAPDU
indicating success or failure
Possible return values are
FileNotFoundException
- Applet file not foundIOException
- Problem reading applet fileIllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]getLoadPINMode()
,
setLoadPINMode(int)
public ResponseAPDU masterErase() throws OneWireException, OneWireIOException, IllegalArgumentException
ResponseAPDU
indicating success or failure
IllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]public ResponseAPDU getPORCount() throws OneWireException, OneWireIOException, IllegalArgumentException
ResponseAPDU
indicating success or failure
IllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]masterErase()
public ResponseAPDU getRealTimeClock() throws OneWireException, OneWireIOException, IllegalArgumentException
ResponseAPDU
containing the value of the real
time clock
IllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]public ResponseAPDU getATR() throws OneWireException, OneWireIOException, IllegalArgumentException
ResponseAPDU
containing the ATR in the data field
IllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]public ResponseAPDU getEphemeralGCMode() throws OneWireException, OneWireIOException, IllegalArgumentException
1
indicates ephemeral garbage collection
is turned on, 0
if turned off. No PIN required.ResponseAPDU
containing the Ephemeral Garbage
Collector Mode
IllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]setEphemeralGCMode(int)
public ResponseAPDU getAppletGCMode() throws OneWireException, OneWireIOException, IllegalArgumentException
1
indicates applet garbage collection
is turned on, 0
if turned off. No PIN required.ResponseAPDU
containing the Applet Garbage
Collector Mode
IllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]setAppletGCMode(int)
public ResponseAPDU getCommandPINMode() throws OneWireException, OneWireIOException, IllegalArgumentException
1
indicates that a PIN is required for
all Administrative and AID commands, 0
indicates
free access. No PIN required.ResponseAPDU
containing the Command PIN Mode
IllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]setCommandPINMode(int)
,
setCommonPIN(java.lang.String)
,
setPIN(java.lang.String)
public ResponseAPDU getLoadPINMode() throws OneWireException, OneWireIOException, IllegalArgumentException
1
indicates that a PIN is required for Applet
loading. No PIN required.ResponseAPDU
containing the Load PIN Mode
IllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]loadApplet(java.io.InputStream, java.lang.String)
,
setLoadPINMode(int)
public ResponseAPDU getRestoreMode() throws OneWireException, OneWireIOException, IllegalArgumentException
1
), all field updates and
javacard.framework.System
transactions are considered atomic.
If a tear occurs in the middle of these updates, values just
prior to the update are restored. No PIN required.ResponseAPDU
containing the Restore Mode
IllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]setRestoreMode(int)
public ResponseAPDU getExceptionMode() throws OneWireException, OneWireIOException, IllegalArgumentException
1
), Java API exceptions
are thrown. All uncaught exceptions return 0x6F00 in the SW.
When disabled, an error is returned from the VM. No PIN required.ResponseAPDU
containing the Exception Mode value
IllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]setExceptionMode(int)
public ResponseAPDU getCommitBufferSize() throws OneWireException, OneWireIOException, IllegalArgumentException
9
bytes.
Therefore the default size of 72
bytes allows 8
field updates. The minimum size allowed is 72
bytes and the
maximum is restricted by the amount of free RAM. All values will be rounded
up to the next multiple of 9
. No PIN required.ResponseAPDU
containing the Commit Buffer size in little
endian format
IllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]getFreeRAM()
,
setCommitBufferSize(int)
public ResponseAPDU setCommonPIN(String newPIN) throws OneWireException, OneWireIOException, IllegalArgumentException
setPIN()
method should be called prior to this method with the 'oldPIN' value.newPIN
- the value of the PIN to be set in this Java iButtonResponseAPDU
indicating success or failure
IllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]getCommandPINMode()
,
setCommandPINMode(int)
,
setPIN(java.lang.String)
public ResponseAPDU setEphemeralGCMode(int mode) throws OneWireException, OneWireIOException, IllegalArgumentException
1
turns the Ephemeral Garbage Collection on
and a value of 0
turns it off.mode
- 1
to turn on Ephemeral Garbage Collection Mode.
0
to turn off.ResponseAPDU
indicating success or failure
IllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]getEphemeralGCMode()
public ResponseAPDU setAppletGCMode(int mode) throws OneWireException, OneWireIOException, IllegalArgumentException
1
turns the Applet Garbage Collection on
and a value of 0
turns it off.mode
- 1
to turn on Applet Garbage Collection Mode.
0
to turn off.ResponseAPDU
indicating success or failure
IllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]getAppletGCMode()
public ResponseAPDU setCommandPINMode(int mode) throws OneWireException, OneWireIOException, IllegalArgumentException
1
, a PIN is required for all
Administrative commands.mode
- 1
to turn on Command PIN Mode.
0
to turn off.ResponseAPDU
indicating success or failure
IllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]getCommandPINMode()
,
setCommonPIN(java.lang.String)
,
setPIN(java.lang.String)
public ResponseAPDU setLoadPINMode(int mode) throws OneWireException, OneWireIOException, IllegalArgumentException
1
), then PINs are required
on applet loading.mode
- 1
to turn on Load PIN Mode.
0
to turn off.ResponseAPDU
indicating success or failure
IllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]getLoadPINMode()
,
loadApplet(java.io.InputStream, java.lang.String)
public ResponseAPDU setRestoreMode(int mode) throws OneWireException, OneWireIOException, IllegalArgumentException
1
), all field updates and
javacard.framework.System
transactions are considered atomic.
If a tear occurs in the middle of these updates, values just prior to the
update are restored.mode
- 1
to turn on Restore Mode.
0
to turn off.ResponseAPDU
indicating success or failure
IllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]getRestoreMode()
public ResponseAPDU setExceptionMode(int mode) throws OneWireException, OneWireIOException, IllegalArgumentException
1
), Java API exceptions
are thrown. All uncaught exceptions return 0x6F00 in the SW. When
disabled, an error is returned from the VM.mode
- 1
to turn on Exception Mode.
0
to turn off.ResponseAPDU
indicating success or failure
IllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]getExceptionMode()
public ResponseAPDU setCommitBufferSize(int size) throws OneWireException, OneWireIOException, IllegalArgumentException
9
bytes.
Therefore the default size of 72
bytes allows 8
field updates. The minimum size allowed is 72
bytes and the
maximum is restricted by the amount of free RAM. All values will be rounded
up to the next multiple of 9
.size
- size of the desired commit bufferResponseAPDU
indicating success or failure
IllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]getCommitBufferSize()
public ResponseAPDU select(String aid) throws OneWireException, OneWireIOException, IllegalArgumentException
AID_SIZE
. No PIN required.aid
- the AID of the applet to be selectedResponseAPDU
indicating success or failure
IllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]deleteAppletByAID(java.lang.String)
,
deleteAppletByNumber(int)
,
deleteSelectedApplet()
,
getAIDByNumber(int)
,
process(com.dalsemi.onewire.container.CommandAPDU)
public ResponseAPDU process(CommandAPDU capdu) throws OneWireException, OneWireIOException, IllegalArgumentException
CommandAPDU
.
No PIN required.capdu
- CommandAPDU
to be sent to this Java iButtonResponseAPDU
the response from this Java iButtonIllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]select(java.lang.String)
public ResponseAPDU sendAPDU(CommandAPDU capdu, int runTime) throws OneWireException, OneWireIOException, IllegalArgumentException
CommandAPDU
to this Java iButton.
No PIN required.capdu
- the CommandAPDU
to be sent to this Java iButtonrunTime
- a 4
bit value (0 -15
) that
represents the expected run time of the device
runTime * 250 + 62.5 mS
Therefore, 0 -> 0 * 250 + 62.5 = 62.5 mS
1 -> 1 * 250 + 62.5 = 312.5 mS
and so on.ResponseAPDU
the ResponseAPDU
from
this Java iButtonIllegalArgumentException
- Invalid run time valueOneWireException
- Part could not be found [ fatal ]OneWireIOException
- Data wasn't transferred properly [ recoverable ]
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |