Page MenuHomec4science

cellulopoolclient.cpp
No OneTemporary

File Metadata

Created
Sun, May 5, 08:33

cellulopoolclient.cpp

#include "cellulopoolclient.h"
void CelluloPoolClientWrapper::init_()
{
client = new Cellulo::CelluloLocalRelayClient;
connect(client, &Cellulo::CelluloLocalRelayClient::unknownRobotAtServer, this, &CelluloPoolClientWrapper::onNewRobot);
qDebug() << "POOL Object created";
}
CelluloPoolClientWrapper::CelluloPoolClientWrapper()
{
robots_N = 0;
}
void CelluloPoolClientWrapper::onNewRobot(QString macAddr) {
qDebug() << "ATTENTION ROBOT FOUND " << macAddr;
Cellulo::CelluloBluetooth* newRobot = new Cellulo::CelluloBluetooth();
newRobot->setAutoConnect(false);
newRobot->setMacAddr(macAddr);
newRobot->setParent(client);
newRobot->setParentItem(client);
robots.push_back(newRobot);
client->addRobot(newRobot, true);
robots_N++;
}

Event Timeline