|
OSDP.Net 5.2.1
A .NET library for implementing the Open Supervised Device Protocol (OSDP)
|
Extended write (transparent mode) command data sent to a PD. More...
Public Member Functions | |
| ExtendedWrite (byte mode, byte pCommand, byte[] pData) | |
| Initializes a new instance of the ExtendedWrite 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 ExtendedWrite | ParseData (ReadOnlySpan< byte > data) |
| Parses the message payload bytes. | |
| static ExtendedWrite | ReadModeSetting () |
| Queries the PD for its current extended mode setting. | |
| static ExtendedWrite | ModeZeroConfiguration (bool enabled) |
| Configures Mode 0 (enable or disable transparent mode). | |
| static ExtendedWrite | ModeOneConfiguration () |
| Switches the PD to Mode 1 (transparent APDU). | |
| static ExtendedWrite | ModeOnePassAPDUCommand (byte readerNumber, byte[] command) |
| Passes a raw APDU to the smart card through the specified reader. | |
| static ExtendedWrite | ModeOneTerminateSmartCardConnection (byte readerNumber) |
| Instructs the PD to terminate the smart card session on the specified reader. | |
| static ExtendedWrite | ModeOneSmartCardScan (byte readerNumber) |
| Instructs the PD to scan for a smart card on the specified reader. | |
Properties | |
| byte | Mode [get] |
| Gets the extended READ/WRITE mode. | |
| byte | PCommand [get] |
| Gets the mode-specific command code. | |
| byte[] | PData [get] |
| Gets the command-specific data. | |
| override CommandType | CommandType [get] |
| override byte | Code [get] |
| Properties inherited from OSDP.Net.Model.CommandData.CommandData | |
| CommandType | CommandType [get] |
| Message command code. | |
| 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. | |
Additional Inherited Members | |
| Static Protected Member Functions inherited from OSDP.Net.Model.CommandData.CommandData | |
| static T[] | SplitData< T > (int size, Func< byte[], T > parseDataFunction, ReadOnlySpan< byte > payloadData) |
| Splits data into multiple elements of type T based on a specified size. | |
Extended write (transparent mode) command data sent to a PD.
Transparent mode allows an ACU to communicate with an ISO 7816-4 smart card through a PD's reader by tunneling raw APDU bytes over the OSDP link. The PD acts as a bridge between the ACU and the smart card.
Definition at line 17 of file ExtendedWrite.cs.
|
inline |
Initializes a new instance of the ExtendedWrite class.
| mode | Extended READ/WRITE mode (0 = configuration, 1 = transparent APDU). |
| pCommand | Command code whose meaning depends on mode . |
| pData | Command-specific data. |
| ArgumentNullException | pData |
Definition at line 26 of file ExtendedWrite.cs.
References Mode, PCommand, and PData.
Referenced by ModeOneConfiguration(), ModeOnePassAPDUCommand(), ModeOneSmartCardScan(), ModeOneTerminateSmartCardConnection(), ModeZeroConfiguration(), ParseData(), and ReadModeSetting().
|
inline |
Definition at line 58 of file ExtendedWrite.cs.
|
inlinestatic |
Passes a raw APDU to the smart card through the specified reader.
| readerNumber | The reader number on the PD. |
| command | The raw APDU bytes to send to the smart card. |
| ArgumentNullException | command |
Definition at line 105 of file ExtendedWrite.cs.
References ExtendedWrite().
|
static |
Instructs the PD to scan for a smart card on the specified reader.
| readerNumber | The reader number on the PD. |
References ExtendedWrite().
|
static |
Instructs the PD to terminate the smart card session on the specified reader.
| readerNumber | The reader number on the PD. |
References ExtendedWrite().
|
static |
Configures Mode 0 (enable or disable transparent mode).
| enabled | Whether Mode 0 is enabled. |
References ExtendedWrite().
|
inlinestatic |
Parses the message payload bytes.
| data | Message payload as bytes. |
Leniently handles short payloads so the PD does not NAK mid-handshake when an ACU sends a Mode-only or Mode+PCommand probe. Missing fields default to zero/empty.
Definition at line 72 of file ExtendedWrite.cs.
References ExtendedWrite().
Referenced by OSDP.Net.Device.EnqueuePollReply(), and OSDP.Net.Model.Packet.ParsePayloadData().
|
inline |
Definition at line 130 of file ExtendedWrite.cs.
|
get |
Definition at line 52 of file ExtendedWrite.cs.
|
get |
Definition at line 49 of file ExtendedWrite.cs.
|
get |
Gets the extended READ/WRITE mode.
Definition at line 36 of file ExtendedWrite.cs.
Referenced by BuildData(), and ExtendedWrite().
|
get |
Gets the mode-specific command code.
Definition at line 41 of file ExtendedWrite.cs.
Referenced by BuildData(), and ExtendedWrite().
|
get |
Gets the command-specific data.
Definition at line 46 of file ExtendedWrite.cs.
Referenced by BuildData(), and ExtendedWrite().