4 * Copyright (c) 1993, 1994 Barton P. Miller, Jeff Hollingsworth,
5 * Bruce Irvin, Jon Cargille, Krishna Kunchithapadam, Karen
6 * Karavanic, Tia Newhall, Mark Callaghan. All rights reserved.
8 * This software is furnished under the condition that it may not be
9 * provided or otherwise made available to, or used by, any other
10 * person, except as provided for by the terms of applicable license
11 * agreements. No title to or ownership of the software is hereby
12 * transferred. The name of the principals may not be used in any
13 * advertising or publicity related to this software without specific,
14 * written prior authorization. Any use of this software must include
15 * the above copyright notice.
18 /* $Log: visiTypes.h,v $
19 /* Revision 1.12 1995/09/18 18:25:58 newhall
20 /* updated test subdirectory, added visilib routine GetMetRes()
22 * Revision 1.11 1995/08/24 15:14:41 hollings
23 * AIX/SP-2 port (including option for split instruction/data heaps)
24 * Tracing of rexec (correctly spawns a paradynd if needed)
25 * Added rtinst function to read getrusage stats (can now be used in metrics)
27 * Improved Error reporting in MDL sematic checks
28 * Fixed MDL Function call statement
29 * Fixed bugs in TK usage (strings passed where UID expected)
31 * Revision 1.10 1995/06/02 21:01:56 newhall
32 * changed type of metric and focus handles to u_int
34 * Revision 1.9 1995/02/26 01:59:29 newhall
35 * added phase interface functions
37 * Revision 1.8 1995/02/16 09:32:05 markc
38 * Modified to support machines which do not have NaN(x).
39 * This code has not been tested, but it compiles.
41 * Revision 1.7 1994/09/25 01:58:15 newhall
42 * changed interface definitions to work for new version of igen
43 * changed AddMetricsResources def. to take array of metric/focus pairs
45 * Revision 1.6 1994/08/03 20:57:03 newhall
46 * *** empty log message ***
48 * Revision 1.5 1994/08/03 20:47:46 newhall
49 * removed event type NEWMETRICSRESOURCES
51 * Revision 1.4 1994/07/30 03:26:56 newhall
52 * added new msgTag type ENABLED
54 * Revision 1.3 1994/07/28 22:23:19 krisna
55 * changed definition of ERROR to use NaN(X)
57 * Revision 1.2 1994/05/23 20:55:19 newhall
58 * To visi_GridCellHisto class: added deleted flag, SumValue
59 * method function, and fixed AggregateValue method function
61 * Revision 1.1 1994/05/11 17:11:08 newhall
62 * changed data values from double to float
67 // TODO -- nan.h is a non-standard header file -- there has to be a portable
68 // way to do this -- mdc -- I am not sure if this works, but it compiles
71 #if !defined(i386_unknown_netbsd1_0) && !defined(hppa1_1_hp_hpux) && !defined(rs6000_ibm_aix3_2)
73 #endif /* !defined(i386_unknown_netbsd1_0) */
76 #include "util/h/makenan.h"
77 #include "util/h/String.h"
83 #define VISI_ERROR_BASE -19
84 #define ERROR_REALLOC -20
85 #define ERROR_CREATEGRID -21
86 #define ERROR_SUBSCRIPT -22
87 #define ERROR_AGGREGATE -23
88 #define ERROR_NOELM -24
89 #define ERROR_MALLOC -25
90 #define ERROR_STRNCPY -26
91 #define ERROR_INIT -27
92 #define VISI_ERROR_MAX -27
94 #define ERROR PARADYN_NaN
97 // event types associated with events from Paradyn to a visualization
98 // DATAVALUES: a new set of data has arrived in the datagrid
99 // INVALIDMETRICSRESOURCES: a metric resource combination has become invalid
100 // ADDMETRICSRESOURCES: new metrics have become enabled for a resource
101 // PHASESTART: a new phase has been defined
102 // PHASEEND: a phase has ended
103 // PHASEDATA: data about the current set of phases has arrived
104 // FOLD: the histogram has folded; binWidth has doubled
106 typedef enum {DATAVALUES,INVALIDMETRICSRESOURCES,ADDMETRICSRESOURCES,
107 PHASESTART,PHASEEND,PHASEDATA,FOLD} msgTag;
110 typedef float sampleType;
111 typedef double timeType;
113 struct metricStruct {
114 string units; // how units are measured
115 string name; // metric name for graph labeling
116 u_int Id; // unique metric Id
117 int aggregate; //either SUM or AVE
119 typedef struct metricStruct visi_metricType;
122 struct resourceStruct{
123 string name; // resource name for graph labeling
124 u_int Id; // unique resource id
126 typedef struct resourceStruct visi_resourceType;
129 struct dataValueStruct{
135 typedef struct dataValueStruct visi_dataValue;
137 extern void visi_ErrorHandler(int errno,const char *msg);