OSDP.Net 5.2.1
A .NET library for implementing the Open Supervised Device Protocol (OSDP)
Loading...
Searching...
No Matches
OSDP.Net.Tracing.IPacketTextFormatter Interface Reference

Interface for formatting OSDP packets as human-readable text. More...

Inheritance diagram for OSDP.Net.Tracing.IPacketTextFormatter:
OSDP.Net.Tracing.OSDPPacketTextFormatter

Public Member Functions

string FormatPacket (Packet packet, DateTime timestamp, TimeSpan? timeDelta=null)
 Formats a successfully parsed packet as text.
string FormatError (byte[] rawData, DateTime timestamp, TimeSpan? timeDelta, string errorMessage)
 Formats a packet that failed to parse due to an error.

Detailed Description

Interface for formatting OSDP packets as human-readable text.

Definition at line 9 of file IPacketTextFormatter.cs.

Member Function Documentation

◆ FormatError()

string OSDP.Net.Tracing.IPacketTextFormatter.FormatError ( byte[] rawData,
DateTime timestamp,
TimeSpan? timeDelta,
string errorMessage )

Formats a packet that failed to parse due to an error.

Parameters
rawDataThe raw packet bytes.
timestampThe timestamp when the packet was captured.
timeDeltaOptional time difference from the previous packet.
errorMessageThe error message describing why parsing failed.
Returns
Formatted text with error information and raw data.
Exceptions
ArgumentNullExceptionThrown when rawData is null.

Implemented in OSDP.Net.Tracing.OSDPPacketTextFormatter.

◆ FormatPacket()

string OSDP.Net.Tracing.IPacketTextFormatter.FormatPacket ( Packet packet,
DateTime timestamp,
TimeSpan? timeDelta = null )

Formats a successfully parsed packet as text.

Parameters
packetThe parsed OSDP packet.
timestampThe timestamp when the packet was captured.
timeDeltaOptional time difference from the previous packet.
Returns
Formatted text representation of the packet.
Exceptions
ArgumentNullExceptionThrown when packet is null.

Implemented in OSDP.Net.Tracing.OSDPPacketTextFormatter.


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