Constructor
(abstract) new DeviceManager(type)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
type |
string | The type of device managed. |
Extends
- EventEmitter
Methods
(abstract) allDevices() → {Array.<physical.Device>}
- Source:
All devices being managed.
Returns:
All devices being managed.
- Type
- Array.<physical.Device>
info() → {Array.<physical.DeviceInfo>}
- Source:
Returns information about known devices. Known devices are either connected devices or devices that were once connected and then got disconnected.
Returns:
Device info list.
- Type
- Array.<physical.DeviceInfo>
logInfo(loggeropt)
- Source:
- See:
Logs information about known devices.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
logger |
object |
<optional> |
console
|
A Console-like object for logging, with a log function. |
startMonitoring()
- Source:
Starts monitoring for devices. No-op by default.
Fires:
stopMonitoring()
- Source:
Stops monitoring for devices. No-op by default.
supportsMonitoring() → {boolean}
- Source:
If this device manager supports monitoring, true
by default.
Returns:
If this device manager supports monitoring.
- Type
- boolean
Events
added
- Source:
Device added event. A monitoring Device Manager should fire this event when a device is added (connected).
removed
- Source:
Device removed event. A monitoring Device Manager should fire this event when a device is removed (disconnected).