![]() |
Fotobot
Get data from your photovoltaic plant
|
Public Member Functions | |
QTcpSocket * | socket (int line) |
Returns socket associated with line. More... | |
void | addLine (int line, const QString &hostname, int port) |
Adds new line to list. More... | |
void | open (int line) |
Opens socket for line. More... | |
Static Public Member Functions | |
static SocketList * | socketList (QObject *parent=NULL) |
Private Member Functions | |
SocketList (QObject *parent) | |
Private Attributes | |
QHash< int, QTcpSocket * > | m_line_socket |
QHash< int, QString > | m_line_hostname |
QHash< int, int > | m_line_port |
QThread * | m_parentThread |
Static Private Attributes | |
static SocketList * | m_socketList = NULL |
Definition at line 19 of file socketlist.h.
void SocketList::addLine | ( | int | line, |
const QString & | hostname, | ||
int | port | ||
) |
Adds new line to list.
Socket is created and opened later since it runs in different thread
Definition at line 25 of file socketlist.cpp.
void SocketList::open | ( | int | line | ) |
Opens socket for line.
QString | when en arror occured. Application can call open(int) again to recover from error |
If the line does not exist, the application fails
Definition at line 37 of file socketlist.cpp.
QTcpSocket * SocketList::socket | ( | int | line | ) |
Returns socket associated with line.
QString | when an error occured. Application should call open(int) to recover from error |
Definition at line 67 of file socketlist.cpp.