Home · All Classes ·

main.cpp Example File

examples/enumerator/main.cpp
    /**
     * @file main.cpp
     * @brief Main file.
     * @author Micha? Policht
     */
    #include "qextserialenumerator.h"
    #include <QtCore/QList>
    #include <QtCore/QDebug>
    int main()
    {
        QList<QextPortInfo> ports = QextSerialEnumerator::getPorts();
        qDebug() << "List of ports:";
        foreach (QextPortInfo info, ports) {
            qDebug() << "port name:"       << info.portName;
            qDebug() << "friendly name:"   << info.friendName;
            qDebug() << "physical name:"   << info.physName;
            qDebug() << "enumerator name:" << info.enumName;
            qDebug() << "vendor ID:"       << info.vendorID;
            qDebug() << "product ID:"      << info.productID;

            qDebug() << "===================================";
        }
        return 0;
    }


Copyright © 2000-2012 QextSerialPort Project
QextSerialPort Manual