com.dalsemi.onewire.jib
Class SWInterpreter
java.lang.Object
|
+--com.dalsemi.onewire.jib.SWInterpreter
- public class SWInterpreter
- extends Object
This class is intended to help developers translate from status words
returned by a Java Powered iButton into a meaningful message. Normal
program execution with the Java Powered iButton is performed using
APDU classes and OneWireContainer16, and looks something like this:
//CommandAPDU capdu already defined
ResponseAPDU response;
response = owc16.sendAPDU(capdu);
int statusword = response.getSW();
//use the SWInterpreter class to print a message
System.out.println(SWInterpreter.interpret(statusword));
This class allows you to use the statusword
to print a message. If the status word returned
was 0x6400, indicating not enough memory, the above code would print the message:
"SW 0x6400 Insufficient Memory"
- Version:
- 0.00, 16 Mar 2001
- Author:
- K
- See Also:
OneWireContainer16
Method Summary |
static String |
interpret(int sw)
Returns an appropriate message for the status word argument. |
SWInterpreter
public SWInterpreter()
interpret
public static String interpret(int sw)
- Returns an appropriate message for the status word argument.
this adapter object will find. This method knows messages
for the following status words:
- SW 0x6100 Response Bytes Remaining
- SW 0x6301 Success Packet
- SW 0x6400 Insufficient Memory
- SW 0x6681 Bad Master PIN
- SW 0x6700 Wrong Length
- SW 0x6901 Invalid AID Length
- SW 0x6902 Invalid API Version
- SW 0x6903 Invalid Password
- SW 0x6904 Invalid Signature Length
- SW 0x6905 Hash Corruption
- SW 0x6906 Hash Failure
- SW 0x6982 Invalid Signature
- SW 0x6984 Data Invalid
- SW 0x6985 Conditions Of Use Not Satisfied
- SW 0x6A80 Wrong Data
- SW 0x6A81 Function Not Supported
- SW 0x6A82 Unable to Select Applet
- SW 0x6A84 Class Length Overrun
- SW 0x6A86 Invalid Loader Command
- SW 0x6A87 Incomplete Packet
- SW 0x6B00 Incorrect Parameters (P1,P2)
- SW 0x6C00 Correct Expected Length
- SW 0x6D00 INS Value Not Supported
- SW 0x6F00 Uncaught Exception
- SW 0x8450 Unable to Find Applet
- SW 0x8453 Unable to Select Applet
- SW 0x9000 Success
If any other status word is passed to this method, the String
"Unrecognized SW" is returned.
- Parameters:
status
- word returned from the Java Powered iButton- Returns:
- message suitable for display
Copyright © 1999-2003 Dallas Semiconductor. All Rights Reserved.