#include "comPc.h"

#include <QDebug>

comPc::comPc()
{

    QObject::connect(ant_, SIGNAL(sig_open_Serial(int)), this, SLOT(status_RS232(int)));
    QObject::connect(this, SIGNAL(sig_text(QString)), this, SLOT(set_Text(QString)));


}

/******************** SLOTS ********************/

void comPc::status_RS232(int resul)
{
    if(resul == RS232_NOT_USED)
    {
        emit sig_text("Com Data Link: not used \n");
    }
    else if(resul == RS232_NOT_OPENED)
    {
        emit sig_text("Com Data Link: close \n");
    }
    else if(resul == RS232_OPENED)
    {
        emit sig_text("Com Data Link: open \n");
    }

    qDebug() << "comPc::status_RS232";
}

/******************** END SLOTS ********************/
