Table of Contents

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 PortSerialManager

The PortSerialManager that owns this device watcher.

Properties

Status

Gets or sets the status of the device watcher.

public DeviceWatcherStatus Status { get; }

Property Value

DeviceWatcherStatus

Methods

Dispose()

Disposes the watcher.

public void Dispose()

GetPortNames()

Gets the list of serial ports.

public static List<string> GetPortNames()

Returns

List<string>

The list of serial ports that may be connected to a nanoDevice.

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

DeviceWatcher.EventDeviceAdded

AllNewDevicesAdded

Raised when all newly discovered devices have been added

public event DeviceWatcher.EventAllNewDevicesAdded AllNewDevicesAdded

Event Type

DeviceWatcher.EventAllNewDevicesAdded

Removed

Raised when a device is removed from the system.

public event DeviceWatcher.EventDeviceRemoved Removed

Event Type

DeviceWatcher.EventDeviceRemoved