Crescendo SDK
|
Contains comprehensive information about a smart card reader and its current state. More...
Public Member Functions | |
ReaderInfo (string readerName, bool hasToken=false, byte[]? tokenATR=null, string? tokenName=null, int? tokenIndex=null) | |
Initializes a new instance of the ReaderInfo class. | |
Properties | |
bool | HasToken [get, set] |
Gets or sets a value indicating whether a smart card or token is currently present in the reader. | |
string | ReaderName [get, set] |
Gets or sets the name of the smart card reader. | |
byte?[] | TokenATR [get, set] |
Gets or sets the Answer To Reset (ATR) bytes of the smart card or token. | |
int? | TokenIndex [get, set] |
Gets or sets the zero-based index of the token within the current session. | |
string? | TokenName [get, set] |
Gets or sets the human-readable name of the smart card or token. | |
Contains comprehensive information about a smart card reader and its current state.
This class provides a unified view of both empty readers and readers containing smart cards or tokens, including basic token information when available.
|
inline |
Initializes a new instance of the ReaderInfo class.
readerName | The name of the smart card reader. |
hasToken | A value indicating whether a token is present in the reader. |
tokenATR | The ATR bytes of the token, if present. |
tokenName | The human-readable name of the token, if present. |
tokenIndex | The index of the token, if present. |
When hasToken is false
, the token-related parameters should be null
and will be ignored.
References CrescendoDLL.PCSC.ReaderInfo.HasToken, CrescendoDLL.PCSC.ReaderInfo.ReaderName, CrescendoDLL.PCSC.ReaderInfo.TokenATR, CrescendoDLL.PCSC.ReaderInfo.TokenIndex, and CrescendoDLL.PCSC.ReaderInfo.TokenName.
|
getset |
Gets or sets a value indicating whether a smart card or token is currently present in the reader.
true
if a card or token is present; false
otherwise.
When this property is true
, the token-related properties (TokenATR, TokenName, TokenIndex) will contain valid data.
Referenced by CrescendoDLL.PCSC.ReaderInfo.ReaderInfo().
|
getset |
Gets or sets the name of the smart card reader.
The system-assigned name of the PC/SC reader, such as OMNIKEY CardMan 5x21 00 01
.
This name is provided by the PC/SC subsystem and uniquely identifies the reader within the current session.
Referenced by CrescendoDLL.PCSC.ReaderInfo.ReaderInfo().
|
getset |
Gets or sets the Answer To Reset (ATR) bytes of the smart card or token.
The ATR byte array, or null
if no token is present.
The ATR is a unique identifier returned by the smart card when it's activated. It contains information about the card's capabilities and communication parameters. This property is only populated when CrescendoDLL.PCSC.ReaderInfo.HasToken is true
.
Referenced by CrescendoDLL.PCSC.ReaderInfo.ReaderInfo().
|
getset |
Gets or sets the zero-based index of the token within the current session.
The token index, or null
if no token is present.
This index is assigned sequentially to tokens as they are discovered and can be used for programmatic token selection. This property is only populated when CrescendoDLL.PCSC.ReaderInfo.HasToken is true
.
Referenced by CrescendoDLL.PCSC.ReaderInfo.ReaderInfo().
|
getset |
Gets or sets the human-readable name of the smart card or token.
The token name (e.g., Crescendo 4000
), or null
if no token is present.
This name is derived from the token's ATR and provides a user-friendly identifier for the type of smart card or token. This property is only populated when CrescendoDLL.PCSC.ReaderInfo.HasToken is true
.
Referenced by CrescendoDLL.PCSC.ReaderInfo.ReaderInfo().