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