ds.ov2.front
Class RSA_card_debug_stubs

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

public class RSA_card_debug_stubs
extends Object

Stub code for running methods on the card. Defines one stub method for each protocol step in RSA_card_debug.id. The stub methods are the top entry point into the OV-chip protocol layer for host driver code. Each stub method performs the following actions:

  1. argument conversion (for instance from BigInteger to Bignat)
  2. transfers the arguments to the card (possibly using several APDU's)
  3. invokes the right method on the card
  4. transfers the results back (again with possibly several APDU's)
  5. result conversion
  6. 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_stubs.Get_result
          Result record for step get of protocol status.
static class RSA_card_debug_stubs.Mem_size_result
          Result record for step mem_size of protocol mem_size.
 
Field Summary
private  Host_protocol hp_get
          Host protocol instance for step get of protocol status.
private  Host_protocol hp_mem_size
          Host protocol instance for step mem_size of protocol mem_size.
private  Host_protocol hp_reset
          Host protocol instance for step reset of protocol reset_applet_state.
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.
private  boolean with_apdu_script
          Controls apdutool line printing.
 
Constructor Summary
RSA_card_debug_stubs(RSA_card_debug_description d, PrintWriter o, boolean script)
          Stub constructor.
 
Method Summary
 void delayed_init()
          Delayed initialization.
 RSA_card_debug_stubs.Get_result get_call(CardChannel _cc)
          Call step get of protocol status on the card.
private  void init_hp_get(RSA_card_debug_description d, PrintWriter out, boolean script)
          Initialization method for hp_get.
private  void init_hp_mem_size(RSA_card_debug_description d, PrintWriter out, boolean script)
          Initialization method for hp_mem_size.
private  void init_hp_reset(RSA_card_debug_description d, PrintWriter out, boolean script)
          Initialization method for hp_reset.
 RSA_card_debug_stubs.Mem_size_result mem_size_call(CardChannel _cc)
          Call step mem_size of protocol mem_size on the card.
 void reset_call(CardChannel _cc)
          Call step reset of protocol reset_applet_state on the card.
 
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.


with_apdu_script

private boolean with_apdu_script
Controls apdutool line printing. Initialized in the constructor, if true, the OV-chip protocol layer prints apdutool lines as part of its debugging output.


hp_get

private Host_protocol hp_get
Host protocol instance for step get of protocol status. Initialized via init_hp_get (which is called from delayed_init()).


hp_mem_size

private Host_protocol hp_mem_size
Host protocol instance for step mem_size of protocol mem_size. Initialized via init_hp_mem_size (which is called from the constructor).


hp_reset

private Host_protocol hp_reset
Host protocol instance for step reset of protocol reset_applet_state. Initialized via init_hp_reset (which is called from the constructor).

Constructor Detail

RSA_card_debug_stubs

public RSA_card_debug_stubs(RSA_card_debug_description d,
                            PrintWriter o,
                            boolean script)
Stub constructor. Initializes all non-delayed host protocol instances from RSA_card_debug.id. Delayed protocols must be initialized separately with delayed_init() at the appropriate moment.

Parameters:
d - protocol description instance for RSA_card_debug.id
o - channel for printing debugging information, pass null for disabling debugging information
script - if true, print apdutool lines for all APDUs as part of the debugging information.
Method Detail

init_hp_get

private void init_hp_get(RSA_card_debug_description d,
                         PrintWriter out,
                         boolean script)
Initialization method for hp_get.

Parameters:
d - description instance for RSA_card_debug.id
out - the debugging out channel, null for disabling debugging output
script - whether this step prints apdutool lines

get_call

public RSA_card_debug_stubs.Get_result get_call(CardChannel _cc)
                                         throws CardException
Call step get of protocol status on the card.

Parameters:
_cc - communication channel to the applet, must not be null
Returns:
Get_result record containing all results.
Throws:
CardException - in case of communication errors

init_hp_mem_size

private void init_hp_mem_size(RSA_card_debug_description d,
                              PrintWriter out,
                              boolean script)
Initialization method for hp_mem_size.

Parameters:
d - description instance for RSA_card_debug.id
out - the debugging out channel, null for disabling debugging output
script - whether this step prints apdutool lines

mem_size_call

public RSA_card_debug_stubs.Mem_size_result mem_size_call(CardChannel _cc)
                                                   throws CardException
Call step mem_size of protocol mem_size on the card.

Parameters:
_cc - communication channel to the applet, must not be null
Returns:
Mem_size_result record containing all results.
Throws:
CardException - in case of communication errors

init_hp_reset

private void init_hp_reset(RSA_card_debug_description d,
                           PrintWriter out,
                           boolean script)
Initialization method for hp_reset.

Parameters:
d - description instance for RSA_card_debug.id
out - the debugging out channel, null for disabling debugging output
script - whether this step prints apdutool lines

reset_call

public void reset_call(CardChannel _cc)
                throws CardException
Call step reset of protocol reset_applet_state on the card.

Parameters:
_cc - communication channel to the applet, must not be null
Throws:
CardException - in case of communication errors

delayed_init

public void delayed_init()
Delayed initialization. Initialize protocols annotated with delayed protocol init in RSA_card_debug.id.