summaryrefslogtreecommitdiffstats
path: root/impl.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'impl.hpp')
-rw-r--r--impl.hpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/impl.hpp b/impl.hpp
index 846d34a..42a5c44 100644
--- a/impl.hpp
+++ b/impl.hpp
@@ -9,10 +9,24 @@ namespace vpd
{
namespace parser
{
+namespace keyword
+{
+
+/** @brief Encoding scheme of a VPD keyword's data */
+enum class Encoding
+{
+ ASCII, /**< data encoded in ascii */
+ RAW, /**< raw data */
+ // Keywords needing custom decoding
+ B1 /**< The keyword B1 needs to be decoded specially */
+};
+
+} // namespace keyword
namespace internal
{
+using KeywordInfo = std::tuple<record::Keyword, keyword::Encoding>;
using OffsetList = std::vector<uint32_t>;
}
@@ -86,6 +100,18 @@ class Impl
*/
void processRecord(std::size_t recordOffset);
+ /** @brief Read keyword data
+ *
+ * @param[in] keyword - OpenPOWER VPD keyword
+ * @param[in] dataLength - Length of data to be read
+ * @param[in] iterator - iterator pointing to a Keyword's data in
+ * the VPD
+ *
+ * @returns keyword data as a string
+ */
+ std::string readKwData(const internal::KeywordInfo& keyword,
+ std::size_t dataLength,
+ Binary::const_iterator iterator);
/** @brief Checks if the VHDR record is present in the VPD */
void checkHeader() const;
OpenPOWER on IntegriCloud