Class DeviceWatcher
- Namespace
- nanoFramework.Tools.Debugger.PortSerial
- Assembly
- nanoFramework.Tools.DebugLibrary.Net.dll
Device watcher.
public class DeviceWatcher : IDisposable
- Inheritance
-
DeviceWatcher
- Implements
- Inherited Members
- Extension Methods
Constructors
DeviceWatcher(PortSerialManager)
Constructor for a PortSerialManager device watcher class.
public DeviceWatcher(PortSerialManager owner)
Parameters
owner
PortSerialManagerThe PortSerialManager that owns this device watcher.
Properties
Status
Gets or sets the status of the device watcher.
public DeviceWatcherStatus Status { get; }
Property Value
Methods
Dispose()
Disposes the watcher.
public void Dispose()
GetPortNames()
Gets the list of serial ports.
public static List<string> GetPortNames()
Returns
Start(ICollection<string>)
Starts the device watcher.
public void Start(ICollection<string> portsToExclude = null)
Parameters
portsToExclude
ICollection<string>The collection of serial ports to ignore when searching for devices. Changes in the collection after the start of the device watcher are taken into account.
Stop()
Stops the watcher.
public void Stop()
Events
Added
Raised when a device is added to the system.
public event DeviceWatcher.EventDeviceAdded Added
Event Type
AllNewDevicesAdded
Raised when all newly discovered devices have been added
public event DeviceWatcher.EventAllNewDevicesAdded AllNewDevicesAdded
Event Type
Removed
Raised when a device is removed from the system.
public event DeviceWatcher.EventDeviceRemoved Removed