156 lines
11 KiB
C#
156 lines
11 KiB
C#
using System.Collections.Generic;
|
|
using static CMS_CORE_Library.DataStructures;
|
|
|
|
namespace CMS_CORE_Library
|
|
{
|
|
public static class ToolConfigurations
|
|
{
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
#region PRIVATE_SELECTS_VALUES
|
|
|
|
private static Dictionary<int, string> toolTypeList = new Dictionary<int, string>()
|
|
{
|
|
{100, "millingTool"},
|
|
{110, "ballNoseEndMill"},
|
|
{111, "conicalBallEnd"},
|
|
{120, "endMill"},
|
|
{121, "endMillCornerRounding"},
|
|
{130, "angleHeadCutter"},
|
|
{131, "cornRoundAngHdCut"},
|
|
{140, "facingTool"},
|
|
{145, "threadCutter"},
|
|
{150, "sideMill"},
|
|
{151, "saw"},
|
|
{155, "bevelledCutter"},
|
|
{156, "bevelledCutterCorner"},
|
|
{157, "tapDieSinkCutter"},
|
|
{160, "drillThreadCut"},
|
|
{200, "twistDrill"},
|
|
{205, "solidDrill"},
|
|
{210, "boringBar"},
|
|
{220, "centerDrill"},
|
|
{230, "counterSink"},
|
|
{231, "counterBore"},
|
|
{240, "tap"},
|
|
{241, "fineTap"},
|
|
{242, "tapWhitworth"},
|
|
{250, "reamer"},
|
|
{700, "slottingSaw"},
|
|
{710, "3Dprobe"},
|
|
{711, "edgeFinder"},
|
|
{712, "monoProbe"},
|
|
{713, "lProbe"},
|
|
{714, "starProbe"},
|
|
{725, "calibratingTool"},
|
|
{730, "stop"},
|
|
{900, "auxiliaryTools"}
|
|
};
|
|
|
|
private static Dictionary<int, string> toolLifeList = new Dictionary<int, string>()
|
|
{
|
|
{(int)SIEMENS_LIFE_TYPE.NONE, "none"},
|
|
{(int)SIEMENS_LIFE_TYPE.TIME, "timeLife"},
|
|
{(int)SIEMENS_LIFE_TYPE.COUNT, "countLife"},
|
|
{(int)SIEMENS_LIFE_TYPE.WEAR, "wearLife"}
|
|
};
|
|
|
|
private static Dictionary<int, string> rotationTypeList = new Dictionary<int, string>()
|
|
{
|
|
{0, "none"},
|
|
{1, "clockWhise"},
|
|
{2, "counterClockWhise"}
|
|
};
|
|
|
|
#endregion PRIVATE_SELECTS_VALUES
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
#region PUBLIC_CONFIGS_FIELDS
|
|
|
|
public static List<FieldsConfiguration> SiemensToolFieldsConfig = new List<FieldsConfiguration>()
|
|
{
|
|
new FieldsConfiguration{Name = "id", Type = "int", SelectValues = null, Category = "general", ReadOnly = true },
|
|
new FieldsConfiguration{Name = "toolType", Type = "select", SelectValues = toolTypeList, Category = "general", ReadOnly = false},
|
|
new FieldsConfiguration{Name = "lifeType", Type = "select", SelectValues = toolLifeList, Category = "general", ReadOnly = false},
|
|
new FieldsConfiguration{Name = "familyName", Type = "string", SelectValues = null, Category = "family", ReadOnly = false },
|
|
new FieldsConfiguration{Name = "childId", Type = "int", SelectValues = null, Category = "family", ReadOnly = true },
|
|
new FieldsConfiguration{Name = "isEnabled", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false},
|
|
new FieldsConfiguration{Name = "isActive", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false},
|
|
new FieldsConfiguration{Name = "isInhibited", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false},
|
|
new FieldsConfiguration{Name = "inFixedPlace", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false},
|
|
new FieldsConfiguration{Name = "isMeasured", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false},
|
|
new FieldsConfiguration{Name = "inChangeTool", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false},
|
|
new FieldsConfiguration{Name = "inUse", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false},
|
|
new FieldsConfiguration{Name = "preAlarm", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false},
|
|
new FieldsConfiguration{Name = "cooling1", Type = "boolean", SelectValues = null, Category = "cooling", ReadOnly = false},
|
|
new FieldsConfiguration{Name = "cooling2", Type = "boolean", SelectValues = null, Category = "cooling" , ReadOnly = false},
|
|
new FieldsConfiguration{Name = "magazinePositionType", Type = "int", SelectValues = null, Category = "magazine", ReadOnly = false},
|
|
new FieldsConfiguration{Name = "leftSize", Type = "int", SelectValues = null, Category = "magazine", ReadOnly = false},
|
|
new FieldsConfiguration{Name = "rightSize", Type = "int", SelectValues = null, Category = "magazine", ReadOnly = false},
|
|
new FieldsConfiguration{Name = "rotation", Type = "select", SelectValues = rotationTypeList, Category = "head", ReadOnly = false},
|
|
new FieldsConfiguration{Name = "maxSpeed", Type = "double", SelectValues = null, Category = "head", ReadOnly = false },
|
|
new FieldsConfiguration{Name = "maxAcceleration", Type = "double", SelectValues = null, Category = "head", ReadOnly = false },
|
|
};
|
|
|
|
public static FamiliesConfiguration SiemensFamilyFieldsConfig = new FamiliesConfiguration()
|
|
{
|
|
FamilyConfiguration = new List<FieldsConfiguration>()
|
|
{
|
|
new FieldsConfiguration{Name = "name", Type = "string", SelectValues = null, Category = "general", ReadOnly = true}
|
|
},
|
|
ToolsConfiguration = new List<FieldsConfiguration>()
|
|
{
|
|
new FieldsConfiguration{Name = "id", Type = "int", SelectValues = null, Category = "general", ReadOnly = true },
|
|
new FieldsConfiguration{Name = "toolType", Type = "select", SelectValues = toolTypeList, Category = "general", ReadOnly = true },
|
|
new FieldsConfiguration{Name = "childId", Type = "int", SelectValues = null, Category = "general", ReadOnly = true}
|
|
}
|
|
};
|
|
|
|
public static ShanksConfiguration SiemensShankFieldsConfig = new ShanksConfiguration()
|
|
{
|
|
ShankConfiguration = new List<FieldsConfiguration>()
|
|
{
|
|
new FieldsConfiguration{Name = "id", Type = "int", SelectValues = null, Category = "general", ReadOnly = true },
|
|
new FieldsConfiguration{Name = "name", Type = "string", SelectValues = null, Category = "general", ReadOnly = false },
|
|
new FieldsConfiguration{Name = "isEnabled", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false},
|
|
new FieldsConfiguration{Name = "isInhibited", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false},
|
|
new FieldsConfiguration{Name = "inFixedPlace", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false},
|
|
new FieldsConfiguration{Name = "inChangeTool", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false},
|
|
new FieldsConfiguration{Name = "inUse", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false},
|
|
new FieldsConfiguration{Name = "leftSize", Type = "int", SelectValues = null, Category = "magazine", ReadOnly = false},
|
|
new FieldsConfiguration{Name = "rightSize", Type = "int", SelectValues = null, Category = "magazine", ReadOnly = false},
|
|
new FieldsConfiguration{Name = "magazinePositionType", Type = "int", SelectValues = null, Category = "magazine", ReadOnly = false},
|
|
},
|
|
ToolsConfiguration = new List<FieldsConfiguration>()
|
|
{
|
|
new FieldsConfiguration{Name = "id", Type = "int", SelectValues = null, Category = "general", ReadOnly = true },
|
|
new FieldsConfiguration{Name = "multitoolId", Type = "int", SelectValues = null, Category = "general", ReadOnly = true },
|
|
new FieldsConfiguration{Name = "familyName", Type = "string", SelectValues = null, Category = "general", ReadOnly = true },
|
|
new FieldsConfiguration{Name = "toolType", Type = "select", SelectValues = toolTypeList, Category = "general", ReadOnly = true }
|
|
}
|
|
};
|
|
|
|
public static List<FieldsConfiguration> SiemensMagazinePosFieldsConfig = new List<FieldsConfiguration>()
|
|
{
|
|
new FieldsConfiguration{Name = "magazineId", Type = "int", SelectValues = null, Category = "general", ReadOnly = true },
|
|
new FieldsConfiguration{Name = "positionId", Type = "int", SelectValues = null, Category = "general", ReadOnly = true },
|
|
new FieldsConfiguration{Name = "type", Type = "int", SelectValues = null, Category = "general", ReadOnly = true },
|
|
new FieldsConfiguration{Name = "disabled", Type = "boolean", SelectValues = null, Category = "general", ReadOnly = true },
|
|
};
|
|
|
|
public static EdgesConfiguration SiemensEdgesFieldsConfiguration = new EdgesConfiguration()
|
|
{
|
|
EdgeConfiguration = new List<FieldsConfiguration>()
|
|
{
|
|
new FieldsConfiguration{Name = "id", Type = "int", SelectValues = null, Category = "general", ReadOnly = true },
|
|
new FieldsConfiguration{Name = "residualLife", Type = "double", SelectValues = null, Category = "life", ReadOnly = false },
|
|
new FieldsConfiguration{Name = "nominalLife", Type = "double", SelectValues = null, Category = "life", ReadOnly = false },
|
|
new FieldsConfiguration{Name = "preAlmLife", Type = "double", SelectValues = null, Category = "life", ReadOnly = false }
|
|
},
|
|
EdgesAdditionalParamsConfiguration = new Dictionary<int, List<string>>() // Set value runtime, based on NC vendor
|
|
};
|
|
|
|
#endregion PUBLIC_CONFIGS_FIELDS
|
|
}
|
|
} |