directions to incorporate a visualization (an example is in xtext.C) ----------------------------------------- in main(): --------- (1) call visiInit() (2) register callback routines associated with certain Paradyn events by calling RegistrationCallback(): these are routines written by the visualization writer to be called by the visi_callback routine when the specified event occurs. the event types (type msgTag) are defined in ../src/visiTypes.h Callback routines should take one integer parameter. This parameter is only used for the DATAVALUES event, where it is the bucket number of the next full set of data across all the valid metrics/resources of the datagrid. Most of the work involved in integrating the visualization has to do with writing these callback routines. In most cases this will involve changing a callback routine in the X application that initially read data from a file descriptor, to get data from the interface's data structures: in most cases this involves invoking dataGrid method functions. An example of a change to an existing call back routine is the function "fd_input" in xtext.C. dataGrid method functions are defined in ~paradyn/core/visi/src/datagrid.h visualization interface routines and global variables are in ~paradyn/core/visi/src/visualization.[Ch] (3) optional: call StartVisi(argc,argv) with the args to main(): each visualization is started with two command line arguments--a metric list and a resource list. For visualizations that do not invoke the upcalls provided by the visi interface this is the only opportunity to start data collection. Steps 3a and 3b: for handling upcalls to Paradyn side: ------------------------------------------------------ (3a) create a widget associated with the upcall (3b) use XtAddCallback to register your handler routine for events assoc. with this widget (4) register the paradyn file descriptor (returned by VisiInit) and the paradyn callback routine "visi_callback" with the appropriate add application routine. (ie. for Xt use XtAddApp) (5) call Xt main loop Getting values out of the datagrid ---------------------------------- Information about metrics, resources, and data values can be obtained by calling the visi_DataGrid method functions in ~paradyn/visi/h/datagrid.h Data values can be retrieved in one of two ways: 1) datagrid[metricNum][resourceNum][bucketNum] returns a single bucket value 2) datagrid[metricNum][resourceNum].Value() returns a pointer to an array of bucket values Adding aditional information to a datagrid cell ----------------------------------------------- Each datagrid cell has a void * public member (userdata) that can be used to add any additional information to a datagrid cell. Interface test programs (in paradyn/core/visi/test ) ----------------------- Sample visi interface client server programs, and examples of integrating the interface routines into an existing visualization.