from pysoarlib import * | |
## DEFINE MAIN CONNECTOR CLASS | |
class GeneralSoarIOConnector(AgentConnector): | |
def __init__(self, client): | |
AgentConnector.__init__(self, client) | |
client.add_print_event_handler(self.agent_print_collector) | |
# client.execute_command("output callbacks on") | |
# client.execute_command("output console on") | |
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 = "" | |