OSDP.Net 5.2.1
A .NET library for implementing the Open Supervised Device Protocol (OSDP)
Loading...
Searching...
No Matches
LineQualityOptions.cs
1using System;
2using System.Collections.Generic;
4
6{
10 public class LineQualityOptions
11 {
17 public TestProfile Profile { get; set; } = TestProfile.Screening;
18
23 public IReadOnlyList<int> BaudRates { get; set; }
24
28 public byte Address { get; set; } = LineQualityProtocol.TestAddress;
29
34 public TimeSpan ResponseTimeout { get; set; } = TimeSpan.FromMilliseconds(200);
35
40 public TimeSpan BaudRateSettleDelay { get; set; } = TimeSpan.FromMilliseconds(100);
41
46 public bool ReturnToBaselineWhenDone { get; set; } = true;
47
51 public IProgress<LineQualityProgress> Progress { get; set; }
52
57 public Action<TraceEntry> Tracer { get; set; }
58 }
59
63 public class LineQualityProgress
64 {
65 internal LineQualityProgress(string message, int baudRate, int packetsSentAtRate,
66 int totalPacketsAtRate, int completedBaudRates, int totalBaudRates)
67 {
68 Message = message;
69 BaudRate = baudRate;
70 PacketsSentAtRate = packetsSentAtRate;
71 TotalPacketsAtRate = totalPacketsAtRate;
72 CompletedBaudRates = completedBaudRates;
73 TotalBaudRates = totalBaudRates;
74 }
75
77 public string Message { get; }
78
80 public int BaudRate { get; }
81
83 public int PacketsSentAtRate { get; }
84
86 public int TotalPacketsAtRate { get; }
87
89 public int CompletedBaudRates { get; }
90
92 public int TotalBaudRates { get; }
93 }
94}
Options controlling a line quality test run.
IProgress< LineQualityProgress > Progress
Gets or sets an optional callback receiving progress updates.
TimeSpan ResponseTimeout
Gets or sets how long to wait for the first byte of a reply.
Action< TraceEntry > Tracer
Gets or sets an optional tracer receiving every packet sent and received, for capture to an osdpcap f...
byte Address
Gets or sets the responder address.
TimeSpan BaudRateSettleDelay
Gets or sets how long to wait after a baud rate change acknowledgment has drained before retuning the...
TestProfile Profile
Gets or sets the test profile, which sets the iteration count and therefore the smallest loss rate th...
bool ReturnToBaselineWhenDone
Gets or sets whether to return the responder to 9600 baud when the run finishes.
IReadOnlyList< int > BaudRates
Gets or sets the baud rates to sweep.
string Message
Gets a human-readable description of what the test is doing.
int CompletedBaudRates
Gets how many baud rates have been completed.
int TotalPacketsAtRate
Gets how many packets the current rate will send in total.
int TotalBaudRates
Gets how many baud rates the run will exercise in total.
int BaudRate
Gets the baud rate currently being exercised.
int PacketsSentAtRate
Gets how many packets have been sent at the current rate.
Constants and helpers for the OSDP Line Quality Test Procedure.
const byte TestAddress
The dedicated line quality test address, 125 (0x7D).
TestProfile
Test profiles from section 3.10 of the Line Quality Test Procedure.