Files
cms-core-active/CMS_CORE_Library/ToolConfigurations.cs
T
Lucio Maranta 79abc2be3f General fixes
2018-05-29 15:34:13 +00:00

156 lines
13 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, MinValue = 0, MaxValue = 0},
new FieldsConfiguration{ Name = "toolType", Type = "select", SelectValues = toolTypeList, Category = "general", ReadOnly = false, MinValue = 0, MaxValue = 0},
new FieldsConfiguration{ Name = "lifeType", Type = "select", SelectValues = toolLifeList, Category = "life", ReadOnly = false, MinValue = 0, MaxValue = 0},
new FieldsConfiguration{ Name = "familyName", Type = "string", SelectValues = null, Category = "family", ReadOnly = false, MinValue = 0, MaxValue = 0 },
new FieldsConfiguration{ Name = "childId", Type = "int", SelectValues = null, Category = "family", ReadOnly = true, MinValue = 0, MaxValue = 0 },
new FieldsConfiguration{ Name = "isEnabled", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false, MinValue = 0, MaxValue = 0},
new FieldsConfiguration{ Name = "isActive", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false, MinValue = 0, MaxValue = 0},
new FieldsConfiguration{ Name = "isInhibited", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false, MinValue = 0, MaxValue = 0},
new FieldsConfiguration{ Name = "inFixedPlace", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false, MinValue = 0, MaxValue = 0},
new FieldsConfiguration{ Name = "isMeasured", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false, MinValue = 0, MaxValue = 0},
new FieldsConfiguration{ Name = "inChangeTool", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false, MinValue = 0, MaxValue = 0},
new FieldsConfiguration{ Name = "inUse", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false, MinValue = 0, MaxValue = 0},
new FieldsConfiguration{ Name = "preAlarm", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false, MinValue = 0, MaxValue = 0},
new FieldsConfiguration{ Name = "cooling1", Type = "boolean", SelectValues = null, Category = "cooling", ReadOnly = false, MinValue = 0, MaxValue = 0},
new FieldsConfiguration{ Name = "cooling2", Type = "boolean", SelectValues = null, Category = "cooling" , ReadOnly = false, MinValue = 0, MaxValue = 0},
new FieldsConfiguration{ Name = "magazinePositionType", Type = "int", SelectValues = null, Category = "magazine", ReadOnly = false, MinValue = 1, MaxValue = 7},
new FieldsConfiguration{ Name = "leftSize", Type = "int", SelectValues = null, Category = "magazine", ReadOnly = false, MinValue = 1, MaxValue = 7},
new FieldsConfiguration{ Name = "rightSize", Type = "int", SelectValues = null, Category = "magazine", ReadOnly = false, MinValue = 1, MaxValue = 7},
new FieldsConfiguration{ Name = "rotation", Type = "select", SelectValues = rotationTypeList, Category = "head", ReadOnly = false, MinValue = 0, MaxValue = 0},
new FieldsConfiguration{ Name = "maxSpeed", Type = "double", SelectValues = null, Category = "head", ReadOnly = false, MinValue = 0, MaxValue = int.MaxValue },
new FieldsConfiguration{ Name = "maxAcceleration", Type = "double", SelectValues = null, Category = "head", ReadOnly = false, MinValue = 0, MaxValue = int.MaxValue },
};
public static FamiliesConfiguration SiemensFamilyFieldsConfig = new FamiliesConfiguration()
{
FamilyConfiguration = new List<FieldsConfiguration>()
{
new FieldsConfiguration{ Name = "name", Type = "string", SelectValues = null, Category = "general", ReadOnly = true, MinValue = 0, MaxValue = 0}
},
ToolsConfiguration = new List<FieldsConfiguration>()
{
new FieldsConfiguration{ Name = "id", Type = "int", SelectValues = null, Category = "general", ReadOnly = true, MinValue = 0, MaxValue = 0 },
new FieldsConfiguration{ Name = "toolType", Type = "select", SelectValues = toolTypeList, Category = "general", ReadOnly = true, MinValue = 0, MaxValue = 0 },
new FieldsConfiguration{ Name = "childId", Type = "int", SelectValues = null, Category = "general", ReadOnly = true, MinValue = 0, MaxValue = 0}
}
};
public static ShanksConfiguration SiemensShankFieldsConfig = new ShanksConfiguration()
{
ShankConfiguration = new List<FieldsConfiguration>()
{
new FieldsConfiguration{ Name = "id", Type = "int", SelectValues = null, Category = "general", ReadOnly = true, MinValue = 0, MaxValue = 0 },
new FieldsConfiguration{ Name = "name", Type = "string", SelectValues = null, Category = "general", ReadOnly = false, MinValue = 0, MaxValue = 0 },
new FieldsConfiguration{ Name = "isEnabled", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false, MinValue = 0, MaxValue = 0 },
new FieldsConfiguration{ Name = "isInhibited", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false, MinValue = 0, MaxValue = 0 },
new FieldsConfiguration{ Name = "inFixedPlace", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false, MinValue = 0, MaxValue = 0 },
new FieldsConfiguration{ Name = "inChangeTool", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false, MinValue = 0, MaxValue = 0 },
new FieldsConfiguration{ Name = "inUse", Type = "boolean", SelectValues = null, Category = "state", ReadOnly = false, MinValue = 0, MaxValue = 0 },
new FieldsConfiguration{ Name = "leftSize", Type = "int", SelectValues = null, Category = "magazine", ReadOnly = false, MinValue = 1, MaxValue = 7 },
new FieldsConfiguration{ Name = "rightSize", Type = "int", SelectValues = null, Category = "magazine", ReadOnly = false, MinValue = 1, MaxValue = 7 },
new FieldsConfiguration{ Name = "magazinePositionType", Type = "int", SelectValues = null, Category = "magazine", ReadOnly = false, MinValue = 1, MaxValue = 7 },
},
ToolsConfiguration = new List<FieldsConfiguration>()
{
new FieldsConfiguration{ Name = "id", Type = "int", SelectValues = null, Category = "general", ReadOnly = true, MinValue = 0, MaxValue = 0 },
new FieldsConfiguration{ Name = "multitoolId", Type = "int", SelectValues = null, Category = "general", ReadOnly = true, MinValue = 0, MaxValue = 0 },
new FieldsConfiguration{ Name = "familyName", Type = "string", SelectValues = null, Category = "general", ReadOnly = true, MinValue = 0, MaxValue = 0 },
new FieldsConfiguration{ Name = "toolType", Type = "select", SelectValues = toolTypeList, Category = "general", ReadOnly = true, MinValue = 0, MaxValue = 0 }
}
};
public static List<FieldsConfiguration> SiemensMagazinePosFieldsConfig = new List<FieldsConfiguration>()
{
new FieldsConfiguration{Name = "magazineId", Type = "int", SelectValues = null, Category = "general", ReadOnly = true, MinValue = 0, MaxValue = 0 },
new FieldsConfiguration{Name = "positionId", Type = "int", SelectValues = null, Category = "general", ReadOnly = true, MinValue = 0, MaxValue = 0 },
new FieldsConfiguration{Name = "type", Type = "int", SelectValues = null, Category = "general", ReadOnly = true, MinValue = 0, MaxValue = 0 },
new FieldsConfiguration{Name = "disabled", Type = "boolean", SelectValues = null, Category = "general", ReadOnly = true, MinValue = 0, MaxValue = 0 },
};
public static EdgesConfiguration SiemensEdgesFieldsConfiguration = new EdgesConfiguration()
{
EdgeConfiguration = new List<FieldsConfiguration>()
{
new FieldsConfiguration{Name = "id", Type = "int", SelectValues = null, Category = "general", ReadOnly = true, MinValue = 0, MaxValue = 0 },
new FieldsConfiguration{Name = "residualLife", Type = "double", SelectValues = null, Category = "life", ReadOnly = false, MinValue = 0, MaxValue = int.MaxValue },
new FieldsConfiguration{Name = "nominalLife", Type = "double", SelectValues = null, Category = "life", ReadOnly = false, MinValue = 0, MaxValue = int.MaxValue },
new FieldsConfiguration{Name = "preAlmLife", Type = "double", SelectValues = null, Category = "life", ReadOnly = false, MinValue = 0, MaxValue = int.MaxValue }
},
EdgesAdditionalParamsConfiguration = new Dictionary<int, List<string>>() // Set value runtime, based on NC vendor
};
#endregion PUBLIC_CONFIGS_FIELDS
}
}