/// <summary> /// Determines whether or not the function is related to setting the value of variables /// </summary> /// <param name="function_index"></param> /// <returns></returns> bool IsVarSetterFunction(short function_index) { if (function_index != -1) { XmlInterface.FunctionGroup g = State.Definition.GetFunction(function_index).Group; return(g == XmlInterface.FunctionGroup.Set); } return(false); }
/// <summary> /// Determines whether or not the function is a sleep related function (ie sleep_until) /// </summary> /// <param name="function_index"></param> /// <returns></returns> bool IsSleeperFunction(short function_index) { if (function_index != -1) { XmlInterface.FunctionGroup g = State.Definition.GetFunction(function_index).Group; return(g >= XmlInterface.FunctionGroup.Sleep && g < XmlInterface.FunctionGroup.Wake); // all the sleep functions precede wake } return(false); }