Lines Matching full:std
16 std::shared_ptr<sdbusplus::asio::connection> bus, in TriggerFactory()
17 std::shared_ptr<sdbusplus::asio::object_server> objServer, in TriggerFactory()
19 bus(std::move(bus)), objServer(std::move(objServer)), in TriggerFactory()
24 std::vector<std::shared_ptr<interfaces::Threshold>>& currentThresholds, in updateDiscreteThresholds()
25 const std::string& triggerId, in updateDiscreteThresholds()
26 const std::vector<TriggerAction>& triggerActions, in updateDiscreteThresholds()
27 const std::shared_ptr<std::vector<std::string>>& reportIds, in updateDiscreteThresholds()
29 const std::vector<discrete::LabeledThresholdParam>& newParams) const in updateDiscreteThresholds()
32 std::vector<std::shared_ptr<interfaces::Threshold>> newThresholds; in updateDiscreteThresholds()
36 std::holds_alternative<std::monostate>( in updateDiscreteThresholds()
50 std::get<discrete::LabeledThresholdParam>( in updateDiscreteThresholds()
53 if (auto existing = std::find_if(oldThresholds.begin(), in updateDiscreteThresholds()
86 currentThresholds = std::move(newThresholds); in updateDiscreteThresholds()
90 std::vector<std::shared_ptr<interfaces::Threshold>>& currentThresholds, in updateNumericThresholds()
91 const std::string& triggerId, in updateNumericThresholds()
92 const std::vector<TriggerAction>& triggerActions, in updateNumericThresholds()
93 const std::shared_ptr<std::vector<std::string>>& reportIds, in updateNumericThresholds()
95 const std::vector<numeric::LabeledThresholdParam>& newParams) const in updateNumericThresholds()
98 std::vector<std::shared_ptr<interfaces::Threshold>> newThresholds; in updateNumericThresholds()
106 std::get<numeric::LabeledThresholdParam>( in updateNumericThresholds()
109 if (auto existing = std::find_if(oldThresholds.begin(), in updateNumericThresholds()
121 currentThresholds = std::move(newThresholds); in updateNumericThresholds()
125 std::vector<std::shared_ptr<interfaces::Threshold>>& currentThresholds, in updateThresholds()
126 const std::string& triggerId, in updateThresholds()
127 const std::vector<TriggerAction>& triggerActions, in updateThresholds()
128 const std::shared_ptr<std::vector<std::string>>& reportIds, in updateThresholds()
135 std::get<std::vector<discrete::LabeledThresholdParam>>(newParams); in updateThresholds()
144 std::get<std::vector<numeric::LabeledThresholdParam>>(newParams); in updateThresholds()
153 std::vector<std::shared_ptr<interfaces::Threshold>>& thresholds, in makeDiscreteThreshold()
154 const std::string& triggerId, in makeDiscreteThreshold()
155 const std::vector<TriggerAction>& triggerActions, in makeDiscreteThreshold()
156 const std::shared_ptr<std::vector<std::string>>& reportIds, in makeDiscreteThreshold()
160 std::vector<std::unique_ptr<interfaces::TriggerAction>> actions; in makeDiscreteThreshold()
162 const std::string& thresholdName = thresholdParam.at_label<ts::UserId>(); in makeDiscreteThreshold()
165 const std::string& thresholdValue = in makeDiscreteThreshold()
171 thresholds.emplace_back(std::make_shared<DiscreteThreshold>( in makeDiscreteThreshold()
172 bus->get_io_context(), triggerId, sensors, std::move(actions), in makeDiscreteThreshold()
174 std::make_unique<Clock>())); in makeDiscreteThreshold()
178 std::vector<std::shared_ptr<interfaces::Threshold>>& thresholds, in makeNumericThreshold()
179 const std::string& triggerId, in makeNumericThreshold()
180 const std::vector<TriggerAction>& triggerActions, in makeNumericThreshold()
181 const std::shared_ptr<std::vector<std::string>>& reportIds, in makeNumericThreshold()
185 std::vector<std::unique_ptr<interfaces::TriggerAction>> actions; in makeNumericThreshold()
195 thresholds.emplace_back(std::make_shared<NumericThreshold>( in makeNumericThreshold()
196 bus->get_io_context(), triggerId, sensors, std::move(actions), in makeNumericThreshold()
197 dwellTime, direction, thresholdValue, type, std::make_unique<Clock>())); in makeNumericThreshold()
201 std::vector<std::shared_ptr<interfaces::Threshold>>& thresholds, in makeOnChangeThreshold()
202 const std::string& triggerId, in makeOnChangeThreshold()
203 const std::vector<TriggerAction>& triggerActions, in makeOnChangeThreshold()
204 const std::shared_ptr<std::vector<std::string>>& reportIds, in makeOnChangeThreshold()
207 std::vector<std::unique_ptr<interfaces::TriggerAction>> actions; in makeOnChangeThreshold()
212 thresholds.emplace_back(std::make_shared<OnChangeThreshold>( in makeOnChangeThreshold()
213 triggerId, sensors, std::move(actions), std::make_unique<Clock>())); in makeOnChangeThreshold()
216 std::unique_ptr<interfaces::Trigger> TriggerFactory::make( in make()
217 const std::string& idIn, const std::string& name, in make()
218 const std::vector<std::string>& triggerActionsIn, in make()
219 const std::vector<std::string>& reportIdsIn, in make()
223 const std::vector<LabeledSensorInfo>& labeledSensorsInfo) const in make()
230 std::vector<std::shared_ptr<interfaces::Threshold>> thresholds; in make()
231 auto id = std::make_unique<const std::string>(idIn); in make()
233 auto reportIds = std::make_shared<std::vector<std::string>>(reportIdsIn); in make()
238 return std::make_unique<Trigger>( in make()
239 bus->get_io_context(), objServer, std::move(id), name, triggerActions, in make()
240 reportIds, std::move(thresholds), triggerManager, triggerStorage, *this, in make()
245 const std::vector<LabeledSensorInfo>& labeledSensorsInfo) const in getSensors()
254 const std::vector<LabeledSensorInfo>& labeledSensorsInfo) const in updateSensors()
261 auto existing = std::find_if(oldSensors.begin(), oldSensors.end(), in updateSensors()
282 currentSensors = std::move(newSensors); in updateSensors()
285 std::vector<LabeledSensorInfo> TriggerFactory::getLabeledSensorsInfo( in getLabeledSensorsInfo()
296 std::vector<LabeledSensorInfo> TriggerFactory::getLabeledSensorsInfo( in getLabeledSensorsInfo()
307 std::vector<LabeledSensorInfo> TriggerFactory::parseSensorTree( in parseSensorTree()
308 const std::vector<utils::SensorTree>& tree, const SensorsInfo& sensorsInfo) in parseSensorTree()
312 auto found = std::find_if( in parseSensorTree()
321 throw std::runtime_error("Not found"); in parseSensorTree()