blob: 66de23441cf73d24900b2cd2ae61e1c7b4281c56 [file] [log] [blame]
Zane Shelleya61f4c52019-08-01 13:58:49 -05001#pragma once
2
Zane Shelley5a266612019-08-15 16:23:53 -05003#include <hei_includes.hpp>
4#include <chip_data/hei_chip_data.hpp>
Zane Shelleya61f4c52019-08-01 13:58:49 -05005
6namespace 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 */
14class IsolationData
15{
16 public:
17
Zane Shelley5a266612019-08-15 16:23:53 -050018 /**
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 Shelleya61f4c52019-08-01 13:58:49 -050029
30 /** @brief Copy constructor. */
31 IsolationData( const IsolationData & ) = default;
32
33 /** @brief Assignment operator. */
34 IsolationData & operator=( const IsolationData & ) = default;
35
Zane Shelley5a266612019-08-15 16:23:53 -050036 /** @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 Shelleya61f4c52019-08-01 13:58:49 -050044
45 private:
46
Zane Shelley5a266612019-08-15 16:23:53 -050047 /**
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 Shelleya61f4c52019-08-01 13:58:49 -050065}; // end class IsolationData
66
67} // end namespace libhei
68