Add getter for IsolationChip in the Isolator
Signed-off-by: Caleb Palmer <cnpalmer@us.ibm.com>
Change-Id: Ibf375da55124dc7daee35118ad56c3ca83d7aa7b
diff --git a/src/isolator/hei_isolator.hpp b/src/isolator/hei_isolator.hpp
index 4e9419b..7842730 100644
--- a/src/isolator/hei_isolator.hpp
+++ b/src/isolator/hei_isolator.hpp
@@ -58,6 +58,19 @@
return theIsolator;
}
+ /**
+ * @brief Provides access to an isolation chip within this object.
+ * @param i_chipType The chip type of the isolation chip to access.
+ * @return ConstPtr to the isolation chip object.
+ */
+ IsolationChip::ConstPtr getIsoChip(ChipType_t i_chipType) const
+ {
+ auto itr = iv_isoChips.find(i_chipType);
+ HEI_ASSERT(iv_isoChips.end() != itr); // The IsolationChip should exist.
+
+ return itr->second;
+ }
+
/** @brief See API wrapper description in hei_main.hpp. */
void initialize(void* i_buffer, size_t i_bufferSize)
{