00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifdef HAVE_CONFIG_H
00018 #include "config.h"
00019 #endif
00020
00021 #ifndef DALT_CLIENT_H
00022 #define DALT_CLIENT_H
00023
00024 #include <string>
00025 #include <vector>
00026 #include <map>
00027 #include <list>
00028 #include <easysoap/SOAP.h>
00029 #include <dalt_client/run_time_info.h>
00030 #include <dalt_client/agent_watcher.h>
00031
00032 using namespace EasySoap;
00033
00034 namespace DALT_Client {
00035
00036
00037 class Agent;
00038
00055 class DALTClient
00056 {
00057 protected:
00059 typedef void (DALTClient::*HandlerFunction)(const SOAPMethod& request, SOAPMethod& response);
00060
00062 float machine_speed;
00064 vector<Agent*> agents;
00066 string location;
00069 list<Agent*> to_kill;
00070 public:
00072 SOAPProxy* endpoint;
00074 string server_location;
00075
00077 AgentWatcher* agent_watcher;
00082 DALTClient(int port_no, string server);
00083 virtual ~DALTClient();
00084
00089 virtual int createAgent(string type, int id)=0;
00090
00092 virtual void killAgent(int id);
00093
00094
00095
00097 virtual void soap_createAgent(const SOAPMethod& request, SOAPMethod& response);
00099 virtual void soap_newCycleNotify(const SOAPMethod& request, SOAPMethod& response);
00101 virtual void soap_clientStatus(const SOAPMethod& request, SOAPMethod& response);
00104 virtual void soap_agentStats(const SOAPMethod& request, SOAPMethod& response);
00107 virtual void soap_actionRequest(const SOAPMethod& request, SOAPMethod& response) = 0;
00108 };
00109
00110 }
00111
00112
00113 #include <dalt_client/agent.h>
00114 #endif