CFEL - ASG Software Suite
2.5.0
CASS
|
the tcp client that connects to the cass server More...
#include <tcpclient.h>
Public Slots | |
void | reloadIni () const |
reload .ini file More... | |
void | broadcastCommand (const QString &command) const |
broadcast a command to all processors in the server More... | |
void | sendCommandTo (const QString &key, const QString &command) const |
broadcast a command to all processors in the server More... | |
void | setServer (const QString &serverstring) |
change the server to connect to More... | |
void | quitServer () const |
tell the server to quit More... | |
void | clearHistogram (QString key) const |
clear the histogram of a processor More... | |
Public Member Functions | |
TCPClient () | |
default constructor More... | |
virtual | ~TCPClient () |
destructor More... | |
result_t::shared_pointer | result (const QString &key, quint64 id=0) |
retrieve a specific result More... | |
QVector< result_t::shared_pointer > | results (const QStringList &list) |
retrieve a list of results all with the same id More... | |
QStringList | resultNames () |
retrieve the list of available histograms More... | |
QString | type () const |
return the type of source we are More... | |
size_t | receivedBytes () const |
retrieve the transferred bytes More... | |
![]() | |
QObject (QObject *parent=0) | |
blockSignals (bool block) | |
childEvent (QChildEvent *event) | |
children () | |
connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type=Qt::AutoConnection) | |
connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type=Qt::AutoConnection) | |
connectNotify (const char *signal) | |
customEvent (QEvent *event) | |
deleteLater () | |
destroyed (QObject *obj=0) | |
disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) | |
disconnect (const char *signal=0, const QObject *receiver=0, const char *method=0) | |
disconnect (const QObject *receiver, const char *method=0) | |
disconnectNotify (const char *signal) | |
dumpObjectInfo () | |
dumpObjectTree () | |
dynamicPropertyNames () | |
event (QEvent *e) | |
eventFilter (QObject *watched, QEvent *event) | |
findChild (const QString &name=QString() | |
findChildren (const QString &name=QString() | |
findChildren (const QRegExp ®Exp) | |
inherits (const char *className) | |
installEventFilter (QObject *filterObj) | |
isWidgetType () | |
killTimer (int id) | |
metaObject () | |
moveToThread (QThread *targetThread) | |
parent () | |
property (const char *name) | |
receivers (const char *signal) | |
removeEventFilter (QObject *obj) | |
sender () | |
setParent (QObject *parent) | |
setProperty (const char *name, const QVariant &value) | |
signalsBlocked () | |
startTimer (int interval) | |
thread () | |
timerEvent (QTimerEvent *event) | |
tr (const char *sourceText, const char *disambiguation=0, int n=-1) | |
trUtf8 (const char *sourceText, const char *disambiguation=0, int n=-1) | |
staticMetaObject | |
Private Attributes | |
size_t | _transferredBytes |
the amount of bytes transferred More... | |
std::string | _server |
the server string More... | |
Additional Inherited Members | |
![]() | |
typedef cass::Result< float > | result_t |
define the result type More... | |
the tcp client that connects to the cass server
Definition at line 34 of file jocassview/tcpclient.h.
TCPClient::TCPClient | ( | ) |
default constructor
Definition at line 32 of file jocassview/tcpclient.cpp.
|
virtual |
destructor
Definition at line 37 of file jocassview/tcpclient.cpp.
|
slot |
broadcast a command to all processors in the server
command | The command to broadcast |
Definition at line 167 of file jocassview/tcpclient.cpp.
References _server, QMessageBox::information(), QFuture::isRunning(), QCoreApplication::processEvents(), and QObject::tr().
|
slot |
clear the histogram of a processor
key | The key of the Postprocessor whos histograms should be cleared |
Definition at line 227 of file jocassview/tcpclient.cpp.
References _server, QMessageBox::information(), QFuture::isRunning(), QCoreApplication::processEvents(), and QObject::tr().
|
slot |
tell the server to quit
Definition at line 210 of file jocassview/tcpclient.cpp.
References _server, QMessageBox::information(), QFuture::isRunning(), QCoreApplication::processEvents(), and QObject::tr().
size_t TCPClient::receivedBytes | ( | ) | const |
retrieve the transferred bytes
Definition at line 145 of file jocassview/tcpclient.cpp.
References _transferredBytes.
|
slot |
reload .ini file
Definition at line 150 of file jocassview/tcpclient.cpp.
References _server, QMessageBox::information(), QFuture::isRunning(), QCoreApplication::processEvents(), and QObject::tr().
|
virtual |
retrieve a specific result
key | the key of the requested result |
id | the event id of the histogram to be returned |
Implements jocassview::DataSource.
Definition at line 41 of file jocassview/tcpclient.cpp.
References _server, _transferredBytes, QFuture::isRunning(), QCoreApplication::processEvents(), and QFuture::result().
Referenced by results().
|
virtual |
retrieve the list of available histograms
Implements jocassview::DataSource.
Definition at line 101 of file jocassview/tcpclient.cpp.
References _server, _transferredBytes, QString::fromStdString(), jocassview::IdList::getList(), QMessageBox::information(), QFuture::isRunning(), QCoreApplication::processEvents(), QFuture::result(), and QObject::tr().
QVector< DataSource::result_t::shared_pointer > TCPClient::results | ( | const QStringList & | list | ) |
retrieve a list of results all with the same id
list | the list of keys who's histograms should be retrieved |
set up the client
serialize the id list
add the serialized list to the dime attachment and sent the request
create the container for the results
when the communication failed return here
create a deserializing object and retrieve all results from it
Definition at line 66 of file jocassview/tcpclient.cpp.
References _server, cass::Serializer::buffer(), data, QVector::push_back(), result(), jocassview::IdList::serialize(), and status.
broadcast a command to all processors in the server
key | The key of the Postprocessor to send the command to |
command | The command to broadcast |
Definition at line 185 of file jocassview/tcpclient.cpp.
References _server, QMessageBox::information(), QFuture::isRunning(), QCoreApplication::processEvents(), and QObject::tr().
|
slot |
change the server to connect to
serverstring | the server name and port as string |
Definition at line 205 of file jocassview/tcpclient.cpp.
References _server.
|
virtual |
return the type of source we are
Implements jocassview::DataSource.
Definition at line 140 of file jocassview/tcpclient.cpp.
|
private |
the server string
Definition at line 116 of file jocassview/tcpclient.h.
Referenced by broadcastCommand(), clearHistogram(), quitServer(), reloadIni(), result(), resultNames(), results(), sendCommandTo(), and setServer().
|
mutableprivate |
the amount of bytes transferred
Definition at line 109 of file jocassview/tcpclient.h.
Referenced by receivedBytes(), result(), and resultNames().