Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

/root/resourcemonitord/resourcemonitord/StatisticalData.h

Go to the documentation of this file.
00001 
00002 /***************************************************************************
00003                           StatisticalData.h  -  Class for capturing statistical
00004                                              data reading by a monitor
00005                              -------------------
00006     begin                : Thu Feb 21 2002
00007     copyright            : (C) 2002 by Todd Davis
00008     email                : todd.c.davis@intel.com
00009  ***************************************************************************/
00010 
00011 /*M*
00012 BSD License
00013 
00014 Copyright (c) 2002, Intel Corporation
00015 All rights reserved.
00016 
00017 Redistribution and use in source and binary forms, with or without
00018 modification, are permitted provided that the following conditions are met:
00019 
00020   a.. Redistributions of source code must retain the above copyright notice,
00021       this list of conditions and the following disclaimer.
00022   b.. Redistributions in binary form must reproduce the above copyright notice,
00023       this list of conditions and the following disclaimer in the documentation
00024       and/or other materials provided with the distribution.
00025   c.. Neither the name of Intel Corporation nor the names of its contributors
00026       may be used to endorse or promote products derived from this software
00027       without specific prior written permission.
00028 
00029 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
00030 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00031 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00032 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
00033 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00034 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00035 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
00036 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00037 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00038 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00039 
00040  *M*/
00041 
00042 #ifndef __StatisticalData_h__
00043 #define __StatisticalData_h__
00044 
00045 // Include files
00046 
00047 #include "ResourceMonitorTypes.h"
00048 #include "RM_Exception.h"
00049 #include <typeinfo>
00050 
00059 namespace StatisticalData
00060 {
00061 
00062 typedef struct
00063 {
00065     rmString    name;
00067     rmString    description;
00068 } rmRegistryInfo;
00069 
00074 class IDataCapture
00075 {
00076 public:
00082     virtual ~IDataCapture() {};
00089     virtual void currentValue(rmValue a_value, time_t a_timestamp)=0;
00096     virtual void monitoringStopped(time_t a_timestamp)=0;
00097 };
00098 
00099 // END CLASS DEFINITION IDataCapture
00100 
00109 typedef  StatisticalData::IDataCapture *(*dataCaptureFactory)(
00110     RMuid a_monitorUid, rmStatisticKey a_statisticKey, rmStatisticSize a_size, uid_t a_uid);
00111 
00117 class IDataCaptureRegistration
00118 {
00119 public:
00130     static void registerDataCapture( RMuid dmUID,
00131                                                                 const int interfaceVersion,
00132                                                                 StatisticalData::rmRegistryInfo *libraryInfo,
00133                                                                 dataCaptureFactory factory,
00134                                                                 void (*a_limitchecker)() );
00135 };
00136 // END CLASS DEFINITION IDataCaptureRegistration
00137 
00138 }   // StatisticalData
00139 
00140 #endif // __StatisticalData_h__

Generated at Sat Sep 7 21:21:07 2002 for Resource Monitoring Facility by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001