Created IsolationChip class
Change-Id: I8c95713303f730c1ee6aa289154be47fc66639db
Signed-off-by: Zane Shelley <zshelle@us.ibm.com>
diff --git a/src/isolator/hei_isolation_chip.cpp b/src/isolator/hei_isolation_chip.cpp
new file mode 100644
index 0000000..ef40564
--- /dev/null
+++ b/src/isolator/hei_isolation_chip.cpp
@@ -0,0 +1,30 @@
+#include <isolator/hei_isolation_chip.hpp>
+
+namespace libhei
+{
+
+//------------------------------------------------------------------------------
+
+bool IsolationChip::analyze(const Chip& i_chip, IsolationData& io_isoData) const
+{
+ bool o_activeAttn = false; // Initially, assume no active attentions.
+
+ // The given chip must be the same type as iv_chipType.
+ HEI_ASSERT(iv_chipType == i_chip.getType());
+
+ // Iterate each root node.
+ for (const auto& node : iv_rootNodes)
+ {
+ if (node.second->analyze(i_chip, node.first, io_isoData))
+ {
+ // At least one attention type had an active attention.
+ o_activeAttn = true;
+ }
+ }
+
+ return o_activeAttn;
+}
+
+//------------------------------------------------------------------------------
+
+} // end namespace libhei