|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nz.ac.waikato.modeljunit.examples.gsm.SimCardAdaptor
public class SimCardAdaptor
This class connects the SimCard model to the GSM11Impl.
Field Summary | |
---|---|
protected byte[] |
apdu
|
protected byte[] |
response
|
protected GSM11Impl |
sut
|
Constructor Summary | |
---|---|
SimCardAdaptor()
|
Method Summary | |
---|---|
void |
Change_PIN(int old_Pin,
int new_Pin,
SimCard.Status_Word result)
|
protected void |
checkStatus(SimCard.Status_Word expect,
int position)
Check that an expected and actual status agree. |
void |
Disabled_PIN(int Pin,
SimCard.Status_Word result)
|
void |
Enabled_PIN(int Pin,
SimCard.Status_Word result)
|
protected int |
getByte(byte[] buf,
int pos)
|
protected int |
getWord(byte[] buf,
int pos)
|
protected void |
initCmd(int cmdnum,
int p1,
int p2,
int p3)
Sets up the first few bytes of the APDU, ready to send to the SIM. |
void |
Read_Binary(SimCard.Status_Word result,
java.lang.String read_data)
This always reads from offset 0, and reads just 2 bytes. |
void |
reset()
|
void |
Select_file(SimCard.F_Name file_name,
SimCard.Status_Word result)
|
protected void |
setChv(int pos,
int chv)
Packs a PIN number (given as an int) into 8 bytes. |
protected void |
setFileID(SimCard.F_Name file)
Translate a model filename into a real filename. |
protected void |
setWord(int pos,
int value)
|
void |
Unblock_PIN(int Puk,
int new_Pin,
SimCard.Status_Word result)
|
void |
Verify_PIN(int Pin,
SimCard.Status_Word result)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected byte[] apdu
protected byte[] response
protected GSM11Impl sut
Constructor Detail |
---|
public SimCardAdaptor()
Method Detail |
---|
protected void initCmd(int cmdnum, int p1, int p2, int p3)
protected void setWord(int pos, int value)
protected void setChv(int pos, int chv)
protected void setFileID(SimCard.F_Name file)
protected int getWord(byte[] buf, int pos)
protected int getByte(byte[] buf, int pos)
protected void checkStatus(SimCard.Status_Word expect, int position)
expect
- The expected status (from the model).position
- The position in response
of the status wordpublic void reset()
public void Verify_PIN(int Pin, SimCard.Status_Word result)
public void Unblock_PIN(int Puk, int new_Pin, SimCard.Status_Word result)
public void Enabled_PIN(int Pin, SimCard.Status_Word result)
public void Disabled_PIN(int Pin, SimCard.Status_Word result)
public void Change_PIN(int old_Pin, int new_Pin, SimCard.Status_Word result)
public void Select_file(SimCard.F_Name file_name, SimCard.Status_Word result)
public void Read_Binary(SimCard.Status_Word result, java.lang.String read_data)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |