Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 1 | #include "trigger_actions.hpp" |
| 2 | |
Krzysztof Grobelny | e6d4887 | 2022-02-08 13:41:30 +0100 | [diff] [blame] | 3 | #include "messages/update_report_ind.hpp" |
Szymon Dompke | f670b02 | 2022-03-16 19:21:11 +0100 | [diff] [blame] | 4 | #include "types/trigger_types.hpp" |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 5 | #include "utils/clock.hpp" |
Krzysztof Grobelny | e6d4887 | 2022-02-08 13:41:30 +0100 | [diff] [blame] | 6 | #include "utils/messanger.hpp" |
Krzysztof Grobelny | cff70c1 | 2022-10-27 07:16:08 +0000 | [diff] [blame] | 7 | #include "utils/to_short_enum.hpp" |
Krzysztof Grobelny | e6d4887 | 2022-02-08 13:41:30 +0100 | [diff] [blame] | 8 | |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 9 | #include <phosphor-logging/log.hpp> |
| 10 | |
| 11 | #include <ctime> |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 12 | #include <iomanip> |
| 13 | #include <sstream> |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 14 | |
| 15 | namespace action |
| 16 | { |
| 17 | |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 18 | namespace |
| 19 | { |
Krzysztof Grobelny | 51f0fd5 | 2021-12-28 16:32:08 +0100 | [diff] [blame] | 20 | std::string timestampToString(Milliseconds timestamp) |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 21 | { |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 22 | std::time_t t = static_cast<time_t>( |
| 23 | std::chrono::duration_cast<std::chrono::seconds>(timestamp).count()); |
| 24 | std::stringstream ss; |
| 25 | ss << std::put_time(std::gmtime(&t), "%FT%T.") << std::setw(3) |
| 26 | << std::setfill('0') << timestamp.count() % 1000 << 'Z'; |
| 27 | return ss.str(); |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 28 | } |
| 29 | } // namespace |
| 30 | |
| 31 | namespace numeric |
| 32 | { |
| 33 | |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 34 | static const char* getDirection(double value, double threshold) |
| 35 | { |
| 36 | if (value < threshold) |
| 37 | { |
| 38 | return "decreasing"; |
| 39 | } |
| 40 | if (value > threshold) |
| 41 | { |
| 42 | return "increasing"; |
| 43 | } |
| 44 | throw std::runtime_error("Invalid value"); |
| 45 | } |
| 46 | |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 47 | void LogToJournal::commit(const std::string& triggerId, |
| 48 | const ThresholdName thresholdNameInIn, |
| 49 | const std::string& sensorName, |
| 50 | const Milliseconds timestamp, |
| 51 | const TriggerValue triggerValue) |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 52 | { |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 53 | double value = std::get<double>(triggerValue); |
| 54 | std::string thresholdName = ::numeric::typeToString(type); |
| 55 | auto direction = getDirection(value, threshold); |
| 56 | |
Krzysztof Grobelny | cff70c1 | 2022-10-27 07:16:08 +0000 | [diff] [blame] | 57 | std::string msg = |
| 58 | "Numeric threshold '" + std::string(utils::toShortEnum(thresholdName)) + |
| 59 | "' of trigger '" + triggerId + "' is crossed on sensor " + sensorName + |
| 60 | ", recorded value: " + std::to_string(value) + |
| 61 | ", crossing direction: " + std::string(utils::toShortEnum(direction)) + |
| 62 | ", timestamp: " + timestampToString(timestamp); |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 63 | |
| 64 | phosphor::logging::log<phosphor::logging::level::INFO>(msg.c_str()); |
| 65 | } |
| 66 | |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 67 | const char* LogToRedfishEventLog::getRedfishMessageId() const |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 68 | { |
| 69 | switch (type) |
| 70 | { |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 71 | case ::numeric::Type::upperCritical: |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 72 | return redfish_message_ids::TriggerNumericCritical; |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 73 | case ::numeric::Type::lowerCritical: |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 74 | return redfish_message_ids::TriggerNumericCritical; |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 75 | case ::numeric::Type::upperWarning: |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 76 | return redfish_message_ids::TriggerNumericWarning; |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 77 | case ::numeric::Type::lowerWarning: |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 78 | return redfish_message_ids::TriggerNumericWarning; |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 79 | } |
| 80 | throw std::runtime_error("Invalid type"); |
| 81 | } |
| 82 | |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 83 | void LogToRedfishEventLog::commit(const std::string& triggerId, |
| 84 | const ThresholdName thresholdNameInIn, |
| 85 | const std::string& sensorName, |
| 86 | const Milliseconds timestamp, |
| 87 | const TriggerValue triggerValue) |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 88 | { |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 89 | double value = std::get<double>(triggerValue); |
| 90 | std::string thresholdName = ::numeric::typeToString(type); |
| 91 | auto direction = getDirection(value, threshold); |
| 92 | auto timestampStr = timestampToString(timestamp); |
| 93 | |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 94 | phosphor::logging::log<phosphor::logging::level::INFO>( |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 95 | "Logging numeric trigger action to Redfish Event Log.", |
| 96 | phosphor::logging::entry("REDFISH_MESSAGE_ID=%s", |
| 97 | getRedfishMessageId()), |
| 98 | phosphor::logging::entry("REDFISH_MESSAGE_ARGS=%s,%s,%s,%f,%s,%s", |
| 99 | thresholdName.c_str(), triggerId.c_str(), |
| 100 | sensorName.c_str(), value, direction, |
| 101 | timestampStr.c_str())); |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 102 | } |
| 103 | |
Szymon Dompke | 2001301 | 2021-07-23 09:54:20 +0200 | [diff] [blame] | 104 | void fillActions( |
| 105 | std::vector<std::unique_ptr<interfaces::TriggerAction>>& actionsIf, |
| 106 | const std::vector<TriggerAction>& ActionsEnum, ::numeric::Type type, |
Krzysztof Grobelny | e6d4887 | 2022-02-08 13:41:30 +0100 | [diff] [blame] | 107 | double thresholdValue, boost::asio::io_context& ioc, |
Szymon Dompke | 94f71c5 | 2021-12-10 07:16:33 +0100 | [diff] [blame] | 108 | const std::shared_ptr<std::vector<std::string>>& reportIds) |
Szymon Dompke | 2001301 | 2021-07-23 09:54:20 +0200 | [diff] [blame] | 109 | { |
| 110 | actionsIf.reserve(ActionsEnum.size()); |
| 111 | for (auto actionType : ActionsEnum) |
| 112 | { |
| 113 | switch (actionType) |
| 114 | { |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 115 | case TriggerAction::LogToJournal: |
Szymon Dompke | 2001301 | 2021-07-23 09:54:20 +0200 | [diff] [blame] | 116 | { |
| 117 | actionsIf.emplace_back( |
| 118 | std::make_unique<LogToJournal>(type, thresholdValue)); |
| 119 | break; |
| 120 | } |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 121 | case TriggerAction::LogToRedfishEventLog: |
Szymon Dompke | 2001301 | 2021-07-23 09:54:20 +0200 | [diff] [blame] | 122 | { |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 123 | actionsIf.emplace_back(std::make_unique<LogToRedfishEventLog>( |
| 124 | type, thresholdValue)); |
Szymon Dompke | 2001301 | 2021-07-23 09:54:20 +0200 | [diff] [blame] | 125 | break; |
| 126 | } |
| 127 | case TriggerAction::UpdateReport: |
| 128 | { |
| 129 | actionsIf.emplace_back( |
Krzysztof Grobelny | e6d4887 | 2022-02-08 13:41:30 +0100 | [diff] [blame] | 130 | std::make_unique<UpdateReport>(ioc, reportIds)); |
Szymon Dompke | 2001301 | 2021-07-23 09:54:20 +0200 | [diff] [blame] | 131 | break; |
| 132 | } |
| 133 | } |
| 134 | } |
| 135 | } |
| 136 | |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 137 | } // namespace numeric |
| 138 | |
| 139 | namespace discrete |
| 140 | { |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 141 | |
| 142 | void LogToJournal::commit(const std::string& triggerId, |
| 143 | const ThresholdName thresholdNameIn, |
| 144 | const std::string& sensorName, |
| 145 | const Milliseconds timestamp, |
| 146 | const TriggerValue triggerValue) |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 147 | { |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 148 | auto value = std::get<std::string>(triggerValue); |
| 149 | |
Krzysztof Grobelny | cff70c1 | 2022-10-27 07:16:08 +0000 | [diff] [blame] | 150 | std::string msg = |
| 151 | "Discrete condition '" + thresholdNameIn->get() + "' of trigger '" + |
| 152 | triggerId + "' is met on sensor " + sensorName + |
| 153 | ", recorded value: " + value + ", severity: " + |
| 154 | std::string(utils::toShortEnum(utils::enumToString(severity))) + |
| 155 | ", timestamp: " + timestampToString(timestamp); |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 156 | |
| 157 | phosphor::logging::log<phosphor::logging::level::INFO>(msg.c_str()); |
| 158 | } |
| 159 | |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 160 | const char* LogToRedfishEventLog::getRedfishMessageId() const |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 161 | { |
| 162 | switch (severity) |
| 163 | { |
| 164 | case ::discrete::Severity::ok: |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 165 | return redfish_message_ids::TriggerDiscreteOK; |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 166 | case ::discrete::Severity::warning: |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 167 | return redfish_message_ids::TriggerDiscreteWarning; |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 168 | case ::discrete::Severity::critical: |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 169 | return redfish_message_ids::TriggerDiscreteCritical; |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 170 | } |
| 171 | throw std::runtime_error("Invalid severity"); |
| 172 | } |
| 173 | |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 174 | void LogToRedfishEventLog::commit(const std::string& triggerId, |
| 175 | const ThresholdName thresholdNameIn, |
| 176 | const std::string& sensorName, |
| 177 | const Milliseconds timestamp, |
| 178 | const TriggerValue triggerValue) |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 179 | { |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 180 | auto value = std::get<std::string>(triggerValue); |
| 181 | auto timestampStr = timestampToString(timestamp); |
| 182 | |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 183 | phosphor::logging::log<phosphor::logging::level::INFO>( |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 184 | "Logging discrete trigger action to Redfish Event Log.", |
| 185 | phosphor::logging::entry("REDFISH_MESSAGE_ID=%s", |
| 186 | getRedfishMessageId()), |
| 187 | phosphor::logging::entry("REDFISH_MESSAGE_ARGS=%s,%s,%s,%s,%s", |
| 188 | thresholdNameIn->get().c_str(), |
| 189 | triggerId.c_str(), sensorName.c_str(), |
| 190 | value.c_str(), timestampStr.c_str())); |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 191 | } |
| 192 | |
Szymon Dompke | 2001301 | 2021-07-23 09:54:20 +0200 | [diff] [blame] | 193 | void fillActions( |
| 194 | std::vector<std::unique_ptr<interfaces::TriggerAction>>& actionsIf, |
| 195 | const std::vector<TriggerAction>& ActionsEnum, |
Krzysztof Grobelny | e6d4887 | 2022-02-08 13:41:30 +0100 | [diff] [blame] | 196 | ::discrete::Severity severity, boost::asio::io_context& ioc, |
Szymon Dompke | 94f71c5 | 2021-12-10 07:16:33 +0100 | [diff] [blame] | 197 | const std::shared_ptr<std::vector<std::string>>& reportIds) |
Szymon Dompke | 2001301 | 2021-07-23 09:54:20 +0200 | [diff] [blame] | 198 | { |
| 199 | actionsIf.reserve(ActionsEnum.size()); |
| 200 | for (auto actionType : ActionsEnum) |
| 201 | { |
| 202 | switch (actionType) |
| 203 | { |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 204 | case TriggerAction::LogToJournal: |
Szymon Dompke | 2001301 | 2021-07-23 09:54:20 +0200 | [diff] [blame] | 205 | { |
| 206 | actionsIf.emplace_back( |
| 207 | std::make_unique<LogToJournal>(severity)); |
| 208 | break; |
| 209 | } |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 210 | case TriggerAction::LogToRedfishEventLog: |
Szymon Dompke | 2001301 | 2021-07-23 09:54:20 +0200 | [diff] [blame] | 211 | { |
| 212 | actionsIf.emplace_back( |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 213 | std::make_unique<LogToRedfishEventLog>(severity)); |
Szymon Dompke | 2001301 | 2021-07-23 09:54:20 +0200 | [diff] [blame] | 214 | break; |
| 215 | } |
| 216 | case TriggerAction::UpdateReport: |
| 217 | { |
| 218 | actionsIf.emplace_back( |
Krzysztof Grobelny | e6d4887 | 2022-02-08 13:41:30 +0100 | [diff] [blame] | 219 | std::make_unique<UpdateReport>(ioc, reportIds)); |
Szymon Dompke | 2001301 | 2021-07-23 09:54:20 +0200 | [diff] [blame] | 220 | break; |
| 221 | } |
| 222 | } |
| 223 | } |
| 224 | } |
| 225 | |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 226 | namespace onChange |
| 227 | { |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 228 | void LogToJournal::commit(const std::string& triggerId, |
| 229 | const ThresholdName thresholdNameIn, |
| 230 | const std::string& sensorName, |
| 231 | const Milliseconds timestamp, |
| 232 | const TriggerValue triggerValue) |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 233 | { |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 234 | auto value = triggerValueToString(triggerValue); |
| 235 | std::string msg = "Discrete condition 'OnChange' of trigger '" + triggerId + |
| 236 | "' is met on sensor: " + sensorName + |
| 237 | ", recorded value: " + value + |
| 238 | ", timestamp: " + timestampToString(timestamp); |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 239 | |
| 240 | phosphor::logging::log<phosphor::logging::level::INFO>(msg.c_str()); |
| 241 | } |
| 242 | |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 243 | void LogToRedfishEventLog::commit(const std::string& triggerId, |
| 244 | const ThresholdName thresholdNameIn, |
| 245 | const std::string& sensorName, |
| 246 | const Milliseconds timestamp, |
| 247 | const TriggerValue triggerValue) |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 248 | { |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 249 | auto value = triggerValueToString(triggerValue); |
| 250 | auto timestampStr = timestampToString(timestamp); |
| 251 | |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 252 | phosphor::logging::log<phosphor::logging::level::INFO>( |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 253 | "Logging onChange discrete trigger action to Redfish Event Log.", |
| 254 | phosphor::logging::entry("REDFISH_MESSAGE_ID=%s", |
| 255 | redfish_message_ids::TriggerDiscreteOK), |
| 256 | phosphor::logging::entry("REDFISH_MESSAGE_ARGS=%s,%s,%s,%s,%s", |
| 257 | "OnChange", triggerId.c_str(), |
| 258 | sensorName.c_str(), value.c_str(), |
| 259 | timestampStr.c_str())); |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 260 | } |
Szymon Dompke | 2001301 | 2021-07-23 09:54:20 +0200 | [diff] [blame] | 261 | |
| 262 | void fillActions( |
| 263 | std::vector<std::unique_ptr<interfaces::TriggerAction>>& actionsIf, |
Krzysztof Grobelny | e6d4887 | 2022-02-08 13:41:30 +0100 | [diff] [blame] | 264 | const std::vector<TriggerAction>& ActionsEnum, boost::asio::io_context& ioc, |
Szymon Dompke | 94f71c5 | 2021-12-10 07:16:33 +0100 | [diff] [blame] | 265 | const std::shared_ptr<std::vector<std::string>>& reportIds) |
Szymon Dompke | 2001301 | 2021-07-23 09:54:20 +0200 | [diff] [blame] | 266 | { |
| 267 | actionsIf.reserve(ActionsEnum.size()); |
| 268 | for (auto actionType : ActionsEnum) |
| 269 | { |
| 270 | switch (actionType) |
| 271 | { |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 272 | case TriggerAction::LogToJournal: |
Szymon Dompke | 2001301 | 2021-07-23 09:54:20 +0200 | [diff] [blame] | 273 | { |
| 274 | actionsIf.emplace_back(std::make_unique<LogToJournal>()); |
| 275 | break; |
| 276 | } |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 277 | case TriggerAction::LogToRedfishEventLog: |
Szymon Dompke | 2001301 | 2021-07-23 09:54:20 +0200 | [diff] [blame] | 278 | { |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 279 | actionsIf.emplace_back( |
| 280 | std::make_unique<LogToRedfishEventLog>()); |
Szymon Dompke | 2001301 | 2021-07-23 09:54:20 +0200 | [diff] [blame] | 281 | break; |
| 282 | } |
| 283 | case TriggerAction::UpdateReport: |
| 284 | { |
| 285 | actionsIf.emplace_back( |
Krzysztof Grobelny | e6d4887 | 2022-02-08 13:41:30 +0100 | [diff] [blame] | 286 | std::make_unique<UpdateReport>(ioc, reportIds)); |
Szymon Dompke | 2001301 | 2021-07-23 09:54:20 +0200 | [diff] [blame] | 287 | break; |
| 288 | } |
| 289 | } |
| 290 | } |
| 291 | } |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 292 | } // namespace onChange |
| 293 | } // namespace discrete |
| 294 | |
Szymon Dompke | b7b7e1b | 2022-05-19 10:15:48 +0200 | [diff] [blame] | 295 | void UpdateReport::commit(const std::string& triggerId, |
| 296 | const ThresholdName thresholdNameIn, |
| 297 | const std::string& sensorName, |
| 298 | const Milliseconds timestamp, |
| 299 | const TriggerValue triggerValue) |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 300 | { |
Krzysztof Grobelny | e6d4887 | 2022-02-08 13:41:30 +0100 | [diff] [blame] | 301 | if (reportIds->empty()) |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 302 | { |
Krzysztof Grobelny | e6d4887 | 2022-02-08 13:41:30 +0100 | [diff] [blame] | 303 | return; |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 304 | } |
Krzysztof Grobelny | e6d4887 | 2022-02-08 13:41:30 +0100 | [diff] [blame] | 305 | |
| 306 | utils::Messanger messanger(ioc); |
| 307 | messanger.send(messages::UpdateReportInd{*reportIds}); |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 308 | } |
| 309 | } // namespace action |