23 : this(sequenceNumber, pattern,
LineQualityProtocol.GeneratePattern(pattern, payloadLength),
32 Data = data ??
throw new ArgumentNullException(nameof(data));
43 public byte[]
Data {
get; }
99 int declared = payload[6];
101 Math.Min(declared, available)).ToArray();
byte SequenceNumber
Gets the test sequence number, echoed back by the responder.
override ReadOnlySpan< byte > SecurityControlBlock()
int DeclaredPayloadLength
Gets the payload length declared in the header, which may differ from the number of bytes actually pr...
EchoRequest(byte sequenceNumber, TestPattern pattern, int payloadLength)
Initializes an Echo Request carrying freshly generated pattern data.
static bool TryParse(ReadOnlySpan< byte > payload, out EchoRequest request)
Attempts to parse an Echo Request from an osdp_MFG payload.
TestPattern Pattern
Gets the requested test pattern.
byte[] Data
Gets the test data carried by the request.
override CommandType CommandType
bool IsLengthConsistent
Gets a value indicating whether the declared payload length matches the bytes present.
override byte[] BuildData()
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.
TestPattern
Test pattern identifiers defined by the OSDP Line Quality Test Procedure, section 3....