Aatir | 186ce8c | 2019-10-20 15:13:39 -0500 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <ctype.h> |
| 4 | #include <stdio.h> |
| 5 | |
| 6 | #include <fstream> |
| 7 | #include <iomanip> |
| 8 | #include <iostream> |
| 9 | #include <string> |
| 10 | #include <vector> |
| 11 | |
| 12 | namespace openpower |
| 13 | { |
| 14 | namespace pels |
| 15 | { |
| 16 | |
| 17 | /** |
| 18 | * @brief escape json - use it for PEL hex dumps. |
| 19 | * @param[in] std::string - the unescaped JSON as a string literal |
| 20 | * @return std::string - escaped JSON string literal |
| 21 | */ |
| 22 | std::string escapeJSON(const std::string& input); |
| 23 | |
| 24 | /** |
| 25 | * @brief get hex dump for PEL section in json format. |
| 26 | * @param[in] const void* - Raw PEL data |
| 27 | * @param[i] size_t - size of Raw PEL |
| 28 | * @return char * - the Hex dump |
| 29 | */ |
| 30 | char* dumpHex(const void* data, size_t size); |
| 31 | |
| 32 | } // namespace pels |
| 33 | } // namespace openpower |