36 : base(
"To perform device discovery control panel cannot have any open connections") { }
141 public Action<TraceEntry>
Tracer {
get;
set; }
160 if (setDefault)
Tracer = OSDPFileCaptureTracer.Trace;
215 public Exception
Error {
get;
internal set; }
220 var sb =
new StringBuilder();
222 sb.AppendLine($
" Baud Rate: {Connection.BaudRate}");
223 sb.AppendLine($
" Address: {Address}");
224 sb.AppendLine(
"Identification:");
226 sb.AppendLine(
Id?.
ToString()?.TrimEnd().Replace(
"\n",
"\n "));
227 sb.AppendLine(
" Capabilities:");
229 sb.AppendLine(
Capabilities.ToString().TrimEnd().Replace(
"\n",
"\n "));
230 sb.AppendLine($
"Responds to Default Security Key: {(UsesDefaultSecurityKey ? "Yes
" : "No
")}");
232 return sb.ToString();
The PD device capabilities data sent as a reply.
The PD identification data sent as a reply.
ControlPanelInUseException()
Instantiates a new instance of ControlPanelInUseException.
DeviceDiscoveryException(string message)
Initializes a new instance of DeviceDiscoveryException.
Defines a set of optional parameters the caller can pass in to the ControlPanel.DiscoverDevice(System...
CancellationToken CancellationToken
Cancellation token to listen to if the caller wishes to be able to interrupt device discovery.
TimeSpan ResponseTimeout
Maximum time to wait for a poll command to return.
Action< TraceEntry > Tracer
Tracer instance to use to report network commands/replies as issued by the device discovery.
DiscoveryProgress ProgressCallback
Callback to invoke when there is a status update.
DiscoveryOptions WithDefaultTracer(bool setDefault=true)
The library has a default tracer that will always write to [connectionId].osdpcap file in the current...
TimeSpan ReconnectDelay
When discovery is enumerating multiple possible connections, this option specifies the time interval ...
Contains the results of the device discovery.
DiscoveryStatus Status
Determines current state of the device discovery.
IOsdpConnection Connection
When Status is DiscoveryStatus.LookingForDeviceOnConnection this property identifies connection being...
bool UsesDefaultSecurityKey
A flag that indicates whether or not discovered device responds to the default security key The secur...
DeviceIdentification Id
After status DiscoveryStatus.DeviceIdentified, this property will contain the identification report f...
override string ToString()
byte Address
When Status is DiscoveryStatus.LookingForDeviceAtAddress, this property identifies the address being ...
Exception Error
When status is set to DiscoveryStatus.Error or DiscoveryStatus.Cancelled this property will be set to...
DeviceCapabilities Capabilities
After status DiscoveryStatus.CapabilitiesDiscovered, this property will contain the capabilities repo...
Defines a connection for communicating via OSDP protocol.
delegate void DiscoveryProgress(DiscoveryResult current)
Callback used for reporting device discovery status updates.
DiscoveryStatus
Represents current state of the device discovery process.
@ DeviceIdentified
Received a valid reply to osdp_PDID command, device has been found and its address determined.
@ LookingForDeviceAtAddress
About to send an osdp_PDID to a specific address to see if a device will respond and if it does to ge...
@ CapabilitiesDiscovered
Received a valid reply to osdp_CAM command.
@ LookingForDeviceOnConnection
About to send an osdp_POLL to configuration address (0x7f) to see if a device will respond on a conne...
@ Succeeded
Device discovery completed successfully.
@ ConnectionWithDeviceFound
Received a valid reply too osdp_POLL indicating that the right connection has been found.
@ Started
Device discovery has been started.
@ Error
Something unexpected has gone wrong during the device discovery process.
@ Cancelled
Device discovery process terminated due to a cancellation request.
@ DeviceNotFound
No devices have been found.