SerialPortManager
Description
The SerialPortManager object manages SerialPort devices. When a device is connected it will be discovered in the next discover run.
- › Inherits:
Overview
Properties
Methods
Signals
Properties
devices
This property holds all available SerialPort objects.
- › Type:
- › Signal:
devicesChanged()
- › Attributes:
Readonly
updateInterval
This property holds the interval in milliseconds in which to update the device list.
- › Type:
SignedInteger
- › Default:
10000- › Signal:
updateIntervalChanged()
- › Attributes:
Writable
Signals
devicesDataChanged(SignedInteger index)
This signal is emitted whenever the List.dataChanged() signal is emitted, i.e. the item at index in the devices list itself emitted the dataChanged() signal.
Example
import InCore.Foundation 2.5
import InCore.IO 2.5
Application {
SerialPortManager {
updateInterval: 1000
onDevicesChanged: {
console.log("Serial ports changed:")
for( var i = 0; i < devices.length; ++i )
{
console.log("Port:", devices[i].portName,
"\n\tSerial number:", devices[i].serialNumber,
"\n\tDescription:", devices[i].description,
"\n\tManufacturer:", devices[i].manufacturer,
"\n\tVendor identifier:", devices[i].vendorIdentifier,
"\n\tProduct identifier:", devices[i].productIdentifier,
)
}
}
}
}