using SKMC.Api.Recipe.Config; using SKMC.Api.Recipe.Model; using System.Collections.Generic; using System.Collections.ObjectModel; namespace SKMC.Api.Recipe { /// /// 配方数据缓存器 /// public abstract class RecipeCacher { /// /// 当前使用的配方 /// public RecipeProfile RecipeProfile { get; set; } /// /// 流程参数配置集(基础开关型) /// public ObservableCollection GetRecipePublicSwitchParams() => RecipeProfile.RecipePublicSwitchParams; /// /// 流程参数配置集(基础数值型) /// public ObservableCollection GetRecipePublicValueParams() => RecipeProfile.RecipePublicValueParams; /// /// 流程参数配置集(内部开关型) /// public ObservableCollection GetRecipePrivateSwitchParams() => RecipeProfile.RecipePrivateSwitchParams; /// /// 流程参数配置集(内部数值型) /// public ObservableCollection GetRecipePrivateValueParams() => RecipeProfile.RecipePrivateValueParams; /// /// 速度配置集 /// public ObservableCollection GetRecipeSpeeds() => RecipeProfile.RecipeSpeeds; /// /// 点位配置集 /// public ObservableCollection GetRecipePointGroups() => RecipeProfile.RecipePointGroups; /// /// 获取流程参数对象 /// /// /// public abstract RecipeParam GetRecipeParam(string paramCode); /// /// 获取流程参数配置(根据数据库配置加载) /// /// /// public abstract T GetRecipeParamValue(string paramCode); /// /// 获取流程点位 /// /// /// public abstract RecipePoint GetRecipePoint(string code); /// /// 获取流程点位的轴位置数值 /// /// 点位码 /// 点位中多个轴位置的序号, 默认为第一个 /// public abstract double GetRecipePointVal(string code, int index = 0); /// /// 获取流程点位的轴位置数值 /// /// 点位对象 /// 点位中多个轴位置的序号, 默认为第一个 /// public abstract double GetRecipePointVal(RecipePoint recipePoint, int index = 0); /// /// 获取速度配置对象 /// /// 速度码 /// public abstract RecipeSpeed GetRecipeSpeed(string speedCode); } }