|
|||||||||
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
OneWireContainer for iButton family type 0x16 (Java iButton).
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()
Constructs a generic instance of the OneWireContainer16 class. |
Method Summary | |
ResponseAPDU |
deleteAppletByAID(java.lang.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. |
java.lang.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 Java iButton. |
CommandAPDU |
getCommandAPDUInfo()
Gets the current CommandAPDU sent to the Java iButton |
ResponseAPDU |
getCommandPINMode()
Gets the Command PIN Mode. |
ResponseAPDU |
getCommitBufferSize()
Gets the size of the Commit Buffer. |
java.lang.String |
getDescription()
Gets a short description of the function of the 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 the 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 |
getMaxSpeed()
Gets the maximum speed this One-Wire device can communicate at. |
java.lang.String |
getName()
Gets the Dallas Semiconductor part number of the Java iButton as a string. |
ResponseAPDU |
getPORCount()
Gets the number of times the 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 Java iButton. |
ResponseAPDU |
getRealTimeClock()
Gets the Real Time Clock. |
ResponseAPDU |
getResponseAPDUInfo()
Gets the current ResponseAPDU received from the Java iButton |
ResponseAPDU |
getRestoreMode()
Gets the Restore Mode. |
int |
getRunTime()
Gets the default run time value of the Java iButton |
ResponseAPDU |
loadApplet(java.lang.String fileName,
java.lang.String directoryName,
java.lang.String aid)
Loads an applet onto the Java iButton. |
ResponseAPDU |
masterErase()
Clears all memory in the Java iButton. |
ResponseAPDU |
process(CommandAPDU capdu)
Sends a generic process command to the JavaiButton. |
ResponseAPDU |
select(java.lang.String aid)
Selects an applet by AID. |
ResponseAPDU |
sendAPDU(CommandAPDU capdu,
int runTime)
Sends a CommandAPDU to the 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(java.lang.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 |
setPIN(java.lang.String passwd)
Sets the PIN used to communicate with the Java iButton. |
ResponseAPDU |
setRestoreMode(int mode)
Sets the Restore Mode. |
void |
setRunTime(int newRunTime)
Sets the run time value for the Java iButton |
void |
setupContainer(DSPortAdapter sourceAdapter,
byte[] newAddress)
Provides this container an adapter object to access the Java iButton. |
void |
setupContainer(DSPortAdapter sourceAdapter,
long newAddress)
Provides this container an adapter object to access the Java iButton. |
void |
setupContainer(DSPortAdapter sourceAdapter,
java.lang.String newAddress)
Provides this container an adapter object to access the Java iButton. |
void |
setupJibComm(DSPortAdapter sourceAdapter,
byte[] newAddress)
Provide this container an JibComm object to communicate with the Java iButton. |
Methods inherited from class com.dalsemi.onewire.container.OneWireContainer |
doSpeed, getAdapter, getAddress, getAddressAsLong, getAddressAsString, getMemoryBanks, isAlarming, isPresent, setSpeed |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, 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()
Method Detail |
public java.lang.String getName()
getName
in class OneWireContainer
public java.lang.String getAlternateNames()
getAlternateNames
in class OneWireContainer
public java.lang.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 iButton.newAddress
- address of this One-Wire device as a byte array.public void setupContainer(DSPortAdapter sourceAdapter, long newAddress)
setupContainer
in class OneWireContainer
sourceAdapter
- adapter object required to communicate with
this Java iButton.newAddress
- address of this One-Wire device as a long.public void setupContainer(DSPortAdapter sourceAdapter, java.lang.String newAddress)
setupContainer
in class OneWireContainer
sourceAdapter
- adapter object required to communicate with
this Java iButton.newAddress
- address of this One-Wire device as a stringpublic void setupJibComm(DSPortAdapter sourceAdapter, byte[] newAddress)
sourceAdapter
- adapter object required to communicate with
this Java iButton.newAddress
- address of this One-Wire device as a byte array.public int getMaxSpeed()
getMaxSpeed
in class OneWireContainer
public CommandAPDU getCommandAPDUInfo()
public ResponseAPDU getResponseAPDUInfo()
public int getRunTime()
public void setRunTime(int newRunTime)
newRunTime
- new run time valuepublic boolean setLoadPacketSize(int size)
size
- new packet size.public int getLoadPacketSize()
public void setPIN(java.lang.String passwd)
passwd
- PIN to be set and sent to the Java iButton for each command
that requires a PIN.public ResponseAPDU getFreeRAM() throws OneWireException, OneWireIOException, java.lang.IllegalArgumentException
OneWireException
- OneWireIOException
- java.lang.IllegalArgumentException
- public ResponseAPDU getRandomBytes(int numBytes) throws OneWireException, OneWireIOException, java.lang.IllegalArgumentException
numBytes
- the number of bytes requested. numByes should not
exceed 119. If the number is greater than 119, the API only returns 119.OneWireException
- OneWireIOException
- java.lang.IllegalArgumentException
- public ResponseAPDU getFirmwareVersionString() throws OneWireException, OneWireIOException, java.lang.IllegalArgumentException
OneWireException
- OneWireIOException
- java.lang.IllegalArgumentException
- public ResponseAPDU getLastError() throws OneWireException, OneWireIOException, java.lang.IllegalArgumentException
OneWireException
- OneWireIOException
- java.lang.IllegalArgumentException
- public ResponseAPDU getErrorReportingMode() throws OneWireException, OneWireIOException, java.lang.IllegalArgumentException
OneWireException
- OneWireIOException
- java.lang.IllegalArgumentException
- public ResponseAPDU setErrorReportingMode(int mode) throws OneWireException, OneWireIOException, java.lang.IllegalArgumentException
mode
- OneWireException
- OneWireIOException
- java.lang.IllegalArgumentException
- getLastError
public ResponseAPDU getAIDByNumber(int index) throws OneWireException, OneWireIOException, java.lang.IllegalArgumentException
index
- installed number of the applet on the Java iButton to get
the AID of.OneWireException
- OneWireIOException
- java.lang.IllegalArgumentException
- public ResponseAPDU deleteSelectedApplet() throws OneWireException, OneWireIOException, java.lang.IllegalArgumentException
OneWireException
- OneWireIOException
- java.lang.IllegalArgumentException
- public ResponseAPDU deleteAppletByNumber(int index) throws OneWireException, OneWireIOException, java.lang.IllegalArgumentException
index
- installed number of the applet to delete.OneWireException
- OneWireIOException
- java.lang.IllegalArgumentException
- public ResponseAPDU deleteAppletByAID(java.lang.String aid) throws OneWireException, OneWireIOException, java.lang.IllegalArgumentException
aid
- AID of applet to be deleted.OneWireException
- OneWireIOException
- java.lang.IllegalArgumentException
- public ResponseAPDU loadApplet(java.lang.String fileName, java.lang.String directoryName, java.lang.String aid) throws OneWireException, OneWireIOException, java.lang.IllegalArgumentException, java.io.FileNotFoundException, java.io.IOException
fileName
- file name of the applet to be loaded into the Java iButton.directoryName
- path to the applet to be loaded.aid
- AID of the applet to be loaded.OneWireException
- OneWireIOException
- java.lang.IllegalArgumentException
- java.io.FileNotFoundException
- java.io.IOException
- public ResponseAPDU masterErase() throws OneWireException, OneWireIOException, java.lang.IllegalArgumentException
OneWireException
- OneWireIOException
- java.lang.IllegalArgumentException
- public ResponseAPDU getPORCount() throws OneWireException, OneWireIOException, java.lang.IllegalArgumentException
OneWireException
- OneWireIOException
- java.lang.IllegalArgumentException
- public ResponseAPDU getRealTimeClock() throws OneWireException, OneWireIOException, java.lang.IllegalArgumentException
OneWireException
- OneWireIOException
- java.lang.IllegalArgumentException
- public ResponseAPDU getATR() throws OneWireException, OneWireIOException, java.lang.IllegalArgumentException
OneWireException
- OneWireIOException
- java.lang.IllegalArgumentException
- public ResponseAPDU getEphemeralGCMode() throws OneWireException, OneWireIOException, java.lang.IllegalArgumentException
OneWireException
- OneWireIOException
- java.lang.IllegalArgumentException
- public ResponseAPDU getAppletGCMode() throws OneWireException, OneWireIOException, java.lang.IllegalArgumentException
OneWireException
- OneWireIOException
- java.lang.IllegalArgumentException
- public ResponseAPDU getCommandPINMode() throws OneWireException, OneWireIOException, java.lang.IllegalArgumentException
OneWireException
- OneWireIOException
- java.lang.IllegalArgumentException
- public ResponseAPDU getLoadPINMode() throws OneWireException, OneWireIOException, java.lang.IllegalArgumentException
OneWireException
- OneWireIOException
- java.lang.IllegalArgumentException
- public ResponseAPDU getRestoreMode() throws OneWireException, OneWireIOException, java.lang.IllegalArgumentException
OneWireException
- OneWireIOException
- java.lang.IllegalArgumentException
- public ResponseAPDU getExceptionMode() throws OneWireException, OneWireIOException, java.lang.IllegalArgumentException
OneWireException
- OneWireIOException
- java.lang.IllegalArgumentException
- public ResponseAPDU getCommitBufferSize() throws OneWireException, OneWireIOException, java.lang.IllegalArgumentException
OneWireException
- OneWireIOException
- java.lang.IllegalArgumentException
- public ResponseAPDU setCommonPIN(java.lang.String newPIN) throws OneWireException, OneWireIOException, java.lang.IllegalArgumentException
newPIN
- the value of the PIN to be set in the Java iButtonOneWireException
- OneWireIOException
- java.lang.IllegalArgumentException
- public ResponseAPDU setEphemeralGCMode(int mode) throws OneWireException, OneWireIOException, java.lang.IllegalArgumentException
mode
- to turn on/off ephemeral garbage collector.OneWireException
- OneWireIOException
- java.lang.IllegalArgumentException
- public ResponseAPDU setAppletGCMode(int mode) throws OneWireException, OneWireIOException, java.lang.IllegalArgumentException
mode
- to turn on/off applet garbage collector.OneWireException
- OneWireIOException
- java.lang.IllegalArgumentException
- public ResponseAPDU setCommandPINMode(int mode) throws OneWireException, OneWireIOException, java.lang.IllegalArgumentException
mode
- to turn on/off command PIN requirement.OneWireException
- OneWireIOException
- java.lang.IllegalArgumentException
- public ResponseAPDU setLoadPINMode(int mode) throws OneWireException, OneWireIOException, java.lang.IllegalArgumentException
mode
- to turn on/off load PIN mode.OneWireException
- OneWireIOException
- java.lang.IllegalArgumentException
- public ResponseAPDU setRestoreMode(int mode) throws OneWireException, OneWireIOException, java.lang.IllegalArgumentException
mode
- to turn on/off restore mode.OneWireException
- OneWireIOException
- java.lang.IllegalArgumentException
- public ResponseAPDU setExceptionMode(int mode) throws OneWireException, OneWireIOException, java.lang.IllegalArgumentException
mode
- OneWireException
- OneWireIOException
- java.lang.IllegalArgumentException
- public ResponseAPDU setCommitBufferSize(int size) throws OneWireException, OneWireIOException, java.lang.IllegalArgumentException
size
- size of the desired commit buffer.OneWireException
- OneWireIOException
- java.lang.IllegalArgumentException
- public ResponseAPDU select(java.lang.String aid) throws OneWireException, OneWireIOException, java.lang.IllegalArgumentException
aid
- the AID of the applet to be selected.OneWireException
- OneWireIOException
- java.lang.IllegalArgumentException
- public ResponseAPDU process(CommandAPDU capdu) throws OneWireException, OneWireIOException, java.lang.IllegalArgumentException
capdu
- CommandAPDU to be sent to the Java iButton.OneWireException
- OneWireIOException
- java.lang.IllegalArgumentException
- public ResponseAPDU sendAPDU(CommandAPDU capdu, int runTime) throws OneWireException, OneWireIOException, java.lang.IllegalArgumentException
capdu
- the CommandAPDU to be sent to the Java iButtonrunTime
- the run time value sent to the OWUS registerOneWireException
- OneWireIOException
- java.lang.IllegalArgumentException
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |