Zane Shelley | a61f4c5 | 2019-08-01 13:58:49 -0500 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Zane Shelley | 5a26661 | 2019-08-15 16:23:53 -0500 | [diff] [blame] | 3 | #include <hei_includes.hpp> |
| 4 | #include <chip_data/hei_chip_data.hpp> |
Zane Shelley | a61f4c5 | 2019-08-01 13:58:49 -0500 | [diff] [blame] | 5 | |
| 6 | namespace libhei |
| 7 | { |
| 8 | |
| 9 | /** |
| 10 | * @brief Contain a list of all active hardware errors on a chip, the contents |
| 11 | * of any registers associated with the active errors, and any other data |
| 12 | * that can be useful for debug. |
| 13 | */ |
| 14 | class IsolationData |
| 15 | { |
| 16 | public: |
| 17 | |
Zane Shelley | 5a26661 | 2019-08-15 16:23:53 -0500 | [diff] [blame] | 18 | /** |
| 19 | * @brief Default constructor. |
| 20 | * @param i_chip See iv_chip. |
| 21 | * @param i_chipType See iv_chipType. |
| 22 | */ |
| 23 | IsolationData( void * i_chip, ChipType_t i_chipType ) : |
| 24 | iv_chip(i_chip), iv_chipType(i_chipType) |
| 25 | {} |
| 26 | |
| 27 | /** @brief Destructor. */ |
| 28 | ~IsolationData() = default; |
Zane Shelley | a61f4c5 | 2019-08-01 13:58:49 -0500 | [diff] [blame] | 29 | |
| 30 | /** @brief Copy constructor. */ |
| 31 | IsolationData( const IsolationData & ) = default; |
| 32 | |
| 33 | /** @brief Assignment operator. */ |
| 34 | IsolationData & operator=( const IsolationData & ) = default; |
| 35 | |
Zane Shelley | 5a26661 | 2019-08-15 16:23:53 -0500 | [diff] [blame] | 36 | /** @return The target chip pointer. */ |
| 37 | void * getChip() const { return iv_chip; } |
| 38 | |
| 39 | /** @return The target chip type. */ |
| 40 | ChipType_t getChipType() const { return iv_chipType; } |
| 41 | |
| 42 | /** @brief Flushes the data to ensure a clean slate for next isolation. */ |
| 43 | void clear() {} |
Zane Shelley | a61f4c5 | 2019-08-01 13:58:49 -0500 | [diff] [blame] | 44 | |
| 45 | private: |
| 46 | |
Zane Shelley | 5a26661 | 2019-08-15 16:23:53 -0500 | [diff] [blame] | 47 | /** |
| 48 | * This is simply a pointer to a user application object that represents |
| 49 | * the target chip. The isolator does not know anything about this object |
| 50 | * nor how to use it. This parameter's only purpose is to eventually get |
| 51 | * passed back to the user application in a hardware access operation, which |
| 52 | * will be defined by the user application. |
| 53 | */ |
| 54 | void * const iv_chip; |
| 55 | |
| 56 | /** |
| 57 | * Each Chip Data File contains a unique chip type identifier. The user |
| 58 | * application will need to input this value so that the isolator will know |
| 59 | * which set of the isolation objects to reference. |
| 60 | */ |
| 61 | const ChipType_t iv_chipType; |
| 62 | |
| 63 | // TODO: add error signature list and register dump. |
| 64 | |
Zane Shelley | a61f4c5 | 2019-08-01 13:58:49 -0500 | [diff] [blame] | 65 | }; // end class IsolationData |
| 66 | |
| 67 | } // end namespace libhei |
| 68 | |