|
OSDP.Net 5.2.1
A .NET library for implementing the Open Supervised Device Protocol (OSDP)
|
The controller side of the OSDP Line Quality Test Procedure: sweeps baud rates, bounces test patterns off a responder, and reports what survived. More...
Public Member Functions | |
| LineQualityTest (IRetunableOsdpConnection connection, ILoggerFactory loggerFactory=null) | |
| Initializes a line quality test controller. | |
| async Task< LineQualityReport > | RunAsync (LineQualityOptions options=null, CancellationToken token=default) |
| Runs a line quality test. | |
The controller side of the OSDP Line Quality Test Procedure: sweeps baud rates, bounces test patterns off a responder, and reports what survived.
This drives the connection directly rather than going through ControlPanel. The polling bus queues commands and dispatches them on its own schedule, so round-trip times measured through it describe the scheduler rather than the line; it folds integrity failures in with timeouts, which erases the most diagnostic signal the test produces; and it retries on timeout, which would count a lost packet as delivered. None of that is wrong for normal operation, and all of it is fatal to a measurement.
Response times are measured to the first byte of the reply, per OSDP section 5.7. Note that on a PC with a USB-to-RS-485 adapter the resolution is limited by the adapter's latency timer, commonly 16 ms; treat timing as a pass/fail gate against the 200 ms reply window rather than as a precise measurement.
Definition at line 36 of file LineQualityTest.cs.
|
inline |
Initializes a line quality test controller.
| connection | The serial connection to test on. The test takes over the connection and retunes it as it sweeps baud rates. |
| loggerFactory | Optional logger factory. |
| ArgumentNullException | The connection is null. |
Definition at line 58 of file LineQualityTest.cs.
References LineQualityTest().
Referenced by LineQualityTest().
|
inline |
Runs a line quality test.
| options | Options controlling the run, or null for defaults. |
| token | Token used to abandon the run. |
| LineQualityException | No responder answered at any baud rate. |
Definition at line 71 of file LineQualityTest.cs.
References OSDP.Net.LineQuality.LineQualityProtocol.DefaultBaudRates, and OSDP.Net.LineQuality.LineQualityProtocol.ToBaudRate().