Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        /// <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);
        }
Esempio n. 3
0
 /// <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);
 }
Esempio n. 4
0
 public static LogEntry Applied(Value what, IFunctionGroup to, Value result)
 {
     return new LogEntry("Applied [" + what + "] to [" + to + "] that returned [" + result + "]");
 }