structs.h

Go to the documentation of this file.
00001 #ifndef _ESTRUTURAS_H
00002 #define _ESTRUTURAS_H
00003 
00004 #include "constants.h"
00005 #include "Hosts.h"
00006 
00007 /* Main structures */
00008 typedef struct _filter_spec_ * _filter_spec_ptr;
00009 typedef struct _stream_spec_ * _stream_spec_ptr;
00010 
00011 /** This is the Manager state type */
00012 typedef struct _ManagerState {
00013         int numWorksSent; //< the number of append works sent
00014         int oldestWork; //< the id of the oldest work appended to the pipe
00015 } ManagerState;
00016 
00017 /* FilterSpec ******************************************************************/
00018 typedef struct {
00019         int numInstances; ///< this filter has this number of instances
00020         char *hosts[MAXINSTANCES]; ///< the places this filter runs, points to HostsStruct hostname
00021         int tids[MAXINSTANCES]; ///< the tids of the running instances
00022         char *resources[MAXINSTANCES];
00023 } FilterPlacement;
00024 
00025 /// FilterSpec:  
00026 typedef struct _filter_spec_ {
00027         char name[MAX_FNAME_LENGTH]; ///< filter name, duh !!!!
00028         char libname[MAX_LNAME_LENGTH]; ///< the library name used by this filter
00029         int numInputs; ///< number of inputs this filter has
00030         _stream_spec_ptr inputs[MAXINPSTREAMS]; ///< array of stream pointers
00031         int numOutputs; ///< number of outputs this filter has
00032         _stream_spec_ptr outputs[MAXOUTSTREAMS]; ///< array of stream pointers
00033         int useTasks;   ///< 1: filter use tasks, 0: otherwise (set in execution time)
00034         FilterPlacement filterPlacement; ///< this represents the places this filter runs, see above
00035 } FilterSpec;
00036 /*******************************************************************************/
00037 
00038 /// StreamSpec: Define the main stream options
00039 typedef struct _stream_spec_ {
00040         char name[MAX_SNAME_LENGTH]; ///< the stream name
00041         _filter_spec_ptr fromFilter; ///< we point to the filter who writes to this stream
00042         char fromPortName[MAX_PTNAME_LENGTH]; ///< and this is the port
00043         _filter_spec_ptr toFilter; ///< the filter which reads from this stream
00044         char toPortName[MAX_PTNAME_LENGTH]; ///< on this port
00045         char writePolicyName[MAX_PLNAME_LENGTH]; ///< this is the write policy used
00046         char readPolicyName[MAX_PLNAME_LENGTH]; ///< this is not used
00047         int tag;///< tag that identify the stream
00048         char lsLibName[MAX_LNAME_LENGTH]; ///< if policy is labeled stream, this is the library name
00049 //#ifdef VOID_TERM
00050         int breakLoop; ///< if this stream is a loop component and the loop need to be broke here
00051 //#endif
00052 } StreamSpec;
00053 
00054 
00055 typedef struct _layout_ {
00056         HostsStruct *hostsStruct; ///< hosts structure, contains the hosts and its attributes
00057         int numFilters; ///< total number of filters 
00058         FilterSpec *filters[MAXFILTERS]; ///< array of filters pointers
00059         int numStreams; ///< the streams
00060         StreamSpec *streams[MAXSTREAMS]; ///< array of stream pointers
00061 
00062         ManagerState managerState; //< the state of the manager
00063         
00064         char **argvSpawn; //< this is what we send to the filters being spawned
00065         char cwd[MAX_CWD_LENGTH+1]; //< the program directory
00066         char xName[MAX_XNAME_LENGTH+1]; //< the executable name
00067         char command[MAX_COM_LENGTH+1]; //< the command we execute in the program, cwd + xname
00068 } Layout;
00069 
00070 
00071 #endif

Generated on Tue Jan 17 19:18:39 2006 for Void by  doxygen 1.4.6