Axon.CoordinatingAssistantTracker.py

Version: Axon 1.0

The co-ordinating assistant tracker is designed to allow components to register services and statistics they wish to make public to the rest of the system. Components can also query the co-ordinating assistant tracker to create linkages to specific services, and for specific global statistics.

Microprocesses can also use the co-ordinating assistant tracker to log/retrieve statistics/information. Co-ordinating assistant trackers are designed to work in a singleton manner accessible via a local or class interface.This singleton nature of the co-ordinatin assistant tracker is not enforced.

Pydoc Style Documentation

class coordinatingassistanttracker(__builtin__.object)

Methods defined here:

__init__(self, parent=None)

deRegisterService(self, service)

  • Services are run by components - these by definition die and need to be de-registered

informationItemsLogged(self)

main(self)

registerService(self, service, thecomponent, inbox)

  • t.registerService('service',component,inbox) - Registers that a component is willing to offer a service over a specific inbox

retrieveService(self, name)

retrieveValue(self, name)

servicesRegistered(self)

  • Returns list of names of registered services

trackValue(self, name, value)

  • Once we start tracking a value, we have it's value forever (for now). Adding the same named value more than once causes a NamespaceClash to capture problems between interacting components

updateValue(self, name, value)

...

Testdoc Documentation

__init__

  • Called with a single argument results in it being the parent for the tracker
  • Called with no arguments should succeed.
  • Trying to set a anything other than a coordinated assistant tracker as the parent causes a BadParentTracker exception

informationItemsLogged

  • returns the names of pieces of information logged with this tracker

registerService

  • adding a duplicate service fails, even with same arguments
  • adding a service but not to as a component fails - raises BadComponent assertion
  • adding a service but to a bad/nonexistant inbox fails - raises BadInbox assertion
  • adds the named component/inbox to the list of named registered services

retrieveService

  • Attempting to retrieve a non-tracked service results in KeyError exception being thrown
  • Retrieving a tracked service should return the component/inbox pair we supplied under a specific name

deRegisterService

  • allows a component to remove their service from being public
  • deleting a non-existant service raises MultipleServiceDeletion exception

trackValue

  • Adding a value to be tracked twice raises NamespaceClash
  • Adds the name/value pair to the set of info items logged

updateValue

  • Updating a value not declared as tracked should raise AccessToUndeclaredTrackedVariable
  • Updating a value should result in the value stored being updated

retrieveValue

  • Retrieving a tracked value should return the value we asked to be tracked
  • attempting to retrieve a value we're not tracking should raise AccessToUndeclaredTrackedVariable

Class methods defined here:

  • getcat(cls) from __builtin__.type

Michael, December 2004

 

Kamaelia is an open source project originated from and guided by BBC Research. For more information browse the site or get in contact.

This is an ongoing community based development site. As a result the contents of this page is the opinions of the contributors of the pages involved not the organisations involved. Specificially, this page may contain personal views which are not the views of the BBC. (the site is powered by a wiki engine)

(C) Copyright 2008 Kamaelia Contributors, including the British Broadcasting Corporation, All Rights Reserved

This web site is powered by the same code created for the bicker manor project. For more details, contact Michael Sparks at BBC Research directly (cf contact)