public virtual IReturnVector executeFunction(Rete engine, IParameter[] params_Renamed) { IList fgroups = engine.FunctionGroups; IEnumerator itr = fgroups.GetEnumerator(); int counter = 0; while (itr.MoveNext()) { // we iterate over the function groups and print out the // functions in each group IFunctionGroup fg = (IFunctionGroup)itr.Current; engine.writeMessage("++++ " + fg.Name + " ++++" + Constants.LINEBREAK, "t"); IEnumerator listitr = fg.listFunctions().GetEnumerator(); while (listitr.MoveNext()) { IFunction f = (IFunction)listitr.Current; engine.writeMessage(" " + f.Name + Constants.LINEBREAK, "t"); counter++; } } engine.writeMessage(counter + " functions" + Constants.LINEBREAK, "t"); DefaultReturnVector ret = new DefaultReturnVector(); return(ret); }
/// <summary> /// Handles coprocessor write operation /// </summary> /// <param name="in_data"></param> public void CoProcWrite(byte in_data) { IFunctionGroup function_group = m_function_groups[in_data >> 4]; if (m_function_code_expected) { m_function_code_expected = false; if (function_group != null) { CoProcessorRead = function_group.CoProcessorRead; CoProcessorWrite = function_group.CoProcessorWrite; } } CoProcessorWrite?.Invoke(in_data); }
/// <summary> /// Method will register the function of the FunctionGroup . /// </summary> /// <param name="functionGroup">FunctionGroup with the functions to register.</param> public virtual void declareFunctionGroup(IFunctionGroup functionGroup) { functionGroup.loadFunctions(this); }
public static LogEntry Applied(Value what, IFunctionGroup to, Value result) { return new LogEntry("Applied [" + what + "] to [" + to + "] that returned [" + result + "]"); }