18 private static readonly
byte[] NoData =
new byte[0];
26 : this(sequenceNumber,
EchoStatus.
Success, data ?? throw new ArgumentNullException(nameof(data)))
36 : this(sequenceNumber, status, NoData)
54 public byte[]
Data {
get; }
70 data[6] = (byte)
Data.Length;
90 int declared = payload[6];
91 if (declared != available)
return false;
override byte[] BuildData()
override ReadOnlySpan< byte > SecurityControlBlock()
EchoStatus Status
Gets the result status.
EchoResponse(byte sequenceNumber, byte[] data)
Initializes a successful Echo Response carrying echoed test data.
byte[] Data
Gets the echoed test data. Always empty when Status is non-zero.
byte SequenceNumber
Gets the echoed test sequence number.
static bool TryParse(ReadOnlySpan< byte > payload, out EchoResponse response)
Attempts to parse an Echo Response from an osdp_MFGREP payload.
EchoResponse(byte sequenceNumber, EchoStatus status)
Initializes a failed Echo Response.
Constants and helpers for the OSDP Line Quality Test Procedure.
static bool IsLineQualityVendorCode(ReadOnlySpan< byte > candidate)
Determines whether the supplied bytes are the reserved line quality vendor code.
const int EchoHeaderLength
Number of bytes preceding the test data in an echo request or response: three vendor code bytes,...
const byte EchoCommandId
Command and reply identifier for the echo exchange.
Contains standard Security Control Block data that can be used when building messages.
Base class representing a payload an OSDP message.
EchoStatus
Status codes returned in an Echo Response, per section 3.7 of the Line Quality Test Procedure.
@ Success
Pattern received and echoed correctly.
ReplyType
Identifies the type of OSDP protocol reply (PD -> ACU) message.