Ben Tyner | 188f109 | 2021-02-01 09:33:06 -0600 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <sdbusplus/bus.hpp> |
| 4 | #include <util/ffdc_file.hpp> |
| 5 | |
| 6 | #include <string> |
| 7 | |
| 8 | namespace attn |
| 9 | { |
| 10 | |
| 11 | /** |
Ben Tyner | 5c5db65 | 2021-02-22 18:22:35 -0600 | [diff] [blame] | 12 | * Create a dbus method |
| 13 | * |
| 14 | * Find the dbus service associated with the dbus object path and create |
| 15 | * a dbus method for calling the specified dbus interface and function. |
| 16 | * |
| 17 | * @param i_path - dbus object path |
| 18 | * @param i_interface - dbus method interface |
| 19 | * @param i_function - dbus interface function |
| 20 | * @param o_method - method that is created |
Ben Tyner | 5c5db65 | 2021-02-22 18:22:35 -0600 | [diff] [blame] | 21 | * @return non-zero if error |
| 22 | * |
| 23 | **/ |
| 24 | int dbusMethod(const std::string& i_path, const std::string& i_interface, |
Patrick Williams | e212fb0 | 2022-07-22 19:26:57 -0500 | [diff] [blame] | 25 | const std::string& i_function, sdbusplus::message_t& o_method); |
Ben Tyner | 5c5db65 | 2021-02-22 18:22:35 -0600 | [diff] [blame] | 26 | |
| 27 | /** |
Ben Tyner | 188f109 | 2021-02-01 09:33:06 -0600 | [diff] [blame] | 28 | * Create a PEL from raw PEL data |
| 29 | * |
| 30 | * Create a PEL based on the pel defined in the data buffer specified. |
| 31 | * |
| 32 | * @param i_buffer - buffer containing a raw PEL |
| 33 | */ |
| 34 | void createPelRaw(const std::vector<uint8_t>& i_buffer); |
| 35 | |
| 36 | /** |
| 37 | * Get file descriptor of exisitng PEL |
| 38 | * |
| 39 | * The backend logging code will search for a PEL having the provided pel id |
| 40 | * and return a file descriptor of a file containing this pel in raw form. |
| 41 | * |
| 42 | * @param i_pelid - the PEL ID |
| 43 | * @return file descriptor or -1 if error |
| 44 | */ |
| 45 | int getPel(const uint32_t i_pelId); |
| 46 | |
Ben Tyner | 188f109 | 2021-02-01 09:33:06 -0600 | [diff] [blame] | 47 | } // namespace attn |