#pragma once

#include <QObject>


class CoreService : public QObject {
    Q_OBJECT

public:
    static CoreService* instance();
    enum Role {
        CoreRouter, // 核心路由器，负责设备发现、连接管理和数据转发
        Collector, // 数据收集器，负责从设备收集数据
        CollectorSerial, // 串口数据收集器
        CollectorCan, // CAN总线数据收集器
        SqlServer, // SQL服务器，负责存储设备数据
    };

    bool initialize();
    void shutdown();
    bool isInitialized() const;

private:
    explicit CoreService(QObject* parent = nullptr);
    ~CoreService();

    CoreService(const CoreService&) = delete;
    CoreService& operator=(const CoreService&) = delete;

    bool m_initialized = false;
};
