Skip to content
lammoth edited this page Dec 5, 2011 · 36 revisions

Agent structure

The agent is composed by the following dirs:

common:

Contains the common parts of agents:

  • gbotxmpp.py: This file performed basic operations with XMPP
  • customstanzahandler.py: This file is used to communicate agents with clients

interfaces:

Contains the interfaces needed to work with the agents

agents:

Contains the different agents of the system

actions:

Contains the actions that can make the agents

datahandlers:

Now system supports two mechanism to manage data:

  • MySQL
  • CouchDB

Both mechanisms have the following structure: handler_mech_name.py and a dir with the views, this dir contains the common operations of the handler

mods:

This dir contains the modules of the system. These modules should manage through the agent interface. Each module should have a specific setting file

Web client structure

The client is composed by the following dirs:

common:

Contains the parts of main web interface:

  • bottom
  • events: Shows events of agents
  • footer
  • header: Load all js and css files automatically
  • menu: If you want add a new section, you must add it to this file

core:

Contains essential files of system

js:

Contains all javascript files, is composed by:

  • common: This dir contains javascript files needed to work
  • module_name: This dir must contain the javascript files needed to work with the module. The dir must have the name of module.

php:

Contains all php files, is composed by:

  • common: This dir contains javascript files needed to work
  • session: This dir contains files needed to work with php sessions
  • home: This dir contains files needed to show information when user logging in the system
  • module_name: This dir must contain the php files needed to work with the module. The dir must have the name of module.

All php dirs must contain the following files:

  • submenu.php: This file contains the module menu. This file should contain as many sections as operations can be performed with the module

css:

Contains all css files, is composed by:

  • common: This dir contains css files needed to work by default
  • module_name: This dir should contain the css files needed to work with the module. The dir must have the name of module.

img:

Contains all images, is composed by:

  • common: This dir contains images needed to work by default
  • module_name: This dir should contain the images needed to work with the module. The dir must have the name of module.