Soar Kernel
9.3.2 08-06-12
|
#include "callback.h"
Go to the source code of this file.
Data Structures | |
struct | io_wme_struct |
struct | output_call_info_struct |
struct | output_link_struct |
Macros | |
#define | ADDED_OUTPUT_COMMAND 1 |
#define | MODIFIED_OUTPUT_COMMAND 2 |
#define | NORMAL_INPUT_CYCLE 2 |
#define | REMOVED_OUTPUT_COMMAND 3 |
#define | TOP_STATE_JUST_CREATED 1 |
#define | TOP_STATE_JUST_REMOVED 3 |
Typedefs | |
typedef struct agent_struct | agent |
typedef char | Bool |
typedef unsigned char | byte |
typedef struct cons_struct | cons |
typedef struct io_wme_struct | io_wme |
typedef cons | list |
typedef struct output_call_info_struct | output_call_info |
typedef struct output_link_struct | output_link |
typedef void * | soar_call_data |
typedef struct callback_struct | soar_callback |
typedef void * | soar_callback_data |
typedef union symbol_union | Symbol |
typedef struct wme_struct | wme |
Functions | |
void | add_input_function (agent *a, soar_callback_fn f, soar_callback_data cb_data, soar_callback_free_fn free_fn, const char *name) |
wme * | add_input_wme (agent *thisAgent, Symbol *id, Symbol *attr, Symbol *value) |
void | add_output_function (agent *thisAgent, soar_callback_fn f, soar_callback_data cb_data, soar_callback_free_fn free_fn, int eventID, const char *output_link_name) |
void | deallocate_io_wme_list (agent *thisAgent, io_wme *iw) |
void | do_input_cycle (agent *thisAgent) |
void | do_output_cycle (agent *thisAgent) |
Symbol * | get_io_float_constant (agent *thisAgent, double value) |
Symbol * | get_io_identifier (agent *thisAgent, char first_letter, uint64_t number) |
Symbol * | get_io_int_constant (agent *thisAgent, int64_t value) |
Symbol * | get_io_sym_constant (agent *thisAgent, char const *name) |
io_wme * | get_io_wmes_for_output_link (agent *thisAgent, output_link *ol) |
Symbol * | get_new_io_identifier (agent *thisAgent, char first_letter) |
Symbol * | get_next_io_symbol_from_text_input_line (agent *thisAgent, char **text_read_position) |
Symbol * | get_output_value (io_wme *outputs, Symbol *id, Symbol *attr) |
void | inform_output_module_of_wm_changes (agent *thisAgent,::list *wmes_being_added,::list *wmes_being_removed) |
void | init_soar_io (agent *thisAgent) |
uint64_t | release_io_symbol (agent *thisAgent, Symbol *sym) |
void | remove_input_function (agent *a, const char *name) |
Bool | remove_input_wme (agent *thisAgent, wme *w) |
void | remove_output_function (agent *thisAgent, const char *name) |
#define ADDED_OUTPUT_COMMAND 1 |
Definition at line 187 of file io_soar.h.
Referenced by do_output_cycle().
#define MODIFIED_OUTPUT_COMMAND 2 |
Definition at line 188 of file io_soar.h.
Referenced by do_output_cycle().
#define NORMAL_INPUT_CYCLE 2 |
Definition at line 118 of file io_soar.h.
Referenced by do_input_cycle().
#define REMOVED_OUTPUT_COMMAND 3 |
Definition at line 189 of file io_soar.h.
Referenced by do_output_cycle().
#define TOP_STATE_JUST_REMOVED 3 |
Definition at line 119 of file io_soar.h.
Referenced by do_input_cycle().
typedef struct agent_struct agent |
typedef struct cons_struct cons |
typedef struct io_wme_struct io_wme |
typedef struct output_call_info_struct output_call_info |
typedef struct output_link_struct output_link |
typedef void* soar_call_data |
typedef struct callback_struct soar_callback |
typedef void* soar_callback_data |
typedef union symbol_union Symbol |
typedef struct wme_struct wme |
void add_input_function | ( | agent * | a, |
soar_callback_fn | f, | ||
soar_callback_data | cb_data, | ||
soar_callback_free_fn | free_fn, | ||
const char * | name | ||
) |
Definition at line 81 of file io.cpp.
References INPUT_PHASE_CALLBACK, and soar_add_callback().
Definition at line 199 of file io.cpp.
References add_wme_to_wm(), FALSE, symbol_union::id, identifier_struct::input_wmes, insert_at_head_of_dll, make_wme(), pi_struct::next, NIL, pi_struct::prev, print(), wma_activate_wme(), and wma_enabled().
Referenced by init_agent_memory().
void add_output_function | ( | agent * | thisAgent, |
soar_callback_fn | f, | ||
soar_callback_data | cb_data, | ||
soar_callback_free_fn | free_fn, | ||
int | eventID, | ||
const char * | output_link_name | ||
) |
Definition at line 91 of file io.cpp.
References OUTPUT_PHASE_CALLBACK, print(), soar_add_callback(), and soar_exists_callback_id().
Definition at line 645 of file io.cpp.
Referenced by do_output_cycle().
void do_input_cycle | ( | agent * | thisAgent | ) |
Definition at line 287 of file io.cpp.
References do_buffered_wm_and_ownership_changes(), FALSE, INPUT_PHASE_CALLBACK, agent_struct::io_header, agent_struct::io_header_input, agent_struct::io_header_link, agent_struct::io_header_output, NIL, NORMAL_INPUT_CYCLE, agent_struct::output_link_changed, agent_struct::prev_top_state, release_io_symbol(), soar_invoke_callbacks(), agent_struct::top_state, and TOP_STATE_JUST_REMOVED.
Referenced by clear_goal_stack(), do_one_top_level_phase(), and init_agent_memory().
void do_output_cycle | ( | agent * | thisAgent | ) |
Definition at line 665 of file io.cpp.
References ADDED_OUTPUT_COMMAND, calculate_output_link_tc_info(), output_link_struct::cb, agent_struct::current_phase, callback_struct::data, deallocate_io_wme_list(), callback_struct::eventid, agent_struct::existing_output_links, callback_struct::function, get_io_wmes_for_output_link(), output_link_struct::link_wme, output_call_info_struct::mode, MODIFIED_BUT_SAME_TC_OL_STATUS, MODIFIED_OL_STATUS, MODIFIED_OUTPUT_COMMAND, NEW_OL_STATUS, pi_struct::next, output_link_struct::next, NIL, agent_struct::output_link_pool, output_call_info_struct::outputs, pi_struct::prev, remove_from_dll, remove_output_link_tc_info(), REMOVED_OL_STATUS, REMOVED_OUTPUT_COMMAND, output_link_struct::status, agent_struct::timers_decision_cycle_phase, agent_struct::timers_kernel, agent_struct::timers_output_function_cpu_time, agent_struct::timers_phase, agent_struct::timers_total_kernel_time, UNCHANGED_OL_STATUS, and wme_remove_ref().
Referenced by clear_goal_stack(), do_one_top_level_phase(), and init_agent_memory().
Definition at line 191 of file io.cpp.
References make_float_constant().
Referenced by get_io_symbol_from_tio_constituent_string().
Definition at line 166 of file io.cpp.
References find_identifier(), make_new_identifier(), symbol_add_ref(), and TOP_GOAL_LEVEL.
Definition at line 187 of file io.cpp.
References make_int_constant().
Referenced by get_io_symbol_from_tio_constituent_string().
Definition at line 183 of file io.cpp.
References make_sym_constant().
Referenced by get_next_io_symbol_from_text_input_line().
io_wme* get_io_wmes_for_output_link | ( | agent * | thisAgent, |
output_link * | ol | ||
) |
Definition at line 626 of file io.cpp.
Referenced by do_output_cycle().
Definition at line 161 of file io.cpp.
References make_new_identifier(), and TOP_GOAL_LEVEL.
Referenced by init_agent_memory().
Definition at line 869 of file io.cpp.
References get_io_sym_constant(), get_io_symbol_from_tio_constituent_string(), MAX_TEXT_INPUT_LINE_LENGTH, NIL, tio_constituent_char, and tio_whitespace.
Referenced by accept_rhs_function_code().
Definition at line 793 of file io.cpp.
References io_wme_struct::attr, io_wme_struct::id, io_wme_struct::next, NIL, and io_wme_struct::value.
void inform_output_module_of_wm_changes | ( | agent * | thisAgent, |
::list * | wmes_being_added, | ||
::list * | wmes_being_removed | ||
) |
void init_soar_io | ( | agent * | thisAgent | ) |
Definition at line 910 of file io.cpp.
References extra_tio_constituents, FALSE, init_memory_pool(), agent_struct::io_wme_pool, agent_struct::output_link_pool, tio_constituent_char, tio_whitespace, and TRUE.
Referenced by init_soar_agent().
Definition at line 195 of file io.cpp.
References symbol_remove_ref().
Referenced by accept_rhs_function_code(), and do_input_cycle().
void remove_input_function | ( | agent * | a, |
const char * | name | ||
) |
Definition at line 87 of file io.cpp.
References INPUT_PHASE_CALLBACK, and soar_remove_callback().
Definition at line 251 of file io.cpp.
References FALSE, wme_struct::gds, gds_invalid_so_remove_goal(), gds_struct::goal, wme_struct::id, symbol_union::id, identifier_struct::input_wmes, pi_struct::next, wme_struct::next, NIL, pi_struct::prev, print(), remove_from_dll, remove_wme_from_wm(), and TRUE.
void remove_output_function | ( | agent * | thisAgent, |
const char * | name | ||
) |
Definition at line 114 of file io.cpp.
References output_link_struct::cb, agent_struct::existing_output_links, output_link_struct::link_wme, pi_struct::next, output_link_struct::next, NIL, wme_struct::output_link, agent_struct::output_link_pool, OUTPUT_PHASE_CALLBACK, pi_struct::prev, remove_from_dll, soar_exists_callback_id(), soar_remove_callback(), and wme_remove_ref().