File size: 779 Bytes
2130399
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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 = ""