summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf/framework/resolution/prdfResetThresholdResolution.H
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/diag/prdf/framework/resolution/prdfResetThresholdResolution.H')
-rwxr-xr-xsrc/usr/diag/prdf/framework/resolution/prdfResetThresholdResolution.H129
1 files changed, 129 insertions, 0 deletions
diff --git a/src/usr/diag/prdf/framework/resolution/prdfResetThresholdResolution.H b/src/usr/diag/prdf/framework/resolution/prdfResetThresholdResolution.H
new file mode 100755
index 000000000..1cb23d358
--- /dev/null
+++ b/src/usr/diag/prdf/framework/resolution/prdfResetThresholdResolution.H
@@ -0,0 +1,129 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/diag/prdf/framework/resolution/prdfResetThresholdResolution.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2002,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 prdfResetThresholdResolution_H
+#define prdfResetThresholdResolution_H
+/**
+ @file prdfResetThresholdResolution.H
+ @brief Resolution that counts occurrances up to a threshold, then reports and resets
+ the count and starts counting again.
+*/
+
+#include <prdfThresholdResolutions.H>
+#warning -This is an obsolite part
+
+#if defined(_OBSOLITE_)
+//--------------------------------------------------------------------
+// Includes
+//--------------------------------------------------------------------
+
+#ifndef iipResolution_h
+#include <iipThresholdResolution.h>
+#endif
+
+//--------------------------------------------------------------------
+// Forward References
+//--------------------------------------------------------------------
+
+/**
+ ResetThresholdResolution
+ @par
+ Resolution that has a threshold and keeps track of how
+ many times its called. When the threshold is reached, it
+ tells the service data collector and sends it a mask id,
+ then resets the threshold count to 0.
+ @code
+ enum { thresholdValue = 32, MaskId = 05 };
+ ResetThresholdResolution rtr(thresholdValue,MaskId);
+ Resolution & fr = ResolutionFactory::Access().GetCalloutResolution(HOM_IOHUBCHIP0,MRU_HIGH);
+ ResolutionMap rm(...); // see ResolutionMap
+ rm.Add(BIT_LIST_STRING_05,&rtr,&ftr); // Resolution invoked when bit 5
+ // is on - callsout callout and
+ // thresholds at thresholdValue
+ @endcode
+*/
+class ResetThresholdResolution : public ThresholdResolution
+{
+public:
+ /**
+ ctor
+ @param thresholdValue, error is reported when count == thresholdValue
+ @param maskId is send to the service data collector when threshold is reached
+ @pre none
+ @post internal count set to zero
+ @note If another resolution is chained to this one, it is always called reguardless of the count
+ */
+ ResetThresholdResolution(uint16_t thresholdValue, uint32_t mask_id);
+
+ /**
+ ctor
+ @param thresholdValue, error is reported when count == thresholdValue
+ @param maskId is send to the service data collector when threshold is reached
+ @param Another resolution to call (chained) after this one
+ @pre none
+ @post internal count set to zero
+ @note If another resolution is chained to this one, it is always called reguardless of the count
+ */
+// ResetThresholdResolution(uint32_t thresholdValue, uint32_t mask_id, Resolution &r);
+
+ // ~ResetThresholdResolution(); compiler default is ok
+ // copy ctor - Compiler default ok
+ // Assignment - Compiler default ok
+
+ /**
+ Resolve this part of the error (increment count)
+ @param error, Access to ServiceDataCollector @see ServiceDataCollector
+ @returns [SUCCESS| return code]
+ @pre none
+ @post 1) ++count.
+ 2) if count == threshold then error.service_data->IsAtThreshold() == true and
+ maskId is sent to serviceDataCollector.
+ 3)Chained resolution called if one was provided in ctor
+ */
+ virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error);
+
+
+private: // functions
+private: // Data
+
+// uint8_t threshold;
+// uint8_t count;
+// uint16_t maskId;
+// Resolution * xRes;
+};
+
+inline
+ResetThresholdResolution::ResetThresholdResolution(uint16_t thresholdValue, uint32_t mask_id)
+: ThresholdResolution(thresholdValue,mask_id)
+{}
+
+/*
+inline
+ResetThresholdResolution::ResetThresholdResolution(uint32_t thresholdValue,
+ uint32_t mask_id,
+ Resolution & r)
+: Resolution(), threshold(thresholdValue), count(0), maskId(mask_id), xRes(&r)
+{}
+*/
+#endif
+#endif /* xspprdResetThresholdResolution_h */
OpenPOWER on IntegriCloud