Client-Server Events


Events sent from Client to Server

Event: create_agent Functionality: Client notifies server that it wants a new agent created. Server creates a new agent and notifies all clients. Parameters: - agent_type - model - anim_file Event: smite_agent Functionality: Client requests removal of an agent. Server removes the agent and ensures that the agent is removes from all clients. Parameters: - agent_ID Event: update_agent_state Functionality: Used by a client to inform the server of a change in an agent's state. Parameters: - agent_ID - position - orientation - velocity - anim_state Event: send_message Functionality: Transmits an inter-agent message to the server, which will pass it to the destination agent. Parameters: - source_agent - dest_agent - action_type Event: update_frequency Functionality: Notifies server what a particular client's update frequency is. Parameters: - frequency Event: disconnect Functionaltiy: Client instructs server to disconnect the client. Parameters: (none) Event: check_resource Functionality: Client requests an update from the server for a particular resource, if necessary. Parameters: - resource_ID - version_num Event: check_new_resources Functionality: Client requests any new static resources from the server. Parameters: (none) Mesg: heartbeat Functionality: Client informs server that it is still alive. Parameters: (none)

Events sent from server to client

Event: create_agent_ack Functionality: Server acknowledges creation of new agent, and returns the new agent's identification to the originating client. Parameters: - agent_ID Event: new_agent_created Functionality: Server tells all clients (other than the agent's controlling client) that a new agent has been created. Parameters: - agent_ID Event: receive_message Functionality: Server passes an inter-agent message on to the destination agent.. Parameters: - agent_ID - source - action_type Event: update_agent_state Functionality: Server sends agent update info to an agent for all other agents in its view radius. Parameters: - agent_ID - position - orientation - velocity - anim_state Event: resource_ok Functionality: Server tells client that the indicated resource does not need to be updated. Parameters: - resource_ID Event: update_resource Functionality: Server tells client to update the indicated resource. Parameters: - resource_ID - version_num - data_length - binary_data Event: delete_resource Functionality: Server tells client to delete the indicated resource. Parameters: - resource_ID Event: new_resources_done Functionality: Server tells client that it is done sending new static resources. Parameters: (none) Event: collide Functionality: Server tells client that a collision has taken place between two agents. Parameters: - agent1_ID - agent2_id - position