|
OSDP.Net 5.2.1
A .NET library for implementing the Open Supervised Device Protocol (OSDP)
|
An Echo Request (Command ID 0x01) from the Line Quality Test Procedure, section 3.5. More...
Public Member Functions | |
| EchoRequest (byte sequenceNumber, TestPattern pattern, int payloadLength) | |
| Initializes an Echo Request carrying freshly generated pattern data. | |
| 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 EchoRequest request) |
| Attempts to parse an Echo Request from an osdp_MFG payload. | |
Properties | |
| byte | SequenceNumber [get] |
| Gets the test sequence number, echoed back by the responder. | |
| TestPattern | Pattern [get] |
| Gets the requested test pattern. | |
| byte[] | Data [get] |
| Gets the test data carried by the request. | |
| int | DeclaredPayloadLength [get] |
| Gets the payload length declared in the header, which may differ from the number of bytes actually present when a frame has been truncated. | |
| bool | IsLengthConsistent [get] |
| Gets a value indicating whether the declared payload length matches the bytes present. | |
| override CommandType | CommandType [get] |
| override byte | Code [get] |
| Properties inherited from OSDP.Net.Model.CommandData.CommandData | |
| CommandType | CommandType [get] |
| Message command code. | |
| 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. | |
Additional Inherited Members | |
| Static Protected Member Functions inherited from OSDP.Net.Model.CommandData.CommandData | |
| static T[] | SplitData< T > (int size, Func< byte[], T > parseDataFunction, ReadOnlySpan< byte > payloadData) |
| Splits data into multiple elements of type T based on a specified size. | |
An Echo Request (Command ID 0x01) from the Line Quality Test Procedure, section 3.5.
The responder echoes the test data back so the controller can count what survived the wire.
Definition at line 12 of file EchoRequest.cs.
|
inline |
Initializes an Echo Request carrying freshly generated pattern data.
| sequenceNumber | Test sequence number, rolling 0x00 to 0xFF. This is unrelated to the OSDP control byte sequence. |
| pattern | The pattern to generate. |
| payloadLength | Length of test data, 0 to LineQualityProtocol.MaxPayloadLength. |
Definition at line 22 of file EchoRequest.cs.
Referenced by TryParse().
|
inline |
Definition at line 66 of file EchoRequest.cs.
References Data, DeclaredPayloadLength, OSDP.Net.LineQuality.LineQualityProtocol.EchoCommandId, OSDP.Net.LineQuality.LineQualityProtocol.EchoHeaderLength, Pattern, and SequenceNumber.
|
inlinestatic |
Attempts to parse an Echo Request from an osdp_MFG payload.
| payload | The message payload, starting at the vendor code. |
| request | On success, the parsed request. |
true when the payload is a structurally valid line quality echo request.A declared length that exceeds the bytes present, or that exceeds LineQualityProtocol.MaxPayloadLength, still parses. The caller decides whether that warrants a status code or a NAK, which it can determine from IsLengthConsistent and DeclaredPayloadLength.
Definition at line 90 of file EchoRequest.cs.
References OSDP.Net.LineQuality.LineQualityProtocol.EchoCommandId, OSDP.Net.LineQuality.LineQualityProtocol.EchoHeaderLength, EchoRequest(), and OSDP.Net.LineQuality.LineQualityProtocol.IsLineQualityVendorCode().
|
get |
Definition at line 60 of file EchoRequest.cs.
|
get |
Definition at line 57 of file EchoRequest.cs.
|
get |
Gets the test data carried by the request.
Definition at line 43 of file EchoRequest.cs.
Referenced by BuildData().
|
get |
Gets the payload length declared in the header, which may differ from the number of bytes actually present when a frame has been truncated.
Definition at line 49 of file EchoRequest.cs.
Referenced by BuildData().
|
get |
Gets a value indicating whether the declared payload length matches the bytes present.
Definition at line 54 of file EchoRequest.cs.
|
get |
Gets the requested test pattern.
Definition at line 40 of file EchoRequest.cs.
Referenced by BuildData().
|
get |
Gets the test sequence number, echoed back by the responder.
Definition at line 37 of file EchoRequest.cs.
Referenced by BuildData().