Matt Spinler | acb7c10 | 2020-01-10 13:49:22 -0600 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Matt Spinler | 81bc561 | 2023-06-01 16:48:19 -0500 | [diff] [blame] | 3 | #include <cstdint> |
Matt Spinler | acb7c10 | 2020-01-10 13:49:22 -0600 | [diff] [blame] | 4 | #include <optional> |
| 5 | #include <string> |
| 6 | #include <vector> |
| 7 | |
| 8 | namespace openpower::pels::user_data |
| 9 | { |
| 10 | |
| 11 | /** |
| 12 | * @brief Returns the UserData contents as a formatted JSON string. |
| 13 | * |
| 14 | * @param[in] componentID - The comp ID from the UserData section header |
| 15 | * @param[in] subType - The subtype from the UserData section header |
| 16 | * @param[in] version - The version from the UserData section header |
| 17 | * @param[in] data - The section data |
Harisuddin Mohamed Isa | f67bafd | 2020-07-06 17:51:21 +0800 | [diff] [blame] | 18 | * @param[in] creatorID - Creator Subsystem ID from Private Header |
Harisuddin Mohamed Isa | 3fdcd4e | 2020-08-26 11:56:42 +0800 | [diff] [blame] | 19 | * @param[in] plugins - Vector of strings of plugins found in filesystem |
Matt Spinler | acb7c10 | 2020-01-10 13:49:22 -0600 | [diff] [blame] | 20 | * @return std::optional<std::string> - The JSON string if it could be created, |
| 21 | * else std::nullopt. |
| 22 | */ |
Patrick Williams | 075c792 | 2024-08-16 15:19:49 -0400 | [diff] [blame] | 23 | std::optional<std::string> |
| 24 | getJSON(uint16_t componentID, uint8_t subType, uint8_t version, |
| 25 | const std::vector<uint8_t>& data, uint8_t creatorID, |
| 26 | const std::vector<std::string>& plugins); |
Matt Spinler | acb7c10 | 2020-01-10 13:49:22 -0600 | [diff] [blame] | 27 | |
| 28 | } // namespace openpower::pels::user_data |