|
from pysoarlib import * |
|
|
|
|
|
|
|
class GeneralSoarIOConnector(AgentConnector): |
|
def __init__(self, client): |
|
AgentConnector.__init__(self, client) |
|
client.add_print_event_handler(self.agent_print_collector) |
|
|
|
|
|
|
|
self.agent_printout = "" |
|
|
|
def on_input_phase(self, input_link): |
|
pass |
|
|
|
def on_init_soar(self): |
|
self.reset() |
|
|
|
def on_output_event(self, command_name, root_id): |
|
pass |
|
|
|
|
|
def agent_print_collector(self, text): |
|
self.agent_printout += text+"\n" |
|
|
|
def get_agent_output(self): |
|
return self.agent_printout |
|
|
|
def reset(self): |
|
self.agent_printout = "" |
|
|
|
|
|
|
|
|
|
|