blob: aaa8b706d0300b8568ff3836d0b0a07efb7990a1 [file] [log] [blame]
Jonathan Doman94c94bf2020-10-05 23:25:45 -07001// Copyright (c) 2020 Intel Corporation
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14#pragma once
15
16#include <boost/asio/io_context.hpp>
17#include <sdbusplus/asio/connection.hpp>
18
19namespace cpu_info
20{
21namespace sst
22{
23
24/**
25 * Retrieve all SST configuration info for all discoverable CPUs, and publish
26 * the info on new D-Bus objects on the given bus connection.
27 *
28 * This function may block until all discovery is completed (many seconds), or
29 * it may schedule the work to be done at a later time (on the given ASIO
30 * context) if CPUs are not currently available, and may also schedule periodic
31 * work to be done after initial discovery is completed.
32 *
33 * @param[in,out] ioc ASIO IO context/service
34 * @param[in,out] conn D-Bus ASIO connection.
35 */
36void init(boost::asio::io_context& ioc,
37 const std::shared_ptr<sdbusplus::asio::connection>& conn);
38
39} // namespace sst
40} // namespace cpu_info