/* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ /* $Source: src/usr/diag/prdf/common/framework/register/iipErrorRegister.h $ */ /* */ /* OpenPOWER HostBoot Project */ /* */ /* COPYRIGHT International Business Machines Corp. 1996,2014 */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ /* You may obtain a copy of the License at */ /* */ /* http://www.apache.org/licenses/LICENSE-2.0 */ /* */ /* Unless required by applicable law or agreed to in writing, software */ /* distributed under the License is distributed on an "AS IS" BASIS, */ /* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ /* implied. See the License for the specific language governing */ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ /** @file iipErrorRegister.h @brief ErrorRegister class declaration */ #ifndef iipErrorRegister_h #define iipErrorRegister_h // Class Description ************************************************* // // Name: ErrorRegister // Base class: ErrorRegisterType // Concrete class that can be used as a base class // // Description: Error register declairation // Usage: // // foo(SCAN_COMM_REGISTER &scr, ResolutionMap &resMap, // STEP_CODE_DATA_STRUCT &error_data) // { // ErrorRegister er(scr,resMap); // . // . // SINT32 rc = er.Analyze(error_data); // } // // Notes: // // // End Class Description ********************************************* //-------------------------------------------------------------------- // Includes //-------------------------------------------------------------------- #if !defined(iipErrorRegisterType_h) #include "iipErrorRegisterType.h" #endif //-------------------------------------------------------------------- // Forward References //-------------------------------------------------------------------- namespace PRDF { class SCAN_COMM_REGISTER_CLASS; class ResolutionMap; class ErrorRegister : public ErrorRegisterType { public: /** Constructor
*/ ErrorRegister(SCAN_COMM_REGISTER_CLASS & r, ResolutionMap & rm, uint16_t scrId = 0x0fff); // Function Specification ******************************************** // // Purpose: Destruction // Parameters: None. // Returns: No value returned // Requirements: None. // Promises: None. // Exceptions: None. // Concurrency: Reentrant // Notes: Compiler default is ok // Objects do not not own ptr to scan comm register and table // // End Function Specification **************************************** // ~ErrorRegister(); /** Analyse the error register
*/ virtual int32_t Analyze(STEP_CODE_DATA_STRUCT & error); /** Make is so Analyze() does not consider a Scr bit string of all zeros an error
*/ void NoErrorOnZeroScrRead(void) { xNoErrorOnZeroScr = true; } protected: /** Read the scan comm register, apply any masks, and return the resulting bit string
*/ virtual const BIT_STRING_CLASS & Read(ATTENTION_TYPE i_attn); /** Filter the bit string (if a filter is provided) & convert it to a BitList
*/ virtual BIT_LIST_CLASS Filter(const BIT_STRING_CLASS & bs); virtual bool FilterUndo(BitKey & i_bit_list) { return false; } /** Find a resolution for the Bit List
*/ virtual int32_t Lookup(STEP_CODE_DATA_STRUCT & scd, BIT_LIST_CLASS & bl); // dg02c - pass bl by value /** Reset the hardware (if needed)
*/ virtual int32_t Reset(const BIT_LIST_CLASS & bit_list,STEP_CODE_DATA_STRUCT & error); private: // functions int32_t SetErrorSignature(STEP_CODE_DATA_STRUCT & error, BIT_LIST_CLASS & bl); // dg02a /** Copy forbidden */ ErrorRegister(const ErrorRegister & er); /** Assignment forbidden */ ErrorRegister & operator=(const ErrorRegister & er); protected: // Data SCAN_COMM_REGISTER_CLASS & scr; int32_t scr_rc; private: // Data ResolutionMap & rMap; bool xNoErrorOnZeroScr; uint16_t xScrId; }; } // end namespace PRDF #endif /* iipErrorRegister_h */