#include <sys/param.h>#include <sys/time.h>#include <string.h>#include <stdio.h>#include <stdlib.h>#include <stdarg.h>#include "libicl_private.h"#include "libicl.h"#include "libdb.h"#include "libcom_tcp.h"#include "liboaa.h"#include "dictionary.h"Go to the source code of this file.
Functions | |
| int | oaa_remove_trigger_local (char *type, ICLTerm *condition, ICLTerm *action, ICLTerm *params) |
| int | oaa_add_trigger_local (char *type, ICLTerm *condition, ICLTerm *action, ICLTerm *params) |
| EXTERN int | oaa_solve_local (ICLTerm *full_goal, ICLTerm *params, ICLTerm **solutions) |
| EXTERN ICLTerm * | remove_element (ICLTerm *elt, ICLTerm *list, ICLTerm **rest) |
| EXTERN int | oaa_remove_data_local (ICLTerm *clause1, ICLTerm *params) |
| EXTERN int | oaa_add_data_local (ICLTerm *clause1, ICLTerm *params) |
| EXTERN int | oaa_Inform (ICLTerm *type_info, char *format_string, ICLTerm *args) |
| EXTERN int | icl_param_arg (char *param, ICLTerm *value, ICLTerm *paramlist, ICLTerm **result) |
| Searches for a parameter in a parameter list. | |
| EXTERN int | icl_standardize_params (ICLTerm *Params, int KeepDefaults, ICLTerm **Standardized) |
| Standardizes a permissions list, removing defaults if requested. | |
| EXTERN int | replace_element (ICLTerm *elt, ICLTerm *old_list, ICLTerm *new, ICLTerm **new_list) |
| EXTERN ICLTerm * | valid_oaa_solvables () |
| EXTERN int | oaa_data_matches_solvables (ICLTerm *Clause, ICLTerm *Solvables, ICLTerm *Perm, ICLTerm **RealClause, ICLTerm **RealMatched) |
| Determine whether Clause can be read or written by the agent with these Solvables, and return the "real" form of the clause that takes synonyms into account. | |
| EXTERN int | oaa_class (char *class) |
| EXTERN char * | new_goal_id () |
| EXTERN int | oaa_poll_until_event (ICLTerm *event, ICLTerm **solution) |
| EXTERN int | icl_replace_param_value (ICLTerm *param, ICLTerm *param_list) |
| If param unifies with an element of param list, replace the element with the unified result. | |
| int | oaa_remove_local_trigger_by_id (ICLTerm *trigger_id) |
| Removes a local trigger given its unique identifier. | |
| int | oaa_fire_trigger (ICLTerm *term) |
| int | oaa_CheckTriggers (char *type, ICLTerm *condition_var, char *op) |
| Given a trigger type, a mask and an Op (e.g. | |
| int | oaa_update_trigger (char *mode, char *type, ICLTerm *condition, ICLTerm *action, ICLTerm *in_params, ICLTerm **out_params) |
| int | oaa_AddTrigger (char *type, ICLTerm *condition, ICLTerm *action, ICLTerm *initial_params, ICLTerm **out_params) |
| Adds a trigger according to parameters. | |
| int | oaa_RemoveTrigger (char *type, ICLTerm *condition, ICLTerm *action, ICLTerm *initial_params, ICLTerm **out_params) |
| Removes a trigger from a local or remote agent. | |
Definition in file libtrigger.c.
Searches for a parameter in a parameter list.
Just like icl_ParamValue() except it returns the argument of the result instead of the whole unified term. Returns a newly allocated copy.
Standardizes a permissions list, removing defaults if requested.
Normally there's no need to keep the default value of a param, but there are exceptional situations. If KeepDefaults is true, default values are kept. Standardized is all newly allocated stuff.
| EXTERN char* new_goal_id | ( | ) |
| int oaa_AddTrigger | ( | char * | type, | |
| ICLTerm * | condition, | |||
| ICLTerm * | action, | |||
| ICLTerm * | initial_params, | |||
| ICLTerm ** | out_params | |||
| ) |
Adds a trigger according to parameters.
Type = comm, data, task, time
Condition= comm:event to match, data:data to match, task:solvable to call time:@
Action = Can be any of these:
Params =
Default destination for triggers:
Definition at line 558 of file libtrigger.c.
| int oaa_CheckTriggers | ( | char * | type, | |
| ICLTerm * | condition_var, | |||
| char * | op | |||
| ) |
Given a trigger type, a mask and an Op (e.g.
[send, receive], [add, remove], etc), see if any triggers fire.
Definition at line 99 of file libtrigger.c.
| EXTERN int oaa_class | ( | char * | class | ) |
| EXTERN int oaa_data_matches_solvables | ( | ICLTerm * | Clause, | |
| ICLTerm * | Solvables, | |||
| ICLTerm * | Perm, | |||
| ICLTerm ** | RealClause, | |||
| ICLTerm ** | RealMatched | |||
| ) |
Determine whether Clause can be read or written by the agent with these Solvables, and return the "real" form of the clause that takes synonyms into account.
| Clause | must be non-compound (basic) to match: no address, no params, no subClauses. | |
| Solvables | must be in standard form. | |
| Perm | is 'read' or 'write'. | |
| RealClause | is what should actually be used (asserted, retracted, replaced). | |
| RealMatched | is the solvable record corresponding to RealClause. |
| int oaa_fire_trigger | ( | ICLTerm * | term | ) |
Definition at line 274 of file libtrigger.c.
| int oaa_remove_local_trigger_by_id | ( | ICLTerm * | trigger_id | ) |
| int oaa_remove_trigger_local | ( | char * | type, | |
| ICLTerm * | condition, | |||
| ICLTerm * | action, | |||
| ICLTerm * | params | |||
| ) |
| int oaa_update_trigger | ( | char * | mode, | |
| char * | type, | |||
| ICLTerm * | condition, | |||
| ICLTerm * | action, | |||
| ICLTerm * | in_params, | |||
| ICLTerm ** | out_params | |||
| ) |
Definition at line 353 of file libtrigger.c.
| EXTERN int replace_element | ( | ICLTerm * | elt, | |
| ICLTerm * | old_list, | |||
| ICLTerm * | new, | |||
| ICLTerm ** | new_list | |||
| ) |