Go to the first, previous, next, last section, table of contents.


Agent Descriptions

There are several agents that ship with the Metaglue system. The more useful ones to start up from the command line or from the PowerTester agent are described in the following sections.

Debugging Agents

Agent: agentland.util.LogMonitor
Once started, this agent monitors the catalog and displays a list of all agents that are running. If you use the mouse to click on an agent in the list, a separate window will appear and maintain a history of all the logging output generated by that agent.

Agent: agentland.debug.PowerTester
Once started, this agent displays a simple text field. Typing the name of any other agent in this field will start up the given agent, and then display a list of functions for the agent. By clicking on one of these functions (and optionally typing in arguments), you receive direct control over the agent's functionality.

If the PowerTester agent does not recognize the name you type into the text field, it will ask you if you want to set up an alias for the agent name. This provides a useful facility, where you can type in lamp as a shortcut name for agentland.device.Lamp. These aliased names will be remembered between PowerTester sessions.

Agent: mess.Mess
The MESS acronym stands for Metaglue Expert System Shell -- a version of the CLIPS expert system that has been grafted into the agent framework so that agents can be specified using rule-based code. Full documentation of the MESS language is available elsewhere.(2)

The Mess agent starts up an interactive shell where MESS code can be evaluated and scripts executed. As such, it can serve as an interactive debugging platform for agents.

For example, you can list all the agents running in the system by starting up the Mess agent and running

> (bind ?x (reliesOn "metaglue.Catalog"))
> (printout t (call (?x enumerateAgents) toString) crlf)

Device Control Agents

It may be most useful to start these agents from the PowerTester agent, so that you have easy access to some of their methods. (See section Debugging Agents.) Other ways of controlling them might be through speech or through the Mess environment.

X10 Controllers

X10 is a company specializing in home automation, and has created numerous devices for controlling lights, blinds, coffee makers, and lots of other neat things. Since one of the specialties of the Metaglue agent system is control of a room's devices, the ability to manipulate X10 devices is key. All of these X10 devices can be found in the agentland.output package.

Interface: agentland.output.X10
This is the common interface for all X10 control agents. All of the agents below implement it.

Agent: agentland.output.TwoWayX10
A low level X10-controlling agent capable of talking to TwoWay X10 interface through the serial port.

Agent: agentland.output.LynX10
A low level X10 controlling agent capable of talking to LynX10 interface through the serial port.

Lights

Naturally, one of the most important devices to control in an automated room is the lights. These agents accomplish that task.

Agent: agentland.device.light.X10Light
The agent for controlling non-dimmable (just on and off) lights through an X10 device. This agent relies on one of the X10 controllers (see section X10 Controllers) to do its job.

Agent: agentland.device.light.X10DimmableLight
An extension of X10Light, adding extra functionality for controlling the brightness level of a light. Naturally, the lamp must be connected to a special X10 unit that allows dimming.

Agent: agentland.device.light.LightManager
This agent can control collections of Light (or DimmableLight) agents. Like all device managers, this agent allows other agents to control individual lights by name or all of them at once. It can also keep a control grammar up to date by dynamically updating it with the names of all available lights.

Agent: agentland.device.light.LightManagerSpeech
This agent manages speech control of the light manager agent.

Projector

Agent: agentland.device.Projector
Talks to a video projector through a serial port, and can toggle the power or change the video inputs. This one agent handles different projectors by loading different low-level serial controllers depending on the projector. The name of the low level controller class is passed to the agent through an attribute.

Projection Screen

Agent: agentland.device.pscreen.X10ProjectionScreen
This agent controls motorized projection screens via X10, and can roll them up or down as requested.

Agent: agentland.device.pscreen.ProjectionScreenSpeech
Speech interface to projection screen controlling agents

Drapes

Agent: agentland.device.Drapes
Talks to drapes or blinds controlled either by an X10 device or an IR controller, and can open or close them using method calls. It can also query the current state o1f the drapes (or at least what the agent thinks is the current state).

Application Control Agents

To be written...

Meta Control Agents and Scripts

Agents and scripts described in this section are responsible for describing behaviors.

Agent: agentland.device.pscreen.ProjectionScreenMeta
This agent listens for notifications from projector agents. In particular, it listens to notifications about change of on/off state of the projector. When a projector turns on, it pulls down the screen. When a projector is turned off, it pulls the screen up.

System Agents

These agents are typically started up behind the scenes, and don't need to be run from the command line. It might be useful to look at them in PowerTester (see section Debugging Agents) to gain information about the system, but for the most part they can be ignored unless you are trying to learn about the details of the system.

Agent: metaglue.Catalog
This is the catalog agent that all agents need to know about. Agents can ask the catalog to look up information on other agents, get a list of all the agents in the system, and gain other useful information.

Agent: agentland.util.Notifier
A message broadcasting agent, used by several agents within the system. Agents can make requests for updates from the Notifier by using the addSpy method, and can broadcast information using the notify method. Information can be keyed with strings to limit the broadcast to only those interested.


Go to the first, previous, next, last section, table of contents.