void CDevicePCR2500::slotNewDataReceived(const QByteArray &dataReceived) { log_t.dataReceive += dataReceived.size(); //qDebug() << "Data received " << dataReceived.data() << " length " << dataReceived.length(); emit sigData(QString(dataReceived)); haveSeenData = true; }
void SocketPair::readServerData() { QByteArray data = serverConnection->readAll(); if (data.length()) { emit sigData(data); } }
/** * It should be created only ones * * @brief UnixSignals::UnixSignals * @param parent */ UnixSignals::UnixSignals( QObject *parent ) : QObject(parent) { if (!UnixSignals::sockPair.create()) qFatal("Unable to create signal socket pair"); connect(&UnixSignals::sockPair, SIGNAL(sigData(QByteArray)), this, SLOT(handleSig(QByteArray))); }
CCommand::CCommand(QObject *parent) : QObject(parent), m_device(NULL), stepsize(100000), scopewidth(5000000), polarity(0), reverse(0) { // Initialize radio struct radioList = new QList<settings_t*>(); currentRadio = new settings_t; // Add two radio entry in list radioList->append(new settings_t); radioList->append(new settings_t); // Init serial connection object m_device = new CDevicePCR2500("/dev/ttyUSB0", "38400", this); connect(m_device, SIGNAL(sigData(QString)), this, SLOT(slotReceivedData(QString))); connect(this, SIGNAL(sendData(QString&)), this, SLOT(write(QString&))); // Initialize sample width samplewidth = scopewidth / stepsize; }