OSDP.Net 5.2.1
A .NET library for implementing the Open Supervised Device Protocol (OSDP)
Loading...
Searching...
No Matches
OSDP.Net.PanelCommands.DeviceDiscover.DiscoveryOptions Class Reference

Defines a set of optional parameters the caller can pass in to the ControlPanel.DiscoverDevice(System.Collections.Generic.IEnumerable<IOsdpConnection>, DiscoveryOptions) call. More...

Public Member Functions

DiscoveryOptions WithDefaultTracer (bool setDefault=true)
 The library has a default tracer that will always write to [connectionId].osdpcap file in the current working directory of the calling process.

Properties

DiscoveryProgress ProgressCallback [get, set]
 Callback to invoke when there is a status update.
TimeSpan ResponseTimeout = TimeSpan.FromMilliseconds(500) [get, set]
 Maximum time to wait for a poll command to return.
TimeSpan ReconnectDelay = TimeSpan.Zero [get, set]
 When discovery is enumerating multiple possible connections, this option specifies the time interval to wait between the close of a connection and opening of a subsequent one.
Action< TraceEntry > Tracer [get, set]
 Tracer instance to use to report network commands/replies as issued by the device discovery.
CancellationToken CancellationToken [get, set]
 Cancellation token to listen to if the caller wishes to be able to interrupt device discovery.

Detailed Description

Defines a set of optional parameters the caller can pass in to the ControlPanel.DiscoverDevice(System.Collections.Generic.IEnumerable<IOsdpConnection>, DiscoveryOptions) call.

Definition at line 114 of file DeviceDiscover.cs.

Member Function Documentation

◆ WithDefaultTracer()

DiscoveryOptions OSDP.Net.PanelCommands.DeviceDiscover.DiscoveryOptions.WithDefaultTracer ( bool setDefault = true)
inline

The library has a default tracer that will always write to [connectionId].osdpcap file in the current working directory of the calling process.

Call this method to set Tracer property to this default instance.

Parameters
setDefaultFlag that indicates whether or not a default tracer is to be used. From an API perspective, this seems a bit silly to have, but it's here because it made calling code slightly more conscise
Returns

Definition at line 158 of file DeviceDiscover.cs.

References Tracer.

Property Documentation

◆ CancellationToken

CancellationToken OSDP.Net.PanelCommands.DeviceDiscover.DiscoveryOptions.CancellationToken
getset

Cancellation token to listen to if the caller wishes to be able to interrupt device discovery.

Definition at line 147 of file DeviceDiscover.cs.

◆ ProgressCallback

DiscoveryProgress OSDP.Net.PanelCommands.DeviceDiscover.DiscoveryOptions.ProgressCallback
getset

Callback to invoke when there is a status update.

Definition at line 119 of file DeviceDiscover.cs.

◆ ReconnectDelay

TimeSpan OSDP.Net.PanelCommands.DeviceDiscover.DiscoveryOptions.ReconnectDelay = TimeSpan.Zero
getset

When discovery is enumerating multiple possible connections, this option specifies the time interval to wait between the close of a connection and opening of a subsequent one.

This might be necessary when testing multiple baud rates on a single serial COM port as the port might still be marked "in use" right after we release our handle to it.

Definition at line 135 of file DeviceDiscover.cs.

◆ ResponseTimeout

TimeSpan OSDP.Net.PanelCommands.DeviceDiscover.DiscoveryOptions.ResponseTimeout = TimeSpan.FromMilliseconds(500)
getset

Maximum time to wait for a poll command to return.

This is important here since if a connection doesn't have a device or a poll is sent to an unknown address, there will be no reply. Therefore, this timeout interval determines the maximum time of the device discovery

Definition at line 127 of file DeviceDiscover.cs.

◆ Tracer

Action<TraceEntry> OSDP.Net.PanelCommands.DeviceDiscover.DiscoveryOptions.Tracer
getset

Tracer instance to use to report network commands/replies as issued by the device discovery.

Definition at line 141 of file DeviceDiscover.cs.

Referenced by WithDefaultTracer().


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