//protected Slots: void sJarvisNode::data_rx(QByteArray data) { m_rxBuffer.append(data); m_commLog.append(data); parseBuffer(m_rxBuffer); emit rawInput(data); }
void sJarvisNode::ping() { sendPing(); qDebug() << "KeepATimer:" <<m_keepAliveTimer.elapsed(); if(m_keepAliveTimer.elapsed() > 25000) { emit rawInput("Timeout, Disconnected!"); this->closeTCP(); } }
void testEcho() { String s; while (true) { uint8_t byte; rawInput()->read(&byte, 1); if ((0x20 < byte) && (byte < 128)) print("('%%':%%)", char(byte), int(byte)); else print("(%%)", int(byte)); } }
void jarvisNodeTestApp::connectNodeSignals(sJarvisNode* node) { connect(node,SIGNAL(tx()),&m_rxWidget,SLOT(tx())); connect(node,SIGNAL(rx()),&m_rxWidget,SLOT(rx())); connect(node,SIGNAL(rawInput(QByteArray)),this,SLOT(console_log(QByteArray))); connect(node,SIGNAL(writeData(QByteArray)),this,SLOT(console_log(QByteArray))); connect(node,SIGNAL(incomingEvent(QString,jarvisEvents,QStringList)),this,SLOT(eventLog(QString,jarvisEvents,QStringList))); //connect(node,SIGNAL(newComponent(sJarvisNodeComponent*)),this,SLOT(addComponent(sJarvisNodeComponent*))); //connect(&m_sensorsTimer,SIGNAL(timeout()),this,SLOT(timedCmd())); connect(node,SIGNAL(sensorReads(QVector<QString>,QVector<double>)),this,SLOT(sensorRead(QVector<QString>,QVector<double>))); connect(node,SIGNAL(ready()),this,SLOT(nodeConnected())); connect(node,SIGNAL(disconnected()),this,SLOT(nodeDisconnected())); connect(ui->sliderUpdateInterval,SIGNAL(sliderMoved(int)),node,SLOT(setUpdateInterval(int))); connect(ui->btnReset,SIGNAL(clicked()),node,SLOT(resetNode())); }