//
// Created by Ht on 2021/2/18.
//

#ifndef LIBDEVCPP_MGNODEMANAGERSERVICE_H
#define LIBDEVCPP_MGNODEMANAGERSERVICE_H

#include <mgbus/MgBusService.h>
#include "QNodeServer.h"

namespace jedge {

    /**
     *  用于管理Mbgus的
     *
     *
     *
     */

    class MgNodeManagerService :
            public MgBusService {
    protected:
        QNodeServer& mSocketServer;
    public:
        explicit MgNodeManagerService(jedge::MgBusHolder& opr,const std::string &name,
                const qlibc::QData &config, jedge::QNodeServer& server);

        void preparePattern() override;

        bool listNodes(qlibc::QData &message, qlibc::QData *response);

        bool postNodeMessage(qlibc::QData &message, qlibc::QData *response);
    };
}

#endif //LIBDEVCPP_MGNODEMANAGERSERVICE_H
