diff options
author | Brian Silver <bsilver@us.ibm.com> | 2015-02-27 13:08:03 -0600 |
---|---|---|
committer | Derk Rembold <rembold@de.ibm.com> | 2015-09-03 07:19:32 -0500 |
commit | 03befc5778970516b5e02254d5e512ee8ffe295d (patch) | |
tree | 166f0f3548f97dbaf6d1e960f1be8fc3d787ac4c | |
parent | 7609511c99205fbdc357d99fdb13b336b1b9aab2 (diff) | |
download | talos-sbe-03befc5778970516b5e02254d5e512ee8ffe295d.tar.gz talos-sbe-03befc5778970516b5e02254d5e512ee8ffe295d.zip |
Add functional state to target walkng API
Fix duplicate definitions of OpMode
Change-Id: I5ddfcd49a0a6462d83deca844df8bb6ebc56d883
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/16043
Reviewed-by: Brian Silver <bsilver@us.ibm.com>
Tested-by: Brian Silver <bsilver@us.ibm.com>
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/20121
Tested-by: Jenkins Server
Reviewed-by: Derk Rembold <rembold@de.ibm.com>
-rw-r--r-- | import/hwpf/fapi2/include/hw_access.H | 25 | ||||
-rw-r--r-- | import/hwpf/fapi2/include/target.H | 17 |
2 files changed, 15 insertions, 27 deletions
diff --git a/import/hwpf/fapi2/include/hw_access.H b/import/hwpf/fapi2/include/hw_access.H index dc372a38..74883ece 100644 --- a/import/hwpf/fapi2/include/hw_access.H +++ b/import/hwpf/fapi2/include/hw_access.H @@ -101,31 +101,6 @@ namespace fapi2 return 0; } - /// @enum OpModes operational Mode Error Functions - enum OpModes - { - // These are bit-masks in case they need to be or'd together - NORMAL = 0x00, - IGNORE_HW_ERROR = 0x01, - DO_NOT_DO_WAKEUP = 0x02, - }; - - /// @brief Sets the operational mode - /// @param[in] i_mode The new mode - void setOpMode(const OpModes i_mode) - { - // No-op for now. Should set thread-local operational mode - return; - } - - /// @brief Gets the operational mode - /// @return the operational mode - OpModes getOpMode(void) - { - // No-op for now. Should read thread-local operational mode - return NORMAL; - } - //-------------------------------------------------------------------------- // Operational Mode Error Functions //-------------------------------------------------------------------------- diff --git a/import/hwpf/fapi2/include/target.H b/import/hwpf/fapi2/include/target.H index 52b6a478..47a75003 100644 --- a/import/hwpf/fapi2/include/target.H +++ b/import/hwpf/fapi2/include/target.H @@ -38,6 +38,15 @@ namespace fapi2 { /// + /// @brief Enumeration of target state values (bitmask values) + /// + enum TargetState + { + TARGET_STATE_PRESENT = 0x00000001, + TARGET_STATE_FUNCTIONAL = 0x00000002, + }; + + /// /// @brief Class representing a FAPI2 Target /// @tparam K the type (Kind) of target /// @tparam V the type of the target's Value @@ -174,11 +183,13 @@ namespace fapi2 /// /// @brief Get this target's children /// @tparam T The type of the parent + /// @param[in] i_state The desired TargetState of the children /// @return std::vector<Target<T> > a vector of present/functional /// children /// template< TargetType T> - inline std::vector<Target<T> > getChildren(void) const + inline std::vector<Target<T> > + getChildren(const TargetState i_state = TARGET_STATE_FUNCTIONAL) const { // For testing return {Target<T>()}; @@ -187,11 +198,13 @@ namespace fapi2 /// /// @brief Get the target at the other end of a bus - dimm included /// @tparam T The type of the parent + /// @param[in] i_state The desired TargetState of the children /// @return Target<T> a target representing the thing on the other end /// @note Can be easily changed to a vector if needed /// template<TargetType T> - inline Target<T> getOtherEnd(void) const + inline Target<T> + getOtherEnd(const TargetState i_state = TARGET_STATE_FUNCTIONAL) const { // Implementation note: cast to a composite of // bus types and the compiler will check if this is |