#pragma once #include "interfaces/report_manager.hpp" #include "interfaces/sensor.hpp" #include "interfaces/trigger_factory.hpp" #include "sensor_cache.hpp" #include class TriggerFactory : public interfaces::TriggerFactory { public: TriggerFactory(std::shared_ptr bus, std::shared_ptr objServer, SensorCache& sensorCache, interfaces::ReportManager& reportManager); std::unique_ptr make(const std::string& id, const std::string& name, const std::vector& triggerActions, const std::vector& reportIds, interfaces::TriggerManager& triggerManager, interfaces::JsonStorage& triggerStorage, const LabeledTriggerThresholdParams& labeledThresholdParams, const std::vector& labeledSensorsinfo) const override; std::vector getLabeledSensorsInfo(boost::asio::yield_context& yield, const SensorsInfo& sensorsInfo) const override; private: std::shared_ptr bus; std::shared_ptr objServer; SensorCache& sensorCache; interfaces::ReportManager& reportManager; std::pair> getSensors( const std::vector& labeledSensorsInfo) const; };