Projekt

Obecné

Profil

Stáhnout (721 Bajtů) Statistiky
| Větev: | Tag: | Revize:
1
#ifndef CURVEDATASERVER_H
2
#define CURVEDATASERVER_H
3

    
4
#include <QObject>
5
#include <QTcpServer>
6
#include <QTcpSocket>
7

    
8
class CurveDataServer : QObject
9
{
10
    Q_OBJECT
11

    
12
public:
13
    CurveDataServer();
14
    ~CurveDataServer();
15
    void sendApplicatorPoint(float x, float y, float z);
16

    
17
public slots:
18
    void onNewConnection();
19
    void onSocketStateChanged(QAbstractSocket::SocketState socketState);
20
    void onReadyRead();
21

    
22
private:
23
    QByteArray *createMessageId(int sizeId, int typId);
24
    //QByteArray *appendFloatToMessage(QByteArray *message, float f);
25
    QByteArray *putFloatIntoMessage(QByteArray *message, int index, float f);
26

    
27
    QTcpServer _server;
28
    QList<QTcpSocket*> _sockets;
29
};
30

    
31
#endif // CURVEDATASERVER_H
(3-3/19)