ds.ov2.front
Class RSA_card_debug_test_stubs

java.lang.Object
  extended by ds.ov2.front.RSA_card_debug_test_stubs

public class RSA_card_debug_test_stubs
extends Object

Stub code for running methods in the testframe on the host. Defines one stub method for each protocol step in RSA_card_debug.id. This class is the test-frame alternative to RSA_card_debug_stubs. It provides the same public interface, but instead of communicating with a Java Card and invoking methods there, it directly invokes the methods on the very same Java Virtual machine. This is of course only possible, if (almost) all of the applet code is available on the host. All CardChannel arguments in this class are unused.

Each stub method here performs the following actions:

  1. argument conversion (for instance from BigInteger to Bignat)
  2. running the specified action for this step
  3. result conversion
  4. and finally packages several results into one tuple object

CPP Preprocessing
no cpp preprocessing needed
Execution Environment:
host
Author:
idl compiler
Version:
automatically generated from RSA_card_debug.id

Nested Class Summary
static class RSA_card_debug_test_stubs.Get_result
          Result record for step get of protocol status.
static class RSA_card_debug_test_stubs.Mem_size_result
          Result record for step mem_size of protocol mem_size.
 
Field Summary
private  PrintWriter out
          The output channel for debugging information of the OV-chip protocol layer.
private  RSA_card_debug_description protocol_description
          A protocol description instance from RSA_card_debug.id.
 
Constructor Summary
RSA_card_debug_test_stubs(RSA_card_debug_description d, PrintWriter o, boolean script)
          Stub constructor.
 
Method Summary
 void delayed_init()
          Delayed initialization.
 RSA_card_debug_test_stubs.Get_result get_call(CardChannel _cc)
          Call step get of protocol status in the test environment.
 RSA_card_debug_test_stubs.Mem_size_result mem_size_call(CardChannel _cc)
          Call step mem_size of protocol mem_size in the test environment.
 void reset_call(CardChannel _cc)
          Call step reset of protocol reset_applet_state in the test environment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

protocol_description

private RSA_card_debug_description protocol_description
A protocol description instance from RSA_card_debug.id. Used to access the host initializers, which are additional parameters for the APDU type constructors of arguments or results. Initialized in the constructor.


out

private PrintWriter out
The output channel for debugging information of the OV-chip protocol layer. Initialized in the constructor.

Constructor Detail

RSA_card_debug_test_stubs

public RSA_card_debug_test_stubs(RSA_card_debug_description d,
                                 PrintWriter o,
                                 boolean script)
Stub constructor. In this test-frame alternative there are no Host_protocol data structures to initialize. Therefore this constructor only saves the first two arguments into object local fields. The argument script is only there for compatibility with RSA_card_debug_stubs, it is ignored here.

Parameters:
d - protocol description instance for RSA_card_debug.id
o - channel for printing debugging information, pass null for disabling debugging information
script - ignored here, controls printing of apdutool lines in RSA_card_debug_stubs
Method Detail

get_call

public RSA_card_debug_test_stubs.Get_result get_call(CardChannel _cc)
Call step get of protocol status in the test environment.

Parameters:
_cc - ignored here, can be null, card channel in RSA_card_debug_stubs
Returns:
Get_result record containing all results.

mem_size_call

public RSA_card_debug_test_stubs.Mem_size_result mem_size_call(CardChannel _cc)
Call step mem_size of protocol mem_size in the test environment.

Parameters:
_cc - ignored here, can be null, card channel in RSA_card_debug_stubs
Returns:
Mem_size_result record containing all results.

reset_call

public void reset_call(CardChannel _cc)
Call step reset of protocol reset_applet_state in the test environment.

Parameters:
_cc - ignored here, can be null, card channel in RSA_card_debug_stubs

delayed_init

public void delayed_init()
Delayed initialization. Empty method, only here for compatibility with RSA_card_debug_stubs. In this test-frame alternative there are no Host_protocol data structures to initialize, consequently nothing has to be done in delayed initialization