#include <dalt_server.h>
Inheritance diagram for DALT_Server::DALTServer:
Public Methods | |
DALTServer () | |
DALTServer (string map_file) | |
virtual | ~DALTServer () |
virtual void | stepSimulation () |
virtual void | allocateEntity (Entity &entity) |
virtual bool | entitiesLeft () |
virtual bool | isIdle () |
virtual void | serverCycle ()=0 |
void | setMapFile (string map_file) |
virtual void | soap_scanSense (const SOAPMethod &request, SOAPMethod &response)=0 |
virtual void | soap_actionRequest (const SOAPMethod &request, SOAPMethod &response) |
virtual void | soap_cycleComplete (const SOAPMethod &request, SOAPMethod &response) |
virtual void | soap_stateChange (const SOAPMethod &request, SOAPMethod &response) |
virtual void | soap_getMapSize (const SOAPMethod &request, SOAPMethod &response) |
virtual void | soap_getMapState (const SOAPMethod &request, SOAPMethod &response) |
virtual void | soap_sayHello (const SOAPMethod &request, SOAPMethod &response) |
virtual void | soap_stepSimulation (const SOAPMethod &request, SOAPMethod &response) |
virtual void | soap_getDelta (const SOAPMethod &request, SOAPMethod &response) |
virtual void | soap_isIdle (const SOAPMethod &request, SOAPMethod &response) |
virtual void | soap_registerClient (const SOAPMethod &request, SOAPMethod &response) |
virtual void | soap_abort (const SOAPMethod &request, SOAPMethod &response) |
Protected Types | |
typedef void (DALTServer::* | HandlerFunction )(const SOAPMethod &request, SOAPMethod &response) |
enum | simulationStatus { preparing, paused, running } |
Protected Attributes | |
WorldMap* | wm |
ClientManager* | client_manager |
ActionArbitrage* | action_arbitrage |
int | time_frame |
simulationStatus | simulation_status |
map<int, Client*> | entity_dictionary |
bool | server_cycle_done |
RunTimeInfo | rti |
string | map_file |
This class is a virtual class. You will need to overload the soap_scanSense and soap_actionRequest methods in order to use this class. The behaviour of the server can be further modified by overloading the other available methods
The class also acts as a top-level simulation manager
|
type defined to enable the extended classes to handle soap requests.
|
|
enumeration describing the current status of the simulation.
|
|
constructor: registers functions, allocates objects.
|
|
constructor: registers functions, allocates objects.
|
|
destructor: de-allocates objects.
|
|
allocates an entity to a client. That is, given at the least an entity type and an entity id will get a client to create the relevant agent
|
|
tests whether there are entities in the simulation which are still working.
|
|
tests whether the simulation is idle, waiting for a new cycle.
|
|
the server processing cycle. all the computation done by the server at each cycle goes here this function is called automatically when the last agent finished its cycle Reimplemented in CAServer. |
|
sets the filename from which the map is to be read.
|
|
causes the server to abort its execution. this method does not clean up after itself, it just calls exit(0)
|
|
process an action request from an entity.This method needs to be defined in any derived class.
|
|
called by agents when completing their cycle.
|
|
returns the rezults of the last simulation cycle.
|
|
returns the map size in a vector (should be used by the observer to set the initial view dimensions.
|
|
returns the state of the map as an array of entites, without making any changes.
|
|
returns 0 if there are entities still processing and 1 otherwise.
|
|
register a client.
|
|
test method for SOAP RMI.
|
|
scan a given sense for a given entity. This method needs to be defined in any derived class
Reimplemented in CAServer. |
|
handles state change notifications.
|
|
attempts to run a step of the simulation and return 0 or a positive value depending on whether a new cycle was started.
|
|
executes a step of the simulation.
|
|
manages the action queue.
|
|
manages client allocation, workload distrubution.
|
|
this map keeps a a relation in between each entity id and a client. This can be used to trace the client running each agent.
|
|
the file containing the map layout.
|
|
time information.
|
|
this flag signals whether the server did its processing for the current cycle (this is optional).
|
|
current status of the simulation.
|
|
current time frame.
|
|
Holds the simulation map.
|