00001 /*[ 00002 * Copyright (c) 2007 Integration Engineering Laboratory 00003 University of California, Davis 00004 * 00005 * Permission to use, copy, and distribute this software and its 00006 * documentation for any purpose with or without fee is hereby granted, 00007 * provided that the above copyright notice appear in all copies and 00008 * that both that copyright notice and this permission notice appear 00009 * in supporting documentation. 00010 * 00011 * Permission to modify the software is granted, but not the right to 00012 * distribute the complete modified source code. Modifications are to 00013 * be distributed as patches to the released version. Permission to 00014 * distribute binaries produced by compiling modified sources is granted, 00015 * provided you 00016 * 1. distribute the corresponding source modifications from the 00017 * released version in the form of a patch file along with the binaries, 00018 * 2. add special version identification to distinguish your version 00019 * in addition to the base release version number, 00020 * 3. provide your name and address as the primary contact for the 00021 * support of your modified version, and 00022 * 4. retain our contact information in regard to use of the base 00023 * software. 00024 * Permission to distribute the released version of the source code along 00025 * with corresponding source modifications in the form of a patch file is 00026 * granted with same provisions 2 through 4 for binary distributions. 00027 * 00028 * This software is provided "as is" without express or implied warranty 00029 * to the extent permitted by applicable law. 00030 ]*/ 00031 00032 #ifndef _AGENT_DATASPACE_H_ 00033 #define _AGENT_DATASPACE_H_ 00034 #include <mxml.h> 00035 #include "agent_task.h" 00036 00037 00038 typedef struct agent_datastate_s 00039 { 00040 char** agent_code_ids; /* Stores all of the agent code ids */ 00041 char** agent_codes; /* Stores all of the agent code blocks */ 00042 char* agent_code; /* This points to the code block to be executed. */ 00043 00044 /* an array of tasks */ 00045 agent_task_p *tasks; 00046 00047 /* xml Parsing attributes */ 00048 mxml_node_t *xml_agent_root; 00049 mxml_node_t *xml_root; 00050 00051 /* place in the task list that corresponds to current task */ 00052 int task_progress; 00053 int return_data; 00054 00055 /* size variables */ 00056 int number_of_tasks; 00057 00058 /* execution flags */ 00059 int persistent; 00060 int init_agent_status; 00061 00062 } agent_datastate_t; 00063 typedef agent_datastate_t* agent_datastate_p; 00064 00065 agent_datastate_p 00066 agent_datastate_Copy(const agent_datastate_p datastate); 00067 00068 agent_datastate_p 00069 agent_datastate_New(void); 00070 00071 int 00072 agent_datastate_Destroy( agent_datastate_p agent_datastate ); 00073 #endif