//
// Created by Ht on 2021/10/14.
//

#ifndef INC_0_LIBDEVCPP_CPAD_MGTRIGGERSERVICE_H
#define INC_0_LIBDEVCPP_CPAD_MGTRIGGERSERVICE_H

#include <mgbus/MgBusService.h>
#include <mgbus/MgTriggerManager.h>

namespace jedge {

    class JE_API MgbusModuleTriggerService :
            public MgService, public MgTriggerManager {

    public:
        explicit MgbusModuleTriggerService(jedge::MgBusHolder &opr, const std::string &name, const qlibc::QData &config);
        ~MgbusModuleTriggerService();

        void appendEventAppendixInfo(qlibc::QData &event_data) override;

        void onServiceStart(const qlibc::QData &config) override;

        void onServiceStop() override;

        void preparePattern() override;

    protected:
        void prepareEvents() override;
    };

}
#endif //INC_0_LIBDEVCPP_CPAD_MGTRIGGERSERVICE_H
