#include <ctcommand.h>
Public Member Functions | |
unsigned char | cla () const |
void | setCla (unsigned char c) |
unsigned char | ins () const |
command (depends on your chip card) | |
void | setIns (unsigned char c) |
unsigned char | p1 () const |
some commands have parameters which are stored in p1 and p2. | |
void | setP1 (unsigned char c) |
unsigned char | p2 () const |
some commands have parameters which are stored in p1 and p2. | |
void | setP2 (unsigned char c) |
const string & | data () const |
data to be send and data received, respectively. Please note that this field gets overwritten upon transmission to the chip card or terminal. | |
void | setData (const string &s) |
void | setData (const char *p, unsigned int s) |
void | setData (char c) |
void | setData (unsigned char c) |
void | addData (const string &s) |
void | addData (char c) |
void | addData (unsigned char c) |
unsigned short | lr () const |
expected maxmimum length of card's answer. This field is somewhat tricky. The reason is, that this field MAY occur, it may have a valid value and/or it may have the value 0 for CTAPI. To reflect this I gave this field special handling for some values: -0 means that no answer from the card is expected -1-255 tell the precise number of bytes expected -256 or higher mean: no limit (256 or more bytes) | |
void | setLr (unsigned short s) |
unsigned char | sw1 () const |
general processing status | |
void | setSw1 (unsigned char c) |
unsigned char | sw2 () const |
processing qualifier | |
void | setSw2 (unsigned char c) |
CTCommand () | |
~CTCommand () | |
string | toString () |
This is the command struct for an iso command.
|
|
|
|
|
|
|
|
|
|
|
command class 0x20 for terminal, 0x00 for card. some cards may define other classes, so have a look at the documentation for the card you want to write classes for |
|
data to be send and data received, respectively. Please note that this field gets overwritten upon transmission to the chip card or terminal.
|
|
command (depends on your chip card)
|
|
expected maxmimum length of card's answer. This field is somewhat tricky. The reason is, that this field MAY occur, it may have a valid value and/or it may have the value 0 for CTAPI. To reflect this I gave this field special handling for some values: -0 means that no answer from the card is expected -1-255 tell the precise number of bytes expected -256 or higher mean: no limit (256 or more bytes)
|
|
some commands have parameters which are stored in p1 and p2.
|
|
some commands have parameters which are stored in p1 and p2.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
general processing status All commands return a two byte result code, if they were processed by the card. The first one is here. |
|
processing qualifier All commands return a two byte result code, if they were processed by the card. This is the second one (processing qualifier, tells you more precise about the result) |
|
Creates an APDU from this command object. |