Previous topic

datatypes

Next topic

events

This Page

event_queue

class pyogp.lib.base.event_queue.EventQueueClient(capability=None, settings=None, message_handler=None, host=None)

handles an event queue of either an agent domain or a simulator

Initialize the event queue client class >>> client = EventQueueClient()

The event queue client requires an event queue capability >>> from pyogp.lib.base.caps import Capability >>> cap = Capability(‘EventQueue’, http://localhost:12345/cap)

>>> event_queue = EventQueueClient(cap)
>>> event_queue.start()

Sample implementations: region.py Tests: tests/test_event_queue.py

set up the event queue attributes

start()
spawns a coroutine connecting to the event queue on the target
stop()
trigger the event queue to stop communicating with the simulator