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

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.

Detailed Description

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.

Constructor & Destructor Documentation

◆ LineQualityTest()

OSDP.Net.LineQuality.LineQualityTest.LineQualityTest ( IRetunableOsdpConnection connection,
ILoggerFactory loggerFactory = null )
inline

Initializes a line quality test controller.

Parameters
connectionThe serial connection to test on. The test takes over the connection and retunes it as it sweeps baud rates.
loggerFactoryOptional logger factory.
Exceptions
ArgumentNullExceptionThe connection is null.

Definition at line 58 of file LineQualityTest.cs.

References LineQualityTest().

Referenced by LineQualityTest().

Member Function Documentation

◆ RunAsync()

async Task< LineQualityReport > OSDP.Net.LineQuality.LineQualityTest.RunAsync ( LineQualityOptions options = null,
CancellationToken token = default )
inline

Runs a line quality test.

Parameters
optionsOptions controlling the run, or null for defaults.
tokenToken used to abandon the run.
Returns
The results.
Exceptions
LineQualityExceptionNo 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().


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