23 socket.
bind(
"tcp://*:6665");
30 socket.recv(&request);
31 const char* request_data = (
const char*)request.
data();
33 if (strncmp(request_data,
"[get_data_names]", 16) == 0)
39 std::map<QString, double>::iterator it;
42 string_reply.append(it->first + QString(
" "));
49 else if (strncmp(request_data,
"[get_data]", 10) == 0)
52 QString string_request = QString::fromUtf8(&request_data[10], request.
size() - 10);
53 QStringList names = string_request.split(
';');
58 for (
int i = 0; i < names.count(); i++)
60 std::map<QString, double>::iterator it =
_current_data.find(names.at(i));
68 double value = it->second;
69 string_reply.append(QString::number(value) + QString(
" "));
77 memcpy(reply.
data(),
"Error", 5);
89 memcpy(reply.
data(),
"Error", 5);
107 PlotDataMap::iterator it;
112 for (it = datamap->begin(); it != datamap->end(); it++)
114 const QString& name = it->first;
115 PlotDataPtr Timeseries = it->second;