This function returns true if the callback function was successfully added otherwise, it returns false. The priority parameter determines the order in which the callback functions are invoked (higher priority items are called first) the values -2000 to 2000 are reserved for internal use by CLIPS. Parameter env is a pointer to a previously created environment parameter name is a string that uniquely identifies the callback for removal using RemoveBeforeRuleFiresFunction parameter f is a pointer to the callback function of type RuleFiredFunction parameter p is the priority of the callback function and parameter context is a user supplied pointer to data that is passed to the callback function when it is invoked (a null pointer should be used if there is no data that needs to be passed to the callback function). The function AddBeforeRuleFiresFunction adds a callback function to the list of functions invoked after a rule executes. Typedef void RuleFiredFunction( Environment env, The relevent section describing the functions from the CLIPS 6.4 Advanced Programming Guide:īool AddBeforeRuleFiresFunction( Environment env,īool AddAfterRuleFiresFunction( Environment env,īool RemoveBeforeRuleFiresFunction( Environment env,īool RemoveAfterRuleFiresFunction( Environment env, * main: Starts execution of the expert */ĪddBeforeRuleFiresFunction(mainEnv,"myBRFF",MyRuleFiredFunction,3000,NULL) Void MyRuleFiredFunction(Environment *,Activation *, void *) Ĭonst char *ruleName = a->theRule->header.name->contents
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |