|
OSDP.Net 5.2.1
A .NET library for implementing the Open Supervised Device Protocol (OSDP)
|
An extended read (transparent mode) reply. More...
Public Member Functions | |
| ExtendedRead (byte mode, byte pReply, byte[] pData) | |
| Initializes a new instance of the ExtendedRead class. | |
| override ReadOnlySpan< byte > | SecurityControlBlock () |
| override byte[] | BuildData () |
| override string | ToString () |
| Public Member Functions inherited from OSDP.Net.Model.PayloadData | |
| byte[] | BuildData () |
| Converts the payload into a byte array to be sent over the wire. | |
| ReadOnlySpan< byte > | SecurityControlBlock () |
| Retrieves the security control block for a specific command data type. | |
| virtual void | CustomMessageUpdate (Span< byte > messageBuffer) |
| Updates the message data before sending in the specified byte buffer. | |
Static Public Member Functions | |
| static ExtendedRead | ParseData (ReadOnlySpan< byte > data) |
| Parses the message payload bytes. | |
| static ExtendedRead | ModeZeroSettingReport (byte currentMode, bool enabled) |
| Builds a Mode-0 setting report reply (response to CommandData.ExtendedWrite.ReadModeSetting). | |
| static ExtendedRead | CardPresent (byte readerNumber) |
| Builds an unsolicited card-present notification on the specified reader. | |
| static ExtendedRead | ApduResponse (byte readerNumber, byte[] response) |
| Builds a Mode-1 APDU response reply. | |
| static ExtendedRead | SessionTerminated (byte readerNumber) |
| Builds a Mode-1 smart-card session-terminated reply. | |
Properties | |
| byte | Mode [get] |
| Gets the extended READ/WRITE mode. | |
| byte | PReply [get] |
| Gets the mode-specific reply code. | |
| byte[] | PData [get] |
| Gets the reply data. | |
| override byte | Code [get] |
| Properties inherited from OSDP.Net.Model.PayloadData | |
| byte | Code [get] |
| Gets the command or reply code byte value that represent the type of data. | |
| virtual bool | IsSecurityInitialization [get] |
| Gets a value indicating whether the security initialization is performed by this payload. | |
An extended read (transparent mode) reply.
Transparent mode uses paired XWR/XRD messages to tunnel ISO 7816-4 smart-card APDUs across the OSDP link. This class is the PD-side reply payload and can be both built (PD sending) and parsed (ACU receiving).
Definition at line 16 of file ExtendedRead.cs.
|
inline |
Initializes a new instance of the ExtendedRead class.
| mode | Extended READ/WRITE mode (0 = configuration, 1 = transparent APDU). |
| pReply | Mode-specific reply code. |
| pData | Reply data. |
| ArgumentNullException | pData |
Definition at line 25 of file ExtendedRead.cs.
References Mode, PData, and PReply.
Referenced by ApduResponse(), CardPresent(), ModeZeroSettingReport(), ParseData(), and SessionTerminated().
|
inlinestatic |
Builds a Mode-1 APDU response reply.
| readerNumber | The reader number on the PD. |
| response | The APDU response bytes returned from the smart card. |
| ArgumentNullException | response |
Definition at line 101 of file ExtendedRead.cs.
References ExtendedRead().
|
inline |
Definition at line 54 of file ExtendedRead.cs.
|
static |
Builds an unsolicited card-present notification on the specified reader.
| readerNumber | The reader number on the PD. |
References ExtendedRead().
|
static |
Builds a Mode-0 setting report reply (response to CommandData.ExtendedWrite.ReadModeSetting).
| currentMode | The PD's currently configured transparent mode (0 or 1). |
| enabled | Whether transparent mode is enabled. |
References ExtendedRead().
|
inlinestatic |
Parses the message payload bytes.
| data | Message payload as bytes. |
Leniently handles short payloads: the smart-card flow legitimately produces replies shorter than two bytes during PD state transitions (e.g., while scanning for a card), so missing fields default to zero/empty rather than throwing.
Definition at line 72 of file ExtendedRead.cs.
References ExtendedRead().
Referenced by OSDP.Net.ControlPanel.ExtendedWriteData(), and OSDP.Net.Model.Packet.ParsePayloadData().
|
static |
Builds a Mode-1 smart-card session-terminated reply.
| readerNumber | The reader number on the PD. |
References ExtendedRead().
|
inline |
Definition at line 119 of file ExtendedRead.cs.
|
get |
Definition at line 48 of file ExtendedRead.cs.
|
get |
Gets the extended READ/WRITE mode.
Definition at line 35 of file ExtendedRead.cs.
Referenced by BuildData(), and ExtendedRead().
|
get |
Gets the reply data.
Definition at line 45 of file ExtendedRead.cs.
Referenced by BuildData(), and ExtendedRead().
|
get |
Gets the mode-specific reply code.
Definition at line 40 of file ExtendedRead.cs.
Referenced by BuildData(), and ExtendedRead().