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

Information details of a message packet. More...

Inheritance diagram for OSDP.Net.Model.Packet:
OSDP.Net.Model.IPacket

Public Member Functions

 Packet (IncomingMessage message)
 Initializes a new instance of the Packet class from an incoming message.
object ParsePayloadData ()
 Parse the payload data into an object.

Properties

IncomingMessage IncomingMessage [get]
 The underlying incoming message.
byte Address [get]
 Address of the message.
byte Sequence [get]
 Sequence number of the message.
CommandType? CommandType [get]
 The type of command sent or null it is a reply.
ReplyType? ReplyType [get]
 The type of reply sent or null it is a command.
bool IsUsingCrc [get]
 Is CRC being used.
bool IsPayloadDecrypted [get]
 Indicates whether the payload was successfully decrypted.
bool IsSecureMessage [get]
 Indicates if the message was sent via an established secure channel.
bool IsUsingDefaultKey [get]
 Indicates if the secure channel is using the default key.
ReadOnlySpan< byte > RawPayloadData [get]
 Raw bytes of the payload data.
ReadOnlySpan< byte > RawData [get]
 Raw bytes of the entire message data.

Detailed Description

Information details of a message packet.

Definition at line 13 of file Packet.cs.

Constructor & Destructor Documentation

◆ Packet()

Member Function Documentation

◆ ParsePayloadData()

object OSDP.Net.Model.Packet.ParsePayloadData ( )
inline

Property Documentation

◆ Address

byte OSDP.Net.Model.Packet.Address
get

Address of the message.

Implements OSDP.Net.Model.IPacket.

Definition at line 52 of file Packet.cs.

Referenced by Packet().

◆ CommandType

CommandType? OSDP.Net.Model.Packet.CommandType
get

The type of command sent or null it is a reply.

Implements OSDP.Net.Model.IPacket.

Definition at line 62 of file Packet.cs.

Referenced by OSDP.Net.Tracing.OSDPPacketTextFormatter.FormatPacket(), Packet(), and ParsePayloadData().

◆ IncomingMessage

IncomingMessage OSDP.Net.Model.Packet.IncomingMessage
get

The underlying incoming message.

Definition at line 47 of file Packet.cs.

Referenced by Packet().

◆ IsPayloadDecrypted

bool OSDP.Net.Model.Packet.IsPayloadDecrypted
get

Indicates whether the payload was successfully decrypted.

When true, the payload contains decrypted data that can be parsed. When false, the payload is still encrypted because the secure channel was not established or the required key was not available.

Implements OSDP.Net.Model.IPacket.

Definition at line 82 of file Packet.cs.

Referenced by OSDP.Net.Tracing.OSDPPacketTextFormatter.FormatPacket(), and ParsePayloadData().

◆ IsSecureMessage

bool OSDP.Net.Model.Packet.IsSecureMessage
get

Indicates if the message was sent via an established secure channel.

Implements OSDP.Net.Model.IPacket.

Definition at line 87 of file Packet.cs.

Referenced by OSDP.Net.Tracing.OSDPPacketTextFormatter.FormatPacket().

◆ IsUsingCrc

bool OSDP.Net.Model.Packet.IsUsingCrc
get

Is CRC being used.

Implements OSDP.Net.Model.IPacket.

Definition at line 72 of file Packet.cs.

Referenced by Packet().

◆ IsUsingDefaultKey

bool OSDP.Net.Model.Packet.IsUsingDefaultKey
get

Indicates if the secure channel is using the default key.

Implements OSDP.Net.Model.IPacket.

Definition at line 92 of file Packet.cs.

Referenced by OSDP.Net.Tracing.OSDPPacketTextFormatter.FormatPacket().

◆ RawData

ReadOnlySpan<byte> OSDP.Net.Model.Packet.RawData
get

Raw bytes of the entire message data.

Implements OSDP.Net.Model.IPacket.

Definition at line 220 of file Packet.cs.

◆ RawPayloadData

ReadOnlySpan<byte> OSDP.Net.Model.Packet.RawPayloadData
get

Raw bytes of the payload data.

Implements OSDP.Net.Model.IPacket.

Definition at line 215 of file Packet.cs.

Referenced by ParsePayloadData().

◆ ReplyType

ReplyType? OSDP.Net.Model.Packet.ReplyType
get

The type of reply sent or null it is a command.

Implements OSDP.Net.Model.IPacket.

Definition at line 67 of file Packet.cs.

Referenced by OSDP.Net.Tracing.OSDPPacketTextFormatter.FormatPacket(), Packet(), and ParsePayloadData().

◆ Sequence

byte OSDP.Net.Model.Packet.Sequence
get

Sequence number of the message.

Implements OSDP.Net.Model.IPacket.

Definition at line 57 of file Packet.cs.

Referenced by Packet().


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