|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectds.ov2.test.Check_data_transmission
class Check_data_transmission
Test the protocol layer by sending arguments and receiving results of varying sizes. The bytes sent and received are enumerated to detect bugs. Checks various corner cases, for instance total argument length of 509, 510 and 511 bytes.
Field Summary | |
---|---|
private Data_protocol_host |
data
Instance for running the data transmission protocol. |
private PrintWriter |
out
Output channel for progress messages. |
Constructor Summary | |
---|---|
Check_data_transmission(Data_protocol_description data_protocol,
CardChannel cc)
Constructor. |
Method Summary | |
---|---|
long |
check_with_sizes(String msg,
int a1,
int a2,
int a3,
int a4,
int a5,
int r1,
int r2,
int r3,
int r4,
int r5,
boolean performance_test)
Test the protocol layer by sending 5 arguments and receiving 5 results of the specified size. |
void |
run_ex()
Run protocol layer checks. |
void |
run()
Exception wrapper for run_ex() . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private PrintWriter out
private Data_protocol_host data
Constructor Detail |
---|
public Check_data_transmission(Data_protocol_description data_protocol, CardChannel cc)
data_protocol
- data protocol description instancecc
- channel to the appletMethod Detail |
---|
public long check_with_sizes(String msg, int a1, int a2, int a3, int a4, int a5, int r1, int r2, int r3, int r4, int r5, boolean performance_test) throws CardException, Data_protocol_host.Data_error
Resizable_buffer's
that are used as arguments and results. If
performance_test
is false the bytes in the transmission
are enumerated to catch reordering bugs.
msg
- identifier for progress messagesa1
- size of the first argumenta2
- size of the second argumenta3
- size of the third argumenta4
- size of the fourth argumenta5
- size of the fifth argumentr1
- size of the first resultr2
- size of the second resultr3
- size of the third resultr4
- size of the fourth resultr5
- size of the fifth resultperformance_test
- if true do not enumerate the bytes sent
to obtain pure transmission times
Data_protocol_host.Data_error
- if an error in the
protocol layer is detected
CardException
- on communication problemspublic void run_ex() throws CardException, Data_protocol_host.Data_error
Data_protocol_host.Data_error
- if an error in the
protocol layer is detected
CardException
- on communication problemspublic void run()
run_ex()
. Run the protocol layer
checks and print escaping exceptions.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |