NifTK
16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
|
The QextSerialEnumerator class provides list of ports available in the system. More...
Signals | |
void | deviceDiscovered (const QextPortInfo &info) |
void | deviceRemoved (const QextPortInfo &info) |
Public Member Functions | |
QextSerialEnumerator (QObject *parent=0) | |
~QextSerialEnumerator () | |
void | setUpNotifications () |
Static Public Member Functions | |
static QList< QextPortInfo > | getPorts () |
The QextSerialEnumerator class provides list of ports available in the system.
To poll the system for a list of connected devices, simply use getPorts(). Each QextPortInfo structure will populated with information about the corresponding device.
Example
To enable event-driven notification of device connection events, first call setUpNotifications() and then connect to the deviceDiscovered() and deviceRemoved() signals. Event-driven behavior is currently available only on Windows and OS X.
Example
QextSerialEnumerator::QextSerialEnumerator | ( | QObject * | parent = 0 | ) |
Constructs a QextSerialEnumerator object with the given parent.
QextSerialEnumerator::~QextSerialEnumerator | ( | ) |
Destructs the QextSerialEnumerator object.
|
signal |
A new device has been connected to the system.
setUpNotifications() must be called first to enable event-driven device notifications. Currently only implemented on Windows and OS X.
info The device that has been discovered.
|
signal |
A device has been disconnected from the system.
setUpNotifications() must be called first to enable event-driven device notifications. Currently only implemented on Windows and OS X.
info The device that was disconnected.
|
static |
Get list of ports.
return list of ports currently available in the system.
void QextSerialEnumerator::setUpNotifications | ( | ) |
Enable event-driven notifications of board discovery/removal.