Remove openpower-libhei subproject dependency

Statically link to openpower-libhei rather than building it as a
subproject.

Signed-off-by: Ben Tyner <ben.tyner@ibm.com>
Change-Id: Ifc1be912ef484c0c7a1157ac0c9b90a62e03d9c7
diff --git a/analyzer/analyzer_main.cpp b/analyzer/analyzer_main.cpp
index f697b4b..13da175 100644
--- a/analyzer/analyzer_main.cpp
+++ b/analyzer/analyzer_main.cpp
@@ -3,10 +3,23 @@
 namespace analyzer
 {
 
-/** @brief Analyze and isolate hardware errors */
+/** Analyze error condition using the hardware error isolator */
 void analyzeHardware()
 {
-    return;
+    using namespace libhei;
+
+    std::vector<Chip> chipList; // data to isolator
+    IsolationData isoData{};    // data from isolator
+
+    // TEMP CODE - start
+    initialize(nullptr, 0);
+
+    chipList.emplace_back(Chip{"proc", static_cast<ChipType_t>(0xdeadbeef)});
+
+    isolate(chipList, isoData);
+
+    uninitialize();
+    // TEMP CODE - end
 }
 
 } // namespace analyzer
diff --git a/analyzer/hei_user_defines.hpp b/analyzer/hei_user_defines.hpp
deleted file mode 100644
index e45e18d..0000000
--- a/analyzer/hei_user_defines.hpp
+++ /dev/null
@@ -1,25 +0,0 @@
-#pragma once
-
-/**
- * @file hei_user_defines.hpp
- * @brief The purpose of this file is to provide defines that are required by
- *        the hardware error isolator library (libhei)
- */
-
-#include <assert.h>
-#include <inttypes.h>
-#include <stdio.h>
-
-#define HEI_INF(...)                                                           \
-    {                                                                          \
-        printf("HWDIAGS I> " __VA_ARGS__);                                     \
-        printf("\n");                                                          \
-    }
-
-#define HEI_ERR(...)                                                           \
-    {                                                                          \
-        printf("HWDIAGS E> " __VA_ARGS__);                                     \
-        printf("\n");                                                          \
-    }
-
-#define HEI_ASSERT(expression) assert(expression);
diff --git a/analyzer/user_interface.cpp b/analyzer/hei_user_interface.cpp
similarity index 75%
rename from analyzer/user_interface.cpp
rename to analyzer/hei_user_interface.cpp
index 29c0f93..0742d55 100644
--- a/analyzer/user_interface.cpp
+++ b/analyzer/hei_user_interface.cpp
@@ -1,8 +1,9 @@
 /**
- * @file These are implementations of the user interfaces declared in
- *       hei_user_interface.hpp
+ * @file These are the implementations of the user interfaces declared
+ *       in hei_user_interface.hpp
  */
 
+#include <assert.h>
 #include <stdarg.h>
 #include <stdio.h>
 
@@ -18,8 +19,11 @@
 {
     bool accessFailure = false;
 
-    //    HEI_INF("registerRead(%p,%p,%lx,%lx,%lx)", i_chip.getChip(),
-    //             o_buffer, io_bufSize, i_regType, i_address);
+    assert(nullptr != o_buffer);
+    assert(0 != io_bufSize);
+
+    // TODO need real register read code
+    printf("registerRead not implemented\n");
 
     return accessFailure;
 }
@@ -33,8 +37,11 @@
 {
     bool accessFailure = false;
 
-    //    HEI_INF("registerWrite(%p,%p,%lx,%lx,%lx)", i_chip.getChip(),
-    //             i_buffer, io_bufSize, i_regType, i_address);
+    assert(nullptr != i_buffer);
+    assert(0 != io_bufSize);
+
+    // TODO need real register write code
+    printf("registerWrite not implemented\n");
 
     return accessFailure;
 }
diff --git a/analyzer/meson.build b/analyzer/meson.build
index 8f19ecf..3113ce6 100644
--- a/analyzer/meson.build
+++ b/analyzer/meson.build
@@ -1,12 +1,9 @@
-# Get opennpower-libhei dependencies. If not available via package manager
-# "fallback" to using the local libhei subproject.
-libhei_dep = dependency('libhei', fallback : ['libhei', 'libhei_dep'])
-
 # gather analyzer sources to be used here and elsewhere if needed
-analyzer_src = files('analyzer_main.cpp', 'user_interface.cpp')
+analyzer_src = files('analyzer_main.cpp',
+                     'hei_user_interface.cpp')
 
 # Create hardware error analyzer library
 analyzer = static_library('analyzer',
                           analyzer_src,
                           dependencies : libhei_dep,
-                          install : true)
+                          install : false)