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

An Echo Response (Reply ID 0x01) from the Line Quality Test Procedure, section 3.7. More...

Inheritance diagram for OSDP.Net.LineQuality.EchoResponse:
OSDP.Net.Model.PayloadData

Public Member Functions

 EchoResponse (byte sequenceNumber, byte[] data)
 Initializes a successful Echo Response carrying echoed test data.
 EchoResponse (byte sequenceNumber, EchoStatus status)
 Initializes a failed Echo Response.
override ReadOnlySpan< byte > SecurityControlBlock ()
override byte[] BuildData ()
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 bool TryParse (ReadOnlySpan< byte > payload, out EchoResponse response)
 Attempts to parse an Echo Response from an osdp_MFGREP payload.

Properties

byte SequenceNumber [get]
 Gets the echoed test sequence number.
EchoStatus Status [get]
 Gets the result status.
byte[] Data [get]
 Gets the echoed test data. Always empty when Status is non-zero.
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

An Echo Response (Reply ID 0x01) from the Line Quality Test Procedure, section 3.7.

The responder echoes the bytes it received rather than regenerating them from the pattern. Regenerating would repair a corrupted payload on the way back and hide exactly the bit errors the test exists to find.

Definition at line 16 of file EchoResponse.cs.

Constructor & Destructor Documentation

◆ EchoResponse() [1/2]

OSDP.Net.LineQuality.EchoResponse.EchoResponse ( byte sequenceNumber,
byte[] data )
inline

Initializes a successful Echo Response carrying echoed test data.

Parameters
sequenceNumberThe sequence number from the request.
dataThe test data exactly as received.

Definition at line 25 of file EchoResponse.cs.

Referenced by TryParse().

◆ EchoResponse() [2/2]

OSDP.Net.LineQuality.EchoResponse.EchoResponse ( byte sequenceNumber,
EchoStatus status )
inline

Initializes a failed Echo Response.

A non-zero status carries no test data.

Parameters
sequenceNumberThe sequence number from the request.
statusThe failure status.

Definition at line 35 of file EchoResponse.cs.

Member Function Documentation

◆ BuildData()

override byte[] OSDP.Net.LineQuality.EchoResponse.BuildData ( )
inline

◆ TryParse()

bool OSDP.Net.LineQuality.EchoResponse.TryParse ( ReadOnlySpan< byte > payload,
out EchoResponse response )
inlinestatic

Attempts to parse an Echo Response from an osdp_MFGREP payload.

Parameters
payloadThe reply payload, starting at the vendor code.
responseOn success, the parsed response.
Returns
true when the payload is a well-formed line quality echo response.

Definition at line 81 of file EchoResponse.cs.

References OSDP.Net.LineQuality.LineQualityProtocol.EchoCommandId, OSDP.Net.LineQuality.LineQualityProtocol.EchoHeaderLength, EchoResponse(), and OSDP.Net.LineQuality.LineQualityProtocol.IsLineQualityVendorCode().

Property Documentation

◆ Code

override byte OSDP.Net.LineQuality.EchoResponse.Code
get

Definition at line 57 of file EchoResponse.cs.

◆ Data

byte [] OSDP.Net.LineQuality.EchoResponse.Data
get

Gets the echoed test data. Always empty when Status is non-zero.

Definition at line 54 of file EchoResponse.cs.

Referenced by BuildData().

◆ SequenceNumber

byte OSDP.Net.LineQuality.EchoResponse.SequenceNumber
get

Gets the echoed test sequence number.

Definition at line 48 of file EchoResponse.cs.

Referenced by BuildData().

◆ Status

EchoStatus OSDP.Net.LineQuality.EchoResponse.Status
get

Gets the result status.

Definition at line 51 of file EchoResponse.cs.

Referenced by BuildData().


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