#ifndef OPCUASERVER_H
#define OPCUASERVER_H

#include <QObject>
#include <QThread>

class OpcUaWorker : public QObject {
    Q_OBJECT
public:
    OpcUaWorker();
    ~OpcUaWorker();

public slots:
    void startServer();
    void stopServer();

signals:
    void micToggled(bool enable);
    void torchToggled(bool enable);

private:
    bool m_running;
};

class OpcUaServer : public QObject {
    Q_OBJECT
public:
    explicit OpcUaServer(QObject *parent = nullptr);
    ~OpcUaServer();

    void start();
    void stop();

signals:
    void micToggled(bool enable);
    void torchToggled(bool enable);

private:
    QThread m_workerThread;
    OpcUaWorker* m_worker;
};

#endif // OPCUASERVER_H
