summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf/common/framework/register/iipErrorRegisterType.h
blob: ead888a921dda2efb1e3ea18b3bd22b724a56508 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
/* IBM_PROLOG_BEGIN_TAG                                                   */
/* This is an automatically generated prolog.                             */
/*                                                                        */
/* $Source: src/usr/diag/prdf/common/framework/register/iipErrorRegisterType.h $ */
/*                                                                        */
/* IBM CONFIDENTIAL                                                       */
/*                                                                        */
/* COPYRIGHT International Business Machines Corp. 1996,2012              */
/*                                                                        */
/* p1                                                                     */
/*                                                                        */
/* Object Code Only (OCO) source materials                                */
/* Licensed Internal Code Source Materials                                */
/* IBM HostBoot Licensed Internal Code                                    */
/*                                                                        */
/* The source code for this program is not published or otherwise         */
/* divested of its trade secrets, irrespective of what has been           */
/* deposited with the U.S. Copyright Office.                              */
/*                                                                        */
/* Origin: 30                                                             */
/*                                                                        */
/* IBM_PROLOG_END_TAG                                                     */

#ifndef iipErrorRegisterType_h
#define iipErrorRegisterType_h

// Class Description *************************************************
//
//  Name:  iipErrorRegisterType ABC
//  Base class: None
//
//  Description:
//  Usage:
//
// End Class Description *********************************************
//--------------------------------------------------------------------
// Includes
//--------------------------------------------------------------------
#if !defined(IIPBTLST_H)
#include <prdfBitKey.H>
#endif

#if !defined(iipResolution_h)
#include <iipResolution.h>
#endif

#include <iipsdbug.h>

namespace PRDF
{

//--------------------------------------------------------------------
//  Forward References
//--------------------------------------------------------------------
class BIT_STRING_CLASS;
struct STEP_CODE_DATA_STRUCT;

class ErrorRegisterType
{
  public:
//  ERROR_REGISTER_CLASS();
  // Function Specification ********************************************
  //
  // Purpose:      Constructor
  // Parameters:   None
  // Returns:      Nothing
  // Requirements: None
  // Promises:     Object created
  // Exceptions:   None
  // Concurrency:  synchronous
  // Notes:        Compiler default = ok
  //
  // End Function Specification ****************************************

    virtual ~ErrorRegisterType() {}
  // Function Specification ********************************************
  //
  // Purpose:      Destruction
  // Parameters:   None.
  // Returns:      No value returned
  // Requirements: None.
  // Promises:     None.
  // Exceptions:   None.
  // Concurrency:  Reentrant
  // Notes:
  //
  // End Function Specification ****************************************

  virtual int32_t Analyze(STEP_CODE_DATA_STRUCT & error) = 0;
  // Function Specification ********************************************
  //
  // Purpose:      Analyze the error reported by this error register
  // Parameters:   Reference to area to return Service Data
  // Returns:      Return code
  // Requirements: None.
  // Promises:     Provide service data for the error condition reported
  //               by the hardware error register this object represents
  // Exceptions:   Simulator may throw TBD otherwise None.
  // Concurrency:
  // Notes:
  //
  // End Function Specification ****************************************

protected:

  virtual const BIT_STRING_CLASS & Read(ATTENTION_TYPE i_attn) = 0;
  // Function Specification ********************************************
  //
  // Purpose:      Read data in from hardware for this error register
  // Parameters:   None
  // Returns:      Reference to a bit string containing the data read
  // Requirements: None.
  // Promises:     Returns a reference to the bit string containing the
  //               value read . May return NULL if hardware access failed.
  // Exceptions:   None. (Future: May throw Ereg_Read_Failure)
  // Concurrency:
  // Notes:
  //
  // End Function Specification ****************************************

  virtual BitKey Filter(const BIT_STRING_CLASS & bs) = 0;
  // Function Specification ********************************************
  //
  // Purpose:      Filter out unwanted bits in the bit string.
  // Parameters:   References to the bit string read in.
  // Returns:      Reference to a bit list
  // Requirements: None.
  // Promises:     Return a bit list containing the desired pattern to
  //               use to find an Resolution to execute.
  // Exceptions:   None.
  // Concurrency:
  // Notes:
  //
  // End Function Specification ****************************************

  virtual bool FilterUndo(BitKey & i_bit_list) = 0;

  /**
   Find a resolution for the Bit List
   <ul>
   <br><b>Parameters:  </b> reference to ServiceDataCollector to act on
   <br><b>Parameter:   </b> Bit List
   <br><b>Requirements:</b> Filter()
   <br><b>Promises:    </b> The bit list may be modified if the search
                            algoithm modified it to find a match. (as in a fuzzy search)
   <br><b>Exceptions:  </b> None.
   <br><b>Notes:       </b> If no match for the Bit List is found in the
                            Resolution Map then the ResolutionMap default is used
   </ul><br>
   */
  virtual int32_t Lookup(STEP_CODE_DATA_STRUCT & sdc, BitKey & bl) = 0;

  virtual int32_t Reset(const BitKey & bit_list,STEP_CODE_DATA_STRUCT & error) = 0;
  // Function Specification ********************************************
  //
  // Purpose:      Reset the hardware & perform any other actions needed
  //               to prepare for the next Analysis
  // Parameters:   Reference to a bit list
  // Returns:      Return code
  // Requirements: None.
  // Promises:     Hardware register may be modified
  //               May do nothing if nothing is needed.
  // Exceptions:   None.
  // Concurrency:
  // Notes:
  //
  // End Function Specification ****************************************

};

} // end namespace PRDF

#endif /* iipErrorRegisterType_h */

// Change Log *********************************************************
//
//  Flag Reason   Vers Date     Coder Description
//  ---- -------- ---- -------- ----- -------------------------------
//               v4r1m0 04/03/96 DRG  Initial Creation from iiperst.h
//                                    Abstraction of error register class
//       p4902214 v4r1m0 05/09/97 DRG   Added service data parm to Reset
//  dg02 482244 fips225 11/05/04 dgilbert change Lookup() to pass bl by value
//       558003 fips310 06/21/06 dgilbert add FilterUndo()
//
// End Change Log *****************************************************
OpenPOWER on IntegriCloud