| James Feist | 7136a5a | 2018-07-19 09:52:05 -0700 | [diff] [blame] | 1 | /* | 
|  | 2 | // Copyright (c) 2018 Intel Corporation | 
|  | 3 | // | 
|  | 4 | // Licensed under the Apache License, Version 2.0 (the "License"); | 
|  | 5 | // you may not use this file except in compliance with the License. | 
|  | 6 | // You may obtain a copy of the License at | 
|  | 7 | // | 
|  | 8 | //      http://www.apache.org/licenses/LICENSE-2.0 | 
|  | 9 | // | 
|  | 10 | // Unless required by applicable law or agreed to in writing, software | 
|  | 11 | // distributed under the License is distributed on an "AS IS" BASIS, | 
|  | 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
|  | 13 | // See the License for the specific language governing permissions and | 
|  | 14 | // limitations under the License. | 
|  | 15 | */ | 
| James Feist | 7136a5a | 2018-07-19 09:52:05 -0700 | [diff] [blame] | 16 | #pragma once | 
| Patrick Venture | 7e952d9 | 2020-10-05 15:58:52 -0700 | [diff] [blame^] | 17 |  | 
| Patrick Venture | 0771659 | 2018-10-14 11:46:40 -0700 | [diff] [blame] | 18 | #include "conf.hpp" | 
|  | 19 |  | 
| Patrick Venture | 7f837e0 | 2020-09-10 15:07:37 -0700 | [diff] [blame] | 20 | #include <boost/asio/steady_timer.hpp> | 
| James Feist | 7136a5a | 2018-07-19 09:52:05 -0700 | [diff] [blame] | 21 | #include <sdbusplus/bus.hpp> | 
|  | 22 |  | 
| Patrick Venture | 7e952d9 | 2020-10-05 15:58:52 -0700 | [diff] [blame^] | 23 | #include <cstdint> | 
|  | 24 | #include <string> | 
|  | 25 | #include <unordered_map> | 
|  | 26 | #include <variant> | 
|  | 27 | #include <vector> | 
|  | 28 |  | 
|  | 29 | using DbusVariantType = | 
|  | 30 | std::variant<uint64_t, int64_t, double, std::string, | 
|  | 31 | std::vector<std::string>, std::vector<double>>; | 
|  | 32 |  | 
|  | 33 | using ManagedObjectType = std::unordered_map< | 
|  | 34 | sdbusplus::message::object_path, | 
|  | 35 | std::unordered_map<std::string, | 
|  | 36 | std::unordered_map<std::string, DbusVariantType>>>; | 
|  | 37 |  | 
| Patrick Venture | a076487 | 2020-08-08 07:48:43 -0700 | [diff] [blame] | 38 | namespace pid_control | 
|  | 39 | { | 
| James Feist | 7136a5a | 2018-07-19 09:52:05 -0700 | [diff] [blame] | 40 | namespace dbus_configuration | 
|  | 41 | { | 
| James Feist | 1fe0895 | 2019-05-07 09:17:16 -0700 | [diff] [blame] | 42 | bool init(sdbusplus::bus::bus& bus, boost::asio::steady_timer& timer); | 
| Patrick Venture | 0771659 | 2018-10-14 11:46:40 -0700 | [diff] [blame] | 43 | } // namespace dbus_configuration | 
| Patrick Venture | a076487 | 2020-08-08 07:48:43 -0700 | [diff] [blame] | 44 | } // namespace pid_control |