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

Base class representing a payload an OSDP message. More...

Inheritance diagram for OSDP.Net.Model.PayloadData:
OSDP.Net.LineQuality.BaudRateChangeAck OSDP.Net.LineQuality.EchoResponse OSDP.Net.Model.CommandData.CommandData OSDP.Net.Model.ReplyData.Ack OSDP.Net.Model.ReplyData.CommunicationConfiguration OSDP.Net.Model.ReplyData.DeviceCapabilities OSDP.Net.Model.ReplyData.DeviceIdentification OSDP.Net.Model.ReplyData.ExtendedDeviceIdentification OSDP.Net.Model.ReplyData.ExtendedRead OSDP.Net.Model.ReplyData.FileTransferStatus OSDP.Net.Model.ReplyData.FormattedCardData OSDP.Net.Model.ReplyData.InputStatus OSDP.Net.Model.ReplyData.KeypadData OSDP.Net.Model.ReplyData.LocalStatus OSDP.Net.Model.ReplyData.Nak OSDP.Net.Model.ReplyData.OutputStatus OSDP.Net.Model.ReplyData.RawCardData OSDP.Net.Model.ReplyData.ReaderStatus

Public Member Functions

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.

Properties

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

Base class representing a payload an OSDP message.

Definition at line 8 of file PayloadData.cs.

Member Function Documentation

◆ BuildData()

byte[] OSDP.Net.Model.PayloadData.BuildData ( )
abstract

Converts the payload into a byte array to be sent over the wire.

The design decision to put the burden of adding padding on every deriving class is intentional as this method is where byte[] array originates and creating a payload that is ready to be encoded, helps us avoid a few downstream heap operations.

Returns
Packed reply as array of raw bytes. Note that some types of replies, like osdp_ACK do not have additional data, in which case it is perfectly acceptable for this array to be 0 length

◆ CustomMessageUpdate()

virtual void OSDP.Net.Model.PayloadData.CustomMessageUpdate ( Span< byte > messageBuffer)
inlinevirtual

Updates the message data before sending in the specified byte buffer.

Parameters
messageBufferThe byte buffer containing the custom message.

Definition at line 49 of file PayloadData.cs.

◆ SecurityControlBlock()

ReadOnlySpan< byte > OSDP.Net.Model.PayloadData.SecurityControlBlock ( )
abstract

Retrieves the security control block for a specific command data type.

Returns
The security control block for the command data type.

This method is used to retrieve the security control block for a specific command data type. Each command data type has a specific security control block associated with it. The security control block is a collection of bytes that contains security-related information for the command data type.

Property Documentation

◆ Code

byte OSDP.Net.Model.PayloadData.Code
getabstract

Gets the command or reply code byte value that represent the type of data.

Definition at line 24 of file PayloadData.cs.

◆ IsSecurityInitialization

virtual bool OSDP.Net.Model.PayloadData.IsSecurityInitialization
get

Gets a value indicating whether the security initialization is performed by this payload.

true if the security initialization is performed; otherwise, false.

Definition at line 32 of file PayloadData.cs.


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