Go to the source code of this file.
Functions | |
| void | soar_cTestCallback (soar_callback_agent the_agent, soar_callback_data data, soar_call_data call_data) |
| void | set_sysparam (int param_number, long new_value) |
| void | gds_invalid_so_remove_goal (wme *w) |
| void | soar_cInitializeSoar (void) |
| soar_cInitializeSoar -- Initialize Soar for the very first time. | |
| int | soar_cReInitSoar (void) |
| soar_cReInitSoar -- Reset Soar (and agents) to the initial state. | |
| void | soar_cCreateAgent (const char *agent_name) |
| soar_cCreateAgent -- Create a new soar agent with the specified name. | |
| int | soar_cRun (long n, bool allAgents, enum go_type_enum type, enum soar_apiSlotType slot) |
| soar_cRun -- Run the current agent, or all agents for a specified period ... | |
| void | soar_cStopAllAgents (void) |
| soar_cStopAllAgents -- Stops all agents. | |
| void | soar_cStopCurrentAgent (const char *reason) |
| soar_cStopCurrentAgent -- Stops the current agent. | |
| int | soar_cDestroyAgentByName (const char *name) |
| soar_cDestroyAgentByName -- Destroy an agent, given its name | |
| int | soar_cDestroyAllAgentsWithName (char *name) |
| soar_cDestroyAllAgentsWithName -- Destroy a set of agents, given a name. | |
| void | soar_cDestroyAgentByAddress (psoar_agent delete_agent) |
| soar_cDestroyAgentByAddress -- Destroy an agent, given a pointer to it. | |
| int | soar_cDestroyAgentById (int agent_id) |
| soar_cDestroyAgentById -- Destroy an agent, given its unique id. | |
| void | soar_cQuit (void) |
| soar_cQuit -- Quit Soar. | |
| int | soar_cLoadReteNet (const char *filename) |
| soar_cLoadReteNet -- Load a Rete Network into the agent from a specified file. | |
| int | soar_cSaveReteNet (const char *filename) |
| soar_cSaveReteNet -- Save a Rete Network from the agent into a specified file. | |
| long | soar_cAddWme (const char *szId, const char *szAttr, const char *szValue, bool acceptable_preference, psoar_wme *new_wme) |
| soar_cAddWme -- Add a working memory element to the current agent's working memory. | |
| int | soar_cRemoveWmeUsingTimetag (int num) |
| soar_cRemoveWmeUsingTimetag -- Remove a working memory element, given its timetag. | |
| int | soar_cRemoveWme (psoar_wme the_wme) |
| soar_cRemoveWme -- Remove a working memory element. | |
| void | soar_cExciseAllProductions (void) |
| soar_cExciseAllProductions -- Remove all productions from the agents memory and ReInitialize the agent. | |
| void | soar_cExciseAllTaskProductions (void) |
| soar_cExciseAllTaskProductions -- Remove all but default productions from the agents memory and ReInitialize the agent. | |
| void | soar_cExciseAllProductionsOfType (byte type) |
| soar_cExciseAllProductionsOfType -- Remove all productions of a specific type from the agents memory and ReInitialize the agent. | |
| int | soar_cExciseProductionByName (const char *name) |
| soar_cExciseProductionByName -- Remove the production with the specified name. | |
| double | soar_cDetermineTimerResolution (double *min, double *max) |
| soar_cDetermineTimerResolution -- Determine the resolution of the system timers Soar uses to gather statistics. | |
| void | soar_cInitializeDCHistogram (int nDC, int freq) |
| soar_cInitializeDCHistogram -- Prepare an array of time structures which will be used to store the time executing a sets of decision cycles. | |
| void | soar_cInitializeKTHistogram (int size) |
| soar_cInitializeKTHistogram -- Prepare an array of time structures which will be used to store the kernel time executing a each successive decision cycle. | |
| void | soar_cSetChunkNameLong (bool truly) |
| soar_cSetChunkNameLong -- Set long or short chunk names according to the specified parameter | |
| int | soar_cSetChunkNameCount (long count) |
| soar_cSetChunkNameCount -- Set the chunk count. | |
| int | soar_cSetChunkNamePrefix (const char *prefix) |
| soar_cSetChunkNamePrefix -- Set the chunk name prefix. | |
| void | soar_cSetLearning (enum soar_apiLearningSetting setting) |
| soar_cSetLearning -- Adjust the learning settings. | |
| int | soar_cSetOperand2 (bool turnOn) |
| soar_cSetOperand2 -- Toggles from Soar7 to Soar8 execution mode. | |
| void | soar_cSetWaitSNC (bool on) |
| soar_cSetWaitSNC -- Determine whether Soar should generate explict state-no-change impasses. | |
| int | soar_cMultiAttributes (const char *attribute, int value) |
| soar_cMultiAttributes -- Modify the multi-attributes setting. | |
| int | soar_cAttributePreferencesMode (int mode) |
| soar_cAttributePreferencesMode -- Determine how preferences for non-context slots should be handled. | |
| void | soar_cAddInputFunction (agent *a, soar_callback_fn f, soar_callback_data cb_data, soar_callback_free_fn free_fn, const char *name) |
| soar_cAddInputFunction -- Adds an input function to the specified agent. | |
| void | soar_cRemoveInputFunction (agent *a, const char *name) |
| soar_cRemoveInputFunction -- Remove an input function with the specified name. | |
| void | soar_cAddOutputFunction (agent *a, soar_callback_fn f, soar_callback_data cb_data, soar_callback_free_fn free_fn, const char *output_link_name) |
| soar_cAddOutputFunction -- Similar to soar_cAddInputFunction(), but adds a function which is called durnig each output phase. | |
| void | soar_cRemoveOutputFunction (agent *a, const char *name) |
| soar_cRemoveOutputFunction -- Remove an output function with the specified name. | |
| void | soar_cPushCallback (soar_callback_agent the_agent, SOAR_CALLBACK_TYPE callback_type, soar_callback_fn fn, soar_callback_data data, soar_callback_free_fn free_fn) |
| soar_cPushCallback -- Push a callback onto the specified callback stack. | |
| void | soar_cAddCallback (soar_callback_agent the_agent, SOAR_CALLBACK_TYPE callback_type, soar_callback_fn fn, soar_callback_data data, soar_callback_free_fn free_fn, soar_callback_id id) |
| soar_cAddCallback -- Add a callback onto the specified callback stack. | |
| void | soar_cPopCallback (soar_callback_agent the_agent, SOAR_CALLBACK_TYPE callback_type) |
| soar_cPopCallback -- Pops off the last callback to be added to the specified callback stack. | |
| void | soar_cRemoveCallback (soar_callback_agent the_agent, SOAR_CALLBACK_TYPE callback_type, soar_callback_id id) |
| soar_cRemoveCallback -- Remove the callback from the specified callback stack which has the specified id. | |
| void | soar_cAddGlobalCallback (SOAR_GLOBAL_CALLBACK_TYPE callback_type, soar_callback_fn fn, soar_callback_data data, soar_callback_free_fn free_fn, soar_callback_id id) |
| soar_cAddGlobalCallback -- Add a callback onto the specified global callback stack. | |
| void | soar_cRemoveGlobalCallback (SOAR_GLOBAL_CALLBACK_TYPE callback_type, soar_callback_id id) |
| soar_cRemoveGlobalCallback -- Remove a callback onto the specified /global/ callback stack. | |
| void | soar_cListAllCallbacks (soar_callback_agent the_agent, bool monitorable_only) |
| soar_cListAllCallbacks -- List the callbacks registered to the agent | |
| void | soar_cListAllCallbacksForEvent (soar_callback_agent the_agent, SOAR_CALLBACK_TYPE ct) |
| soar_cListAllCallbacksForEvent -- List the all callbacks of a specific type registered to the agent | |
| void | soar_cRemoveAllMonitorableCallbacks (soar_callback_agent the_agent) |
| soar_cRemoveAllMonitorableCallbacks -- Remove all of the callbacks (other than PRINT or LOG callbacks) registered to the specified agent | |
| void | soar_cRemoveAllCallbacksForEvent (soar_callback_agent the_agent, SOAR_CALLBACK_TYPE ct) |
| soar_cRemoveAllCallbacksForEvent -- Remove all of the callbacks of a specified type which have been registered to the specified agent | |
| void | soar_cTestAllMonitorableCallbacks (soar_callback_agent the_agent) |
| soar_cTestAllMonitorableCallbacks -- Register a simple print function on all the monitorable callback stacks (all but PRINT and LOG). | |
| SOAR_CALLBACK_TYPE | soar_cCallbackNameToEnum (const char *name, bool monitorable_only) |
| soar_cCallbackNameToEnum -- Return the enumerated type (the callback type) given an event name. | |
| char * | soar_cGetWmeId (psoar_wme w, char *buff, size_t buff_size) |
| soar_cGetWmeId -- An accessor function for a psoar_wme. | |
| char * | soar_cGetWmeAttr (psoar_wme w, char *buff, size_t buff_size) |
| soar_cGetWmeAttr -- An accessor function for a psoar_wme. | |
| char * | soar_cGetWmeValue (psoar_wme w, char *buff, size_t buff_size) |
| soar_cGetWmeValue -- An accessor function for a psoar_wme. | |
| unsigned long | soar_cGetWmeTimetag (psoar_wme w) |
| soar_cGetWmeTimetag -- An accessor function for a psoar_wme. | |
| unsigned long | soar_cAddIntWme (char *szId, char *szAttr, int value, bool acceptable, psoar_wme *w) |
| soar_cAddIntWme -- A wrapper for the soar_cAddWme() function which allows easy addition of a wme whose value is an integer. | |
| unsigned long | soar_cAddFloatWme (char *szId, char *szAttr, float value, bool acceptable, psoar_wme *w) |
| soar_cAddFloatWme -- A wrapper for the soar_cAddWme() function which allows easy addition of a wme whose value is a float | |
| void | soar_cInitAgentIterator (soar_apiAgentIterator *ai) |
| soar_cInitAgentIterator -- Fill in a soar_apiAgentIterator structure for first use. | |
| bool | soar_cStepAgentIterator (soar_apiAgentIterator *ai) |
| soar_cStepAgentIterator -- Increment an agent iterator srtucture. | |
| psoar_agent | soar_cGetAgentByName (char *name) |
| soar_cGetAgentByName -- Get a pointer to a soar agent | |
| int | soar_cGetIdForAgentByName (char *name) |
| soar_cGetIdForAgentByName -- Get the unique id of a particular agent | |
| bool | soar_cSetCurrentAgentByName (char *name) |
| soar_cSetCurrentAgentByName -- Set the 'current agent'. | |
| void | soar_cSetCurrentAgent (psoar_agent a) |
| soar_cSetCurrentAgent -- Set the 'current agent'. | |
| psoar_agent | soar_cGetCurrentAgent () |
| soar_cGetCurrentAgent -- Get the 'current agent'. | |
| char * | soar_cGetAgentInputLinkId (psoar_agent a, char *buff, size_t buff_size) |
| soar_cGetAgentInputLinkId -- * An accessor function for a psoar_agent. | |
| char * | soar_cGetAgentOutputLinkId (psoar_agent a, char *buff, size_t buff_size) |
| soar_cGetAgentOutputLinkId -- * An accessor function for a psoar_agent. | |
| int | soar_cGetAgentId (psoar_agent a) |
| soar_cGetAgentId -- * An accessor function for a psoar_agent. | |
| void | soar_cDefaultAskCallback (soar_callback_agent the_agent, soar_callback_data data, soar_call_data call_data) |
Variables | |
| char * | soar_callback_names [] |
| int | soar_agent_ids [] |
| int | agent_counter |
| soar_global_callback_array | soar_global_callbacks |
Copyright 1995-2003 Carnegie Mellon University, University of Michigan, University of Southern California/Information Sciences Institute. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE SOAR CONSORTIUM ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE SOAR CONSORTIUM OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of Carnegie Mellon University, the University of Michigan, the University of Southern California/Information Sciences Institute, or the Soar consortium. =======================================================================
Definition in file soar_core_api.c.
|
|
Referenced by remove_input_wme(), run_preference_semantics(), and soar_cRemoveWme(). |
|
||||||||||||
|
||||||||||||||||||||||||||||
|
soar_cAddCallback -- Add a callback onto the specified callback stack. Unlike soar_cPushCallback(), this function is also designed for callback which will be registered for a longer term. Each callback must have an id string which is assumed to be unique within the specified callback stack. This string is used later, for removal.
Definition at line 1722 of file soar_core_api.c. References agent, callback_struct::data, callback_struct::free_function, callback_struct::function, callback_struct::id, soar_callback, soar_callback_agent, soar_callback_data, soar_callback_fn, soar_callback_free_fn, and soar_callback_id. Referenced by soar_cAddInputFunction(), soar_cAddOutputFunction(), and soar_cTestAllMonitorableCallbacks(). |
|
||||||||||||||||||||||||
|
soar_cAddFloatWme -- A wrapper for the soar_cAddWme() function which allows easy addition of a wme whose value is a float
Definition at line 2081 of file soar_core_api.c. References psoar_wme, and soar_cAddWme(). |
|
||||||||||||||||||||||||
|
soar_cAddGlobalCallback -- Add a callback onto the specified global callback stack. Unlike soar_cAddCallback(), this function adds to an agent independent callback stack. Note that this does not add the callback to each agent's callback stack, but rather specifies a new set of callback stacks which are agent-independent.
Definition at line 1838 of file soar_core_api.c. References cons, callback_struct::data, cons_struct::first, callback_struct::free_function, callback_struct::function, callback_struct::id, cons_struct::rest, soar_callback, soar_callback_data, soar_callback_fn, soar_callback_free_fn, soar_callback_id, and soar_global_callbacks. |
|
||||||||||||||||||||||||
|
soar_cAddInputFunction -- Adds an input function to the specified agent.
This is called during each input phase. This function is really just a wrapper for the more general soar_cAddCallback() using the
Definition at line 1610 of file soar_core_api.c. References agent, INPUT_PHASE_CALLBACK, soar_cAddCallback(), soar_callback_data, soar_callback_fn, and soar_callback_free_fn. Referenced by add_input_function(), and soar_ecReplayInput(). |
|
||||||||||||||||||||||||
|
soar_cAddIntWme -- A wrapper for the soar_cAddWme() function which allows easy addition of a wme whose value is an integer.
Definition at line 2070 of file soar_core_api.c. References psoar_wme, and soar_cAddWme(). |
|
||||||||||||||||||||||||
|
soar_cAddOutputFunction -- Similar to soar_cAddInputFunction(), but adds a function which is called durnig each output phase.
This function is really just a wrapper for the more general soar_cAddCallback() using the
Definition at line 1639 of file soar_core_api.c. References agent, control_c_handler(), OUTPUT_PHASE_CALLBACK, print(), soar_cAddCallback(), soar_callback_data, soar_callback_fn, soar_callback_free_fn, and soar_exists_callback_id(). Referenced by add_output_function(). |
|
||||||||||||||||||||||||
|
soar_cAddWme -- Add a working memory element to the current agent's working memory.
Definition at line 770 of file soar_core_api.c. References ADD_WME, add_wme_to_wm(), wme_struct::attr, sapiwme_st::attr, capture_input_wme(), do_buffered_wm_and_ownership_changes(), FLOAT_CONSTANT_LEXEME, get_lexeme_from_string(), symbol_union::id, wme_struct::id, sapiwme_st::id, IDENTIFIER_LEXEME, INPUT_PHASE, identifier_struct::input_wmes, INT_CONSTANT_LEXEME, identifier_struct::level, make_float_constant(), make_int_constant(), make_new_identifier(), make_sym_constant(), make_wme(), psoar_wme, read_id_or_context_var_from_string(), read_identifier_or_context_variable(), SOAR_ERROR, soarapi_wme, start_timer(), stop_timer(), string_match(), SYM_CONSTANT_LEXEME, Symbol, sapiwme_st::timetag, wme_struct::timetag, wme_struct::value, sapiwme_st::value, VARIABLE_LEXEME, and wme. Referenced by replay_input_wme(), soar_AddWme(), soar_cAddFloatWme(), and soar_cAddIntWme(). |
|
|
soar_cAttributePreferencesMode -- Determine how preferences for non-context slots should be handled.
Definition at line 1544 of file soar_core_api.c. Referenced by soar_AttributePreferencesMode(). |
|
||||||||||||
|
soar_cCallbackNameToEnum -- Return the enumerated type (the callback type) given an event name.
Definition at line 1973 of file soar_core_api.c. References NO_CALLBACK, NUMBER_OF_CALLBACKS, soar_callback_names, and SOAR_CALLBACK_TYPE. Referenced by soar_callback_name_to_enum(). |
|
|
soar_cCreateAgent -- Create a new soar agent with the specified name.
Definition at line 290 of file soar_core_api.c. References GLB_CREATE_AGENT, soar_call_data, soar_default_create_agent_procedure(), soar_exists_global_callback(), and soar_invoke_global_callbacks(). Referenced by create_soar_agent(), and soar_CreateAgent(). |
|
||||||||||||||||
|
Definition at line 2249 of file soar_core_api.c. References preference_struct::next_candidate, preference, print(), print_object_trace(), print_string_to_log_file_only(), set_sysparam(), soar_apiAskCallbackData, soar_call_data, soar_callback_agent, soar_callback_data, and preference_struct::value. |
|
|
soar_cDestroyAgentByAddress -- Destroy an agent, given a pointer to it.
Definition at line 512 of file soar_core_api.c. References GLB_DESTROY_AGENT, psoar_agent, soar_call_data, soar_default_destroy_agent_procedure(), soar_exists_global_callback(), and soar_invoke_global_callbacks(). Referenced by destroy_soar_agent(), soar_cDestroyAgentById(), soar_cDestroyAgentByName(), and soar_cDestroyAllAgentsWithName(). |
|
|
soar_cDestroyAgentById -- Destroy an agent, given its unique id. There is a one to one correspondence between agents and ids. Ids are assigned when an agent is created, in increasing (but cyclical) order. The id of a particular agent can be retrieved using soar_cGetIdForAgentByName(). Although slightly less efficient than using a pointer to the psoar_agent structure itself, the agent id gives increased security by encapsulating all the sensitive agent data from the user of the api.
Definition at line 534 of file soar_core_api.c. References agent, all_soar_agents, cons, cons_struct::first, psoar_agent, cons_struct::rest, and soar_cDestroyAgentByAddress(). |
|
|
soar_cDestroyAgentByName -- Destroy an agent, given its name
Definition at line 449 of file soar_core_api.c. References agent, all_soar_agents, cons, cons_struct::first, psoar_agent, cons_struct::rest, soar_cDestroyAgentByAddress(), and string_match(). Referenced by soar_DestroyAgent(). |
|
|
soar_cDestroyAllAgentsWithName -- Destroy a set of agents, given a name.
Definition at line 482 of file soar_core_api.c. References agent, all_soar_agents, cons, cons_struct::first, psoar_agent, cons_struct::rest, soar_cDestroyAgentByAddress(), and string_match(). |
|
||||||||||||
|
soar_cDetermineTimerResolution -- Determine the resolution of the system timers Soar uses to gather statistics.
Definition at line 1221 of file soar_core_api.c. References reset_timer(), start_timer(), stop_timer(), and timer_value(). Referenced by printTimingInfo(). |
|
|
soar_cExciseAllProductions -- Remove all productions from the agents memory and ReInitialize the agent.
Definition at line 1133 of file soar_core_api.c. References soar_cExciseAllProductionsOfType(), and soar_cReInitSoar(). Referenced by soar_Excise(). |
|
|
soar_cExciseAllProductionsOfType -- Remove all productions of a specific type from the agents memory and ReInitialize the agent.
Definition at line 1172 of file soar_core_api.c. References byte, and excise_production(). Referenced by soar_cExciseAllProductions(), soar_cExciseAllTaskProductions(), and soar_Excise(). |
|
|
soar_cExciseAllTaskProductions -- Remove all but default productions from the agents memory and ReInitialize the agent.
Definition at line 1154 of file soar_core_api.c. References soar_cExciseAllProductionsOfType(), and soar_cReInitSoar(). Referenced by soar_Excise(). |
|
|
soar_cExciseProductionByName -- Remove the production with the specified name.
Definition at line 1188 of file soar_core_api.c. References excise_production(), name_to_production(), and production. Referenced by soar_Excise(). |
|
|
soar_cGetAgentByName -- Get a pointer to a soar agent This function locates a specific agent, and returns a generic pointer to it. Note that the current agent is not affected.
Definition at line 2130 of file soar_core_api.c. References agent, all_soar_agents, cons, cons_struct::first, psoar_agent, and cons_struct::rest. Referenced by create_soar_agent(), soar_cGetIdForAgentByName(), and soar_cSetCurrentAgentByName(). |
|
|
soar_cGetAgentId -- * An accessor function for a psoar_agent. Returns a string containing the agent's unique integer ID. This integer is in the range 0 ... MAX_SIMULTANEOUS_AGENTS and no two agents have the same identifier.
Definition at line 2231 of file soar_core_api.c. References agent, and psoar_agent. |
|
||||||||||||||||
|
soar_cGetAgentInputLinkId -- * An accessor function for a psoar_agent. Returns a string containing the ID of agent's input-link. Note that memory to hold the string has been allocated within this function and must later be freed by the user when it is no longer in use.
Definition at line 2189 of file soar_core_api.c. References agent, psoar_agent, and symbol_to_string(). |
|
||||||||||||||||
|
soar_cGetAgentOutputLinkId -- * An accessor function for a psoar_agent. Returns a string containing the ID of agent's output-link. Note that memory to hold the string has been allocated within this function and must later be freed by the user when it is no longer in use.
Definition at line 2210 of file soar_core_api.c. References agent, psoar_agent, and symbol_to_string(). |
|
|
soar_cGetCurrentAgent -- Get the 'current agent'.
Definition at line 2173 of file soar_core_api.c. References psoar_agent, and soar_agent. |
|
|
soar_cGetIdForAgentByName -- Get the unique id of a particular agent This function locates a specific agent, and returns its unique identifier.
Definition at line 2143 of file soar_core_api.c. References agent, psoar_agent, and soar_cGetAgentByName(). |
|
||||||||||||||||
|
soar_cGetWmeAttr -- An accessor function for a psoar_wme. Returns a string containing the Attribute of the specified wme. Note that memory to hold the string has been allocated within this function and must later be freed by the user when it is no longer in use.
Definition at line 2032 of file soar_core_api.c. References psoar_wme, symbol_to_string(), and wme. |
|
||||||||||||||||
|
soar_cGetWmeId -- An accessor function for a psoar_wme. Returns a string containing the ID of the specified wme. Note that memory to hold the string has been allocated within this function and must later be freed by the user when it is no longer in use.
Definition at line 2017 of file soar_core_api.c. References psoar_wme, symbol_to_string(), and wme. |
|
|
soar_cGetWmeTimetag -- An accessor function for a psoar_wme.
Definition at line 2064 of file soar_core_api.c. |
|
||||||||||||||||
|
soar_cGetWmeValue -- An accessor function for a psoar_wme. Returns a string containing the Value of the specified wme. Note that memory to hold the string has been allocated within this function and must later be freed by the user when it is no longer in use.
Definition at line 2048 of file soar_core_api.c. References psoar_wme, symbol_to_string(), and wme. |
|
|
soar_cInitAgentIterator -- Fill in a soar_apiAgentIterator structure for first use. This structure is used to facilitate looping through all soar agents beginning with the currently selected agent.
Definition at line 2091 of file soar_core_api.c. References soar_apiAgentIter_struct::_begin, soar_apiAgentIter_struct::_current, agent, agent_count, all_soar_agents, cons, cons_struct::first, soar_apiAgentIter_struct::more, print(), cons_struct::rest, soar_agent, and soar_apiAgentIterator. |
|
||||||||||||
|
soar_cInitializeDCHistogram -- Prepare an array of time structures which will be used to store the time executing a sets of decision cycles. Note that a a seperate timer is used for this. This may be useful when the resolution of the timers is too rough to be useful at the level of a single decision cycle
Definition at line 1287 of file soar_core_api.c. References reset_timer(). |
|
|
soar_cInitializeKTHistogram -- Prepare an array of time structures which will be used to store the kernel time executing a each successive decision cycle. Unlike the DCHistogram, this one uses the kernel timer, and updates onces per decision cycle
Definition at line 1317 of file soar_core_api.c. References reset_timer(). |
|
|
soar_cInitializeSoar -- Initialize Soar for the very first time. This should be the first Soar related function called, and it should only be called once. Definition at line 120 of file soar_core_api.c. References setup_signal_handling(), soar_agent_ids, soar_init_global_callbacks(), soar_version_string, and UNTOUCHED. Referenced by init_soar(). |
|
||||||||||||
|
soar_cListAllCallbacks -- List the callbacks registered to the agent
Definition at line 1901 of file soar_core_api.c. References NUMBER_OF_CALLBACKS, print(), soar_callback_agent, soar_callback_enum_to_name(), SOAR_CALLBACK_TYPE, and soar_cListAllCallbacksForEvent(). Referenced by soar_list_all_callbacks(). |
|
||||||||||||
|
soar_cListAllCallbacksForEvent -- List the all callbacks of a specific type registered to the agent
Definition at line 1919 of file soar_core_api.c. References agent, cons, cons_struct::first, callback_struct::id, print(), cons_struct::rest, soar_callback, and soar_callback_agent. Referenced by soar_cListAllCallbacks(), and soar_list_all_callbacks_for_event(). |
|
|
soar_cLoadReteNet -- Load a Rete Network into the agent from a specified file.
Definition at line 600 of file soar_core_api.c. References allocate_memory(), free_memory(), load_rete_net(), print(), SOAR_ERROR, and SOAR_OK. Referenced by soar_ReteNet(). |
|
||||||||||||
|
soar_cMultiAttributes -- Modify the multi-attributes setting.
Definition at line 1499 of file soar_core_api.c. References allocate_memory(), get_lexeme_from_string(), make_sym_constant(), multi_attribute, multi_attributes_struct::next, SYM_CONSTANT_LEXEME, Symbol, multi_attributes_struct::symbol, and multi_attributes_struct::value. Referenced by soar_MultiAttributes(). |
|
||||||||||||
|
soar_cPopCallback -- Pops off the last callback to be added to the specified callback stack. This function is used to remove temporary callbacks added with soar_cPushCallback().
Definition at line 1745 of file soar_core_api.c. References agent, cons_struct::first, list, PRINT_CALLBACK, print_string(), cons_struct::rest, soar_callback, soar_callback_agent, and soar_destroy_callback(). Referenced by soar_cQuit(), and soar_ecCloseLog(). |
|
||||||||||||||||||||||||
|
soar_cPushCallback -- Push a callback onto the specified callback stack. This is designed for callbacks that will only be regisstered temporarily becuase they do not have a registration name. As a result, the only way to remove these callbacks is using the soar_cPopCallback() function which can be problematic if other callbacks have been added in the meantime.
Definition at line 1693 of file soar_core_api.c. References agent, callback_struct::data, callback_struct::free_function, callback_struct::function, callback_struct::id, soar_callback, soar_callback_agent, soar_callback_data, soar_callback_fn, and soar_callback_free_fn. Referenced by soar_ecOpenLog(). |
|
|
soar_cQuit -- Quit Soar. This function should be called when Soar (or the application it is embedded within is just about to exit).
Definition at line 558 of file soar_core_api.c. References just_before_exit_soar(), LOG_CALLBACK, soar_agent, soar_cPopCallback(), soar_exists_callback(), and soar_invoke_first_callback(). Referenced by soar_Quit(). |
|
|
soar_cReInitSoar -- Reset Soar (and agents) to the initial state. This function reinitializes Soar by clearing the working memory of all agents and preparing them for a "new" execution. In essence, they are put back into the same state as if Soar were just started, and the agents were newly loaded.
Definition at line 171 of file soar_core_api.c. References AFTER_INIT_SOAR_CALLBACK, BEFORE_INIT_SOAR_CALLBACK, clear_goal_stack(), do_preference_phase(), GO_DECISION, INPUT_PHASE, reset_explain(), reset_id_counters(), reset_statistics(), reset_wme_timetags(), set_sysparam(), soar_agent, soar_call_data, and soar_invoke_callbacks(). Referenced by reinitialize_soar(), soar_cExciseAllProductions(), soar_cExciseAllTaskProductions(), soar_cSetOperand2(), and soar_ReInitSoar(). |
|
||||||||||||
|
soar_cRemoveAllCallbacksForEvent -- Remove all of the callbacks of a specified type which have been registered to the specified agent
Definition at line 1941 of file soar_core_api.c. References agent, cons, cons_struct::first, list, soar_callback, soar_callback_agent, and soar_destroy_callback(). Referenced by soar_cRemoveAllMonitorableCallbacks(), and soar_remove_all_callbacks_for_event(). |
|
|
soar_cRemoveAllMonitorableCallbacks -- Remove all of the callbacks (other than PRINT or LOG callbacks) registered to the specified agent
Definition at line 1932 of file soar_core_api.c. References soar_callback_agent, SOAR_CALLBACK_TYPE, and soar_cRemoveAllCallbacksForEvent(). Referenced by soar_remove_all_monitorable_callbacks(). |
|
||||||||||||||||
|
soar_cRemoveCallback -- Remove the callback from the specified callback stack which has the specified id.
Definition at line 1778 of file soar_core_api.c. References agent, cons, cons_struct::first, callback_struct::id, list, cons_struct::rest, soar_callback, soar_callback_agent, soar_callback_id, and soar_destroy_callback(). Referenced by soar_cRemoveInputFunction(), and soar_cRemoveOutputFunction(). |
|
||||||||||||
|
soar_cRemoveGlobalCallback -- Remove a callback onto the specified /global/ callback stack.
Definition at line 1871 of file soar_core_api.c. References cons, cons_struct::first, callback_struct::id, list, cons_struct::rest, soar_callback, soar_callback_id, soar_destroy_callback(), and soar_global_callbacks. |
|
||||||||||||
|
soar_cRemoveInputFunction -- Remove an input function with the specified name. Since the name is used to do the removal, it is a good idea if these functions have unique names to begin with!
Definition at line 1625 of file soar_core_api.c. References agent, INPUT_PHASE_CALLBACK, and soar_cRemoveCallback(). Referenced by remove_input_function(), and soar_ecReplayInput(). |
|
||||||||||||
|
soar_cRemoveOutputFunction -- Remove an output function with the specified name. It is critical that the specified name corresponds to the output-link's symbol.
Definition at line 1660 of file soar_core_api.c. References agent, output_link_struct::cb, agent_struct::existing_output_links, output_link_struct::link_wme, output_link_struct::next, output_link, wme_struct::output_link, agent_struct::output_link_pool, OUTPUT_PHASE_CALLBACK, soar_callback, soar_cRemoveCallback(), and soar_exists_callback_id(). Referenced by remove_output_function(). |
|
|
|
soar_cRemoveWmeUsingTimetag -- Remove a working memory element, given its timetag.
Definition at line 979 of file soar_core_api.c. References wme_struct::rete_next, soar_cRemoveWme(), wme_struct::timetag, and wme. Referenced by replay_input_wme(), and soar_RemoveWme(). |
|
||||||||||||||||||||
|
soar_cRun -- Run the current agent, or all agents for a specified period ...
Definition at line 311 of file soar_core_api.c. References agent, all_soar_agents, cons, cons_struct::first, GO_DECISION, GO_ELABORATION, GO_OPERATOR, GO_OUTPUT, GO_PHASE, GO_SLOT, GO_STATE, identifier_struct::higher_goal, symbol_union::id, identifier_struct::level, NO_SLOT, OPERATOR_SLOT, agent_struct::operator_symbol, cons_struct::rest, run_all_agents(), run_for_n_decision_cycles(), run_for_n_elaboration_cycles(), run_for_n_modifications_of_output(), run_for_n_phases(), run_for_n_selections_of_slot(), slot, soar_agent, STATE_SLOT, agent_struct::state_symbol, SUPEROPERATOR_SLOT, SUPERSTATE_SLOT, SUPERSUPEROPERATOR_SLOT, SUPERSUPERSTATE_SLOT, and Symbol. |
|
|
soar_cSaveReteNet -- Save a Rete Network from the agent into a specified file.
Definition at line 699 of file soar_core_api.c. References allocate_memory(), free_memory(), print(), save_rete_net(), SOAR_ERROR, and SOAR_OK. Referenced by soar_ReteNet(). |
|
|
soar_cSetChunkNameCount -- Set the chunk count. This must be greater than zero, less than max chunks and greater than the current chunk count.
Definition at line 1363 of file soar_core_api.c. Referenced by soar_ChunkNameFormat(). |
|
|
soar_cSetChunkNameLong -- Set long or short chunk names according to the specified parameter
Definition at line 1345 of file soar_core_api.c. References set_sysparam(). Referenced by soar_ChunkNameFormat(). |
|
|
soar_cSetChunkNamePrefix -- Set the chunk name prefix. This is a string which is used to descriminate chunks from user productions.
Definition at line 1389 of file soar_core_api.c. Referenced by soar_ChunkNameFormat(). |
|
|
soar_cSetCurrentAgent -- Set the 'current agent'. This function changes the agent that will be affected by subsequent API function calls
Definition at line 2167 of file soar_core_api.c. References agent, psoar_agent, and soar_agent. |
|
|
soar_cSetCurrentAgentByName -- Set the 'current agent'. This function changes the agent that will be affected by subsequent API function calls
Definition at line 2155 of file soar_core_api.c. References agent, psoar_agent, soar_agent, and soar_cGetAgentByName(). |
|
|
soar_cSetLearning -- Adjust the learning settings.
Definition at line 1410 of file soar_core_api.c. References ALL_LEVELS, BOTTOM_UP, EXCEPT, OFF, ON, ONLY, and set_sysparam(). Referenced by soar_Learn(). |
|
|
soar_cSetOperand2 -- Toggles from Soar7 to Soar8 execution mode.
Definition at line 1453 of file soar_core_api.c. References soar_cReInitSoar(). Referenced by soar_Operand2(). |
|
|
soar_cSetWaitSNC -- Determine whether Soar should generate explict state-no-change impasses.
Definition at line 1483 of file soar_core_api.c. Referenced by soar_WaitSNC(). |
|
|
soar_cStepAgentIterator -- Increment an agent iterator srtucture. This function increments the agent iterator by one, and signals whether more agents still need to be iterated through. Its results are based on the state of the specified agentIterator.
Definition at line 2110 of file soar_core_api.c. References soar_apiAgentIter_struct::_begin, soar_apiAgentIter_struct::_current, all_soar_agents, cons_struct::first, soar_apiAgentIter_struct::more, cons_struct::rest, soar_agent, and soar_apiAgentIterator. |
|
|
soar_cStopAllAgents -- Stops all agents.
Definition at line 416 of file soar_core_api.c. References control_c_handler(). Referenced by soar_Stop(). |
|
|
soar_cStopCurrentAgent -- Stops the current agent.
Definition at line 430 of file soar_core_api.c. Referenced by soar_Stop(). |
|
|
soar_cTestAllMonitorableCallbacks -- Register a simple print function on all the monitorable callback stacks (all but PRINT and LOG). This is helpful to ensure that callbacks are getting issued as expected.
Definition at line 1961 of file soar_core_api.c. References soar_cAddCallback(), soar_callback_agent, soar_callback_enum_to_name(), soar_callback_fn, SOAR_CALLBACK_TYPE, and soar_cTestCallback(). Referenced by soar_test_all_monitorable_callbacks(). |
|
||||||||||||||||
|
Definition at line 2240 of file soar_core_api.c. References print(), soar_call_data, soar_callback_agent, and soar_callback_data. Referenced by soar_cTestAllMonitorableCallbacks(). |
|
|
Definition at line 94 of file soar_core_api.c. |
|
|
Definition at line 93 of file soar_core_api.c. |
|
|
Definition at line 51 of file soar_core_api.c. Referenced by soar_callback_enum_to_name(), and soar_cCallbackNameToEnum(). |
|
|
Definition at line 95 of file soar_core_api.c. |
1.3.5