OSDP.Net 5.2.1
A .NET library for implementing the Open Supervised Device Protocol (OSDP)
Loading...
Searching...
No Matches
OSDP.Net.Model.ReplyData.KeypadData Class Reference

A keypad reply. More...

Inheritance diagram for OSDP.Net.Model.ReplyData.KeypadData:
OSDP.Net.Model.PayloadData

Public Member Functions

 KeypadData (byte readerNumber, string data)
 Creates a new instance of KeypadData.
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 KeypadData ParseData (ReadOnlySpan< byte > data)
 Parses the message payload bytes.

Properties

byte ReaderNumber [get]
 Reader number 0=First Reader 1=Second Reader.
ushort DigitCount [get]
 Number of digits in the return data.
byte[] Data [get]
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.

Detailed Description

A keypad reply.

Definition at line 11 of file KeypadData.cs.

Constructor & Destructor Documentation

◆ KeypadData()

OSDP.Net.Model.ReplyData.KeypadData.KeypadData ( byte readerNumber,
string data )
inline

Creates a new instance of KeypadData.

Parameters
readerNumberReader number (0=First Reader, 1=Second Reader)
dataData returned from the keypad as a string

Definition at line 20 of file KeypadData.cs.

References Data, DigitCount, and ReaderNumber.

Referenced by ParseData().

Member Function Documentation

◆ BuildData()

override byte[] OSDP.Net.Model.ReplyData.KeypadData.BuildData ( )
inline

Definition at line 91 of file KeypadData.cs.

References Data, DigitCount, and ReaderNumber.

◆ ParseData()

KeypadData OSDP.Net.Model.ReplyData.KeypadData.ParseData ( ReadOnlySpan< byte > data)
inlinestatic

Parses the message payload bytes.

Parameters
dataMessage payload as bytes
Returns
An instance of KeypadData representing the message payload

Definition at line 105 of file KeypadData.cs.

References KeypadData().

Referenced by OSDP.Net.Model.Packet.ParsePayloadData().

◆ SecurityControlBlock()

override ReadOnlySpan< byte > OSDP.Net.Model.ReplyData.KeypadData.SecurityControlBlock ( )
inline

Definition at line 85 of file KeypadData.cs.

◆ ToString()

override string OSDP.Net.Model.ReplyData.KeypadData.ToString ( )
inline

Definition at line 121 of file KeypadData.cs.

Property Documentation

◆ Code

override byte OSDP.Net.Model.ReplyData.KeypadData.Code
get

Definition at line 82 of file KeypadData.cs.

◆ Data

byte [] OSDP.Net.Model.ReplyData.KeypadData.Data
get

Data returned from keypad

The key encoding uses the following data representation:

  • Digits 0 through 9 are reported as ASCII characters 0x30 through 0x39
  • The clear/delete/'*' key is reported as ASCII DELETE, 0x7F
  • The enter/'#' key is reported as ASCII return, 0x0D

Special/function keys are reported as upper case ASCII:

  • A or F1 = 0x41
  • B or F2 = 0x42
  • C or F3 = 0x43
  • D or F4 = 0x44
  • F1 and F2 = 0x45
  • F2 and F3 = 0x46
  • F3 and F4 = 0x47
  • F1 and F4 = 0x48

Definition at line 79 of file KeypadData.cs.

Referenced by BuildData(), and KeypadData().

◆ DigitCount

ushort OSDP.Net.Model.ReplyData.KeypadData.DigitCount
get

Number of digits in the return data.

Definition at line 35 of file KeypadData.cs.

Referenced by BuildData(), and KeypadData().

◆ ReaderNumber

byte OSDP.Net.Model.ReplyData.KeypadData.ReaderNumber
get

Reader number 0=First Reader 1=Second Reader.

Definition at line 30 of file KeypadData.cs.

Referenced by BuildData(), and KeypadData().


The documentation for this class was generated from the following file: