Added write options & fix Osai configurations

This commit is contained in:
Lucio Maranta
2018-08-21 15:53:04 +00:00
parent a9ef908ab8
commit 8df32e59e0
7 changed files with 222 additions and 112 deletions
+34 -7
View File
@@ -276,7 +276,7 @@ namespace CMS_CORE_Library
{
public int Id;
public string Name;
}
}
public class PreviewFileModel
{
@@ -303,11 +303,11 @@ namespace CMS_CORE_Library
#endregion Data structure models
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region Cms Errors Codes
#region Cms Errors Codes
public class CmsError
public class CmsError
{
public CMS_ERROR_CODES errorCode;
public string localizationKey;
@@ -465,7 +465,7 @@ namespace CMS_CORE_Library
GENERIC = 5
}
public enum MAGAZINE_TYPE
public enum SIEMENS_MAGAZINE_TYPE
{
CHAIN = 1,
REVOLVER = 3,
@@ -474,6 +474,13 @@ namespace CMS_CORE_Library
MAGAZINE_LOADING_STATION = 9
}
public enum NC_MAGAZINE_TYPE
{
BOX_MAGAZINE = 0,
DISK = 1,
CHAIN = 2,
}
public enum POSITION_TYPE
{
MAGAZINE_LOCATION = 1,
@@ -682,12 +689,15 @@ namespace CMS_CORE_Library
public class NcMagazineConfigModel
{
public byte Id;
public MAGAZINE_TYPE Type;
public NC_MAGAZINE_TYPE Type;
public int MaxPositions;
}
public class SiemensMagazineConfigModel : NcMagazineConfigModel
public class SiemensMagazineConfigModel
{
public byte Id;
public SIEMENS_MAGAZINE_TYPE Type;
public int MaxPositions;
public string Name;
public bool LoadingIsActive;
public int LoadPosition;
@@ -717,6 +727,23 @@ namespace CMS_CORE_Library
#region Nc Tool Manager Models
public class ToolManagerOptionsModel
{
public bool FamilyOpt { get; set; }
public bool ShankOpt { get; set; }
public bool MagPosTypeOpt { get; set; }
public bool OffsetOpt { get; set; }
public bool ReviveOpt { get; set; }
public bool GammaOpt { get; set; }
public bool LifeOpt { get; set; }
public bool TcpOpt { get; set; }
public bool CoolingOpt { get; set; }
public bool MultidimensionalShankOpt { get; set; }
public bool SelfAdaptivePathOpt { get; set; }
public bool DynamicCompensationOpt { get; set; }
public bool BallufOpt { get; set; }
}
public class OffsetModel
{
public short Id { get; set; }
+49 -18
View File
@@ -30,9 +30,9 @@ namespace CMS_CORE.Demo
// Magazine config parameters
private List<SiemensMagazineConfigModel> MagazineConfig = new List<SiemensMagazineConfigModel>()
{
new SiemensMagazineConfigModel{Id = 1, Type = MAGAZINE_TYPE.CHAIN, LoadingIsActive = true, Name = "MAG1"},
new SiemensMagazineConfigModel{Id = 2, Type = MAGAZINE_TYPE.BOX_MAGAZINE, LoadingIsActive = true, Name = "MAG2"},
new SiemensMagazineConfigModel{Id = 3, Type = MAGAZINE_TYPE.BOX_MAGAZINE, LoadingIsActive = false, Name = "MAG3"},
new SiemensMagazineConfigModel{Id = 1, Type = SIEMENS_MAGAZINE_TYPE.CHAIN, LoadingIsActive = true, Name = "MAG1"},
new SiemensMagazineConfigModel{Id = 2, Type = SIEMENS_MAGAZINE_TYPE.BOX_MAGAZINE, LoadingIsActive = true, Name = "MAG2"},
new SiemensMagazineConfigModel{Id = 3, Type = SIEMENS_MAGAZINE_TYPE.BOX_MAGAZINE, LoadingIsActive = false, Name = "MAG3"},
};
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1757,12 +1757,16 @@ namespace CMS_CORE.Demo
{
try
{
config.ToolsConfiguration = SiemensToolFieldsConfig;
config.FamiliesConfiguration = SiemensFamilyFieldsConfig;
config.ShanksConfiguration = SiemensShankFieldsConfig;
config.MagazinePosConfiguration = SiemensMagazinePosFieldsConfig;
config.EdgesConfiguration = SiemensEdgesFieldsConfiguration;
//config.ToolsConfiguration = SiemensToolFieldsConfig;
//config.FamiliesConfiguration = SiemensFamilyFieldsConfig;
//config.ShanksConfiguration = SiemensShankFieldsConfig;
//config.MagazinePosConfiguration = SiemensMagazinePosFieldsConfig;
//config.EdgesConfiguration = SiemensEdgesFieldsConfiguration;
config.ToolsConfiguration = NcToolFieldsConfig;
config.FamiliesConfiguration = NcFamilyFieldsConfig;
config.ShanksConfiguration = NcShankFieldsConfig;
config.MagazinePosConfiguration = NcMagazinePosFieldsConfig;
config.EdgesConfiguration = NcOffsetFieldsConfiguration;
// Get config from demo
serverService.GetToolManagerConfiguration(out DemoToolManagerConfig demoConf);
@@ -1778,15 +1782,15 @@ namespace CMS_CORE.Demo
config.EdgesConfiguration.EdgesAdditionalParamsConfiguration = new Dictionary<int, List<string>>();
// Remove path and set only names
foreach (int key in DemoEdgesConfiguration.EdgesConfig.Keys)
{
List<string> tmpNames = new List<string>();
foreach (var conf in DemoEdgesConfiguration.EdgesConfig[key])
{
tmpNames.Add(conf.Name);
}
config.EdgesConfiguration.EdgesAdditionalParamsConfiguration.Add(key, tmpNames);
}
//foreach (int key in DemoEdgesConfiguration.EdgesConfig.Keys)
//{
// List<string> tmpNames = new List<string>();
// foreach (var conf in DemoEdgesConfiguration.EdgesConfig[key])
// {
// tmpNames.Add(conf.Name);
// }
// config.EdgesConfiguration.EdgesAdditionalParamsConfiguration.Add(key, tmpNames);
//}
config.Magazines = MagazineConfig;
}
@@ -2140,6 +2144,11 @@ namespace CMS_CORE.Demo
#region ToolTable
public override CmsError TOOLS_WOptions(ToolManagerOptionsModel options)
{
return NO_ERROR;
}
public override CmsError TOOLS_RShanksData(ref List<ShankModel> shanks)
{
// Check if the NC Demo is Connected
@@ -2567,6 +2576,28 @@ namespace CMS_CORE.Demo
#region Nc Tool Manager
public override CmsError TOOLS_RMagazineConfig(ref List<NcMagazineConfigModel> config)
{
config = new List<NcMagazineConfigModel>()
{
new NcMagazineConfigModel()
{
Id = 1,
MaxPositions = 10,
Type = NC_MAGAZINE_TYPE.BOX_MAGAZINE
},
new NcMagazineConfigModel()
{
Id = 2,
MaxPositions = 10,
Type = NC_MAGAZINE_TYPE.DISK
},
new NcMagazineConfigModel()
{
Id = 3,
MaxPositions = 1,
Type = NC_MAGAZINE_TYPE.CHAIN
}
};
return NO_ERROR;
}
+5
View File
@@ -1826,6 +1826,11 @@ namespace CMS_CORE.Fanuc
return NO_ERROR;
}
public override CmsError TOOLS_WOptions(ToolManagerOptionsModel options)
{
return NO_ERROR;
}
public override CmsError TOOLS_ROffset(short offsetId, ref OffsetModel offset)
{
return NO_ERROR;
+33 -32
View File
@@ -1650,6 +1650,39 @@ namespace CMS_CORE
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region Nc Tool Manager
public abstract CmsError TOOLS_WOptions(ToolManagerOptionsModel options);
public abstract CmsError TOOLS_ROffset(short offsetId, ref OffsetModel offset);
public abstract CmsError TOOLS_WOffset(short offsetId, OffsetModel offset);
public abstract CmsError TOOLS_WStartEditData();
public abstract CmsError TOOLS_WStopEditData();
public abstract CmsError TOOLS_WUpdateTools(List<NcToolModel> list);
public abstract CmsError TOOLS_WUpdateFamilies(List<NcFamilyModel> list);
public abstract CmsError TOOLS_WUpdateShanks(List<NcShankModel> list);
public abstract CmsError TOOLS_WUpdateMagazinePositions(List<NcMagazinePositionModel> list);
public abstract CmsError TOOLS_WStartEditTooling(int magazineId);
public abstract CmsError TOOLS_WStopEditTooling(int magazineId);
public abstract CmsError TOOLS_WRestoreBackup();
public abstract CmsError TOOLS_RMagazineConfig(ref List<NcMagazineConfigModel> config);
public abstract CmsError TOOLS_RUpdatedToolsData(ref Dictionary<int, byte> updatedStatus, ref Dictionary<int, uint> updatedLives);
#endregion Nc Tool Manager
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region CONSTANTS (Struct and Enum are Static for definition)
// Read Write type
@@ -1787,38 +1820,6 @@ namespace CMS_CORE
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region Nc Tool Manager
public abstract CmsError TOOLS_ROffset(short offsetId, ref OffsetModel offset);
public abstract CmsError TOOLS_WOffset(short offsetId, OffsetModel offset);
public abstract CmsError TOOLS_WStartEditData();
public abstract CmsError TOOLS_WStopEditData();
public abstract CmsError TOOLS_WUpdateTools(List<NcToolModel> list);
public abstract CmsError TOOLS_WUpdateFamilies(List<NcFamilyModel> list);
public abstract CmsError TOOLS_WUpdateShanks(List<NcShankModel> list);
public abstract CmsError TOOLS_WUpdateMagazinePositions(List<NcMagazinePositionModel> list);
public abstract CmsError TOOLS_WStartEditTooling(int magazineId);
public abstract CmsError TOOLS_WStopEditTooling(int magazineId);
public abstract CmsError TOOLS_WRestoreBackup();
public abstract CmsError TOOLS_RMagazineConfig(ref List<NcMagazineConfigModel> config);
public abstract CmsError TOOLS_RUpdatedToolsData(ref Dictionary<int, byte> updatedStatus, ref Dictionary<int, uint> updatedLives);
#endregion Nc Tool Manager
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#region Fixed memory area
// TODO REMOVE
+51 -5
View File
@@ -2113,8 +2113,6 @@ namespace CMS_CORE.Osai
}
public override CmsError FILES_RActiveProgramData(int processId, ref ActiveProgramDataModel data)
{
// Check if the NC Demo is Connected
@@ -2332,6 +2330,21 @@ namespace CMS_CORE.Osai
config.MagazinePosConfiguration = NcMagazinePosFieldsConfig;
config.EdgesConfiguration = NcOffsetFieldsConfiguration;
// Setup magazine list
List<NcMagazineConfigModel> conf = new List<NcMagazineConfigModel>();
CmsError cmsError = TOOLS_RMagazineConfig(ref conf);
if (cmsError.IsError())
return cmsError;
config.Magazines = conf.Select(x => new SiemensMagazineConfigModel()
{
Id = x.Id,
Type = (SIEMENS_MAGAZINE_TYPE) x.Type,
Name = x.Id.ToString(),
LoadingIsActive = true,
MaxPositions = x.MaxPositions
}).ToList();
config.EdgesConfiguration.EdgesAdditionalParamsConfiguration = new Dictionary<int, List<string>>();
return NO_ERROR;
@@ -2486,13 +2499,44 @@ namespace CMS_CORE.Osai
{
Id = (byte)(i + 1),
MaxPositions = types[i + 20],
Type = (MAGAZINE_TYPE)types[i]
Type = (NC_MAGAZINE_TYPE)types[i]
});
}
return NO_ERROR;
}
public override CmsError TOOLS_WOptions(ToolManagerOptionsModel options)
{
// Convert class into a single ushort
bool[] boolValues = new bool[13]
{
options.FamilyOpt,
options.ShankOpt,
options.MagPosTypeOpt,
options.OffsetOpt,
options.ReviveOpt,
options.GammaOpt,
options.LifeOpt,
options.TcpOpt,
options.CoolingOpt,
options.MultidimensionalShankOpt,
options.SelfAdaptivePathOpt,
options.DynamicCompensationOpt,
options.BallufOpt
};
ushort intValue = 0;
// Convert array into a ushort
for (int i = 0; i < boolValues.Length; i++)
{
if (boolValues[i])
intValue += (ushort)(1 << i);
}
// Write & return
return MEM_RWWord(W, 0, TOOL_MANAGER_OPTIONS.MemType, TOOL_MANAGER_OPTIONS.Address, ref intValue);
}
public override CmsError TOOLS_WStartEditData()
{
//Check if the NC is Connected
@@ -3616,9 +3660,11 @@ namespace CMS_CORE.Osai
internal static MEMORY_CELL HEADS_STROBE_DECREMENT = new MEMORY_CELL(MEMORY_TYPE.Osai_MW, 12957, 4);
// Tool manager areas
internal static MEMORY_CELL TOOL_MANAGER_STATUS = new MEMORY_CELL(MEMORY_TYPE.Osai_MW, 13001, 2);
internal static MEMORY_CELL TOOL_MANAGER_COMMAND = new MEMORY_CELL(MEMORY_TYPE.Osai_MW, 13000, 2);
internal static MEMORY_CELL TOOL_MANAGER_STATUS = new MEMORY_CELL(MEMORY_TYPE.Osai_MW, 13001, 2);
internal static MEMORY_CELL TOOL_MANAGER_OPTIONS = new MEMORY_CELL(MEMORY_TYPE.Osai_MW, 13002, 2);
internal static MEMORY_CELL MAGAZINE_TYPES = new MEMORY_CELL(MEMORY_TYPE.Osai_MW, 13062, 4);
internal static MEMORY_CELL MAGAZINE_POSITIONS_NUMBER = new MEMORY_CELL(MEMORY_TYPE.Osai_MW, 13072, 4);
+11 -6
View File
@@ -2632,7 +2632,7 @@ namespace CMS_CORE.Siemens
int decPosition, incPosition;
decPosition = incPosition = mountedTool.PositionId;
// if it is a circular magazine move position before ( for left case ) or after ( right case ) the location you want to mount the tool
if (magConfig.Type != MAGAZINE_TYPE.BOX_MAGAZINE)
if (magConfig.Type != SIEMENS_MAGAZINE_TYPE.BOX_MAGAZINE)
{
decPosition = decPosition < newMagazineTool.PositionId ? decPosition + magConfig.MaxPositions : decPosition;
incPosition = incPosition > newMagazineTool.PositionId ? incPosition - magConfig.MaxPositions : incPosition;
@@ -2925,7 +2925,12 @@ namespace CMS_CORE.Siemens
#region Nc Tool Manager
public override CmsError TOOLS_RMagazineConfig(ref List<NcMagazineConfigModel> config)
{
return NO_ERROR;
return FUNCTION_NOT_ALLOWED_ERROR;
}
public override CmsError TOOLS_WOptions(ToolManagerOptionsModel options)
{
return FUNCTION_NOT_ALLOWED_ERROR;
}
public override CmsError TOOLS_ROffset(short offsetId, ref OffsetModel offset)
@@ -3657,19 +3662,19 @@ namespace CMS_CORE.Siemens
if (mag == null)
{
bool active = true;
MAGAZINE_TYPE type = (MAGAZINE_TYPE)Convert.ToInt32(actualString.Split('=').LastOrDefault());
if (type == MAGAZINE_TYPE.MAGAZINE_LOADING_STATION || type == MAGAZINE_TYPE.MAGAZINE_TOOL_BUFFER)
SIEMENS_MAGAZINE_TYPE type = (SIEMENS_MAGAZINE_TYPE)Convert.ToInt32(actualString.Split('=').LastOrDefault());
if (type == SIEMENS_MAGAZINE_TYPE.MAGAZINE_LOADING_STATION || type == SIEMENS_MAGAZINE_TYPE.MAGAZINE_TOOL_BUFFER)
active = false;
MagazineConfig.Add(new SiemensMagazineConfigModel()
{
Id = (byte)firstId,
Type = (MAGAZINE_TYPE)Convert.ToInt32(actualString.Split('=').LastOrDefault()),
Type = (SIEMENS_MAGAZINE_TYPE)Convert.ToInt32(actualString.Split('=').LastOrDefault()),
LoadingIsActive = active
});
}
else
mag.Type = (MAGAZINE_TYPE)Convert.ToInt32(actualString.Split('=').LastOrDefault());
mag.Type = (SIEMENS_MAGAZINE_TYPE)Convert.ToInt32(actualString.Split('=').LastOrDefault());
}
break;
+39 -44
View File
@@ -178,19 +178,18 @@ namespace CMS_CORE_Library
public static List<FieldsConfiguration> NcToolFieldsConfig = new List<FieldsConfiguration>()
{
new FieldsConfiguration{ Name = "id", Type = "int", SelectValues = null, Category = "general", ReadOnly = true, MinValue = 0, MaxValue = 0},
new FieldsConfiguration{ Name = "familyId", Type = "int", SelectValues = null, Category = "general", ReadOnly = true, MinValue = 0, MaxValue = ushort.MaxValue},
new FieldsConfiguration{ Name = "shankId", Type = "int", SelectValues = null, Category = "general", ReadOnly = true, MinValue = 0, MaxValue = ushort.MaxValue},
new FieldsConfiguration{ Name = "length", Type = "int", SelectValues = null, Category = "general", ReadOnly = false, MinValue = 0, MaxValue = ushort.MaxValue},
new FieldsConfiguration{ Name = "familyId", Type = "int", SelectValues = null, Category = "general", ReadOnly = false, MinValue = 1, MaxValue = ushort.MaxValue},
new FieldsConfiguration{ Name = "shankId", Type = "int", SelectValues = null, Category = "general", ReadOnly = false, MinValue = 1, MaxValue = ushort.MaxValue},
new FieldsConfiguration{ Name = "offsetLength", Type = "int", SelectValues = null, Category = "general", ReadOnly = false, MinValue = 0, MaxValue = ushort.MaxValue},
new FieldsConfiguration{ Name = "disabled", Type = "bool", SelectValues = null, Category = "status", ReadOnly = false, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "broken", Type = "bool", SelectValues = null, Category = "status", ReadOnly = false, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "measured", Type = "bool", SelectValues = null, Category = "status", ReadOnly = false, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "clockwiseRotation", Type = "bool", SelectValues = null, Category = "status", ReadOnly = false, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "counterClockwiseRotation", Type = "bool", SelectValues = null, Category = "status", ReadOnly = false, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "disabled", Type = "boolean", SelectValues = null, Category = "status", ReadOnly = false, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "broken", Type = "boolean", SelectValues = null, Category = "status", ReadOnly = false, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "measured", Type = "boolean", SelectValues = null, Category = "status", ReadOnly = false, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "clockwiseRotation", Type = "boolean", SelectValues = null, Category = "status", ReadOnly = false, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "counterClockwiseRotation", Type = "boolean", SelectValues = null, Category = "status", ReadOnly = false, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "residualLife", Type = "int", SelectValues = null, Category = "general", ReadOnly = false, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "offset1", Type = "int", SelectValues = null, Category = "general", ReadOnly = false, MinValue = 0, MaxValue = ushort.MaxValue},
new FieldsConfiguration{ Name = "offset2", Type = "int", SelectValues = null, Category = "general", ReadOnly = false, MinValue = 0, MaxValue = ushort.MaxValue},
new FieldsConfiguration{ Name = "offset3", Type = "int", SelectValues = null, Category = "general", ReadOnly = false, MinValue = 0, MaxValue = ushort.MaxValue},
new FieldsConfiguration{ Name = "offsetId1", Type = "int", SelectValues = null, Category = "offset", ReadOnly = false, MinValue = 0, MaxValue = ushort.MaxValue},
new FieldsConfiguration{ Name = "offsetId2", Type = "int", SelectValues = null, Category = "offset", ReadOnly = false, MinValue = 0, MaxValue = ushort.MaxValue},
new FieldsConfiguration{ Name = "offsetId3", Type = "int", SelectValues = null, Category = "offset", ReadOnly = false, MinValue = 0, MaxValue = ushort.MaxValue},
};
public static FamiliesConfiguration NcFamilyFieldsConfig = new FamiliesConfiguration()
@@ -202,34 +201,34 @@ namespace CMS_CORE_Library
new FieldsConfiguration{ Name = "toolType", Type = "int", SelectValues = null, Category = "general", ReadOnly = false, MinValue = 0, MaxValue = byte.MaxValue},
new FieldsConfiguration{ Name = "leftSize", Type = "int", SelectValues = null, Category = "general", ReadOnly = false, MinValue = 0, MaxValue = byte.MaxValue},
new FieldsConfiguration{ Name = "rightSize", Type = "int", SelectValues = null, Category = "general", ReadOnly = false, MinValue = 0, MaxValue = byte.MaxValue},
new FieldsConfiguration{ Name = "tcpTable", Type = "int", SelectValues = null, Category = "general", ReadOnly = false, MinValue = 0, MaxValue = byte.MaxValue},
new FieldsConfiguration{ Name = "tcpTable", Type = "int", SelectValues = null, Category = "tcp", ReadOnly = false, MinValue = 0, MaxValue = byte.MaxValue},
new FieldsConfiguration{ Name = "gamma", Type = "int", SelectValues = null, Category = "general", ReadOnly = false, MinValue = 0, MaxValue = byte.MaxValue},
new FieldsConfiguration{ Name = "rotationType", Type = "int", SelectValues = null, Category = "general", ReadOnly = false, MinValue = 0, MaxValue = byte.MaxValue},
new FieldsConfiguration{ Name = "rotationType", Type = "int", SelectValues = null, Category = "general", ReadOnly = false, MinValue = 0, MaxValue = byte.MaxValue},
new FieldsConfiguration{ Name = "cooling", Type = "bool", SelectValues = null, Category = "cooling", ReadOnly = false, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "cooling1", Type = "bool", SelectValues = null, Category = "cooling", ReadOnly = false, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "cooling2", Type = "bool", SelectValues = null, Category = "cooling", ReadOnly = false, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "cooling3", Type = "bool", SelectValues = null, Category = "cooling", ReadOnly = false, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "cooling4", Type = "bool", SelectValues = null, Category = "cooling", ReadOnly = false, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "cooling5", Type = "bool", SelectValues = null, Category = "cooling", ReadOnly = false, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "cooling6", Type = "bool", SelectValues = null, Category = "cooling", ReadOnly = false, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "cooling7", Type = "bool", SelectValues = null, Category = "cooling", ReadOnly = false, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "cooling", Type = "boolean", SelectValues = null, Category = "cooling", ReadOnly = false, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "cooling1", Type = "boolean", SelectValues = null, Category = "cooling", ReadOnly = false, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "cooling2", Type = "boolean", SelectValues = null, Category = "cooling", ReadOnly = false, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "cooling3", Type = "boolean", SelectValues = null, Category = "cooling", ReadOnly = false, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "cooling4", Type = "boolean", SelectValues = null, Category = "cooling", ReadOnly = false, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "cooling5", Type = "boolean", SelectValues = null, Category = "cooling", ReadOnly = false, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "cooling6", Type = "boolean", SelectValues = null, Category = "cooling", ReadOnly = false, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "cooling7", Type = "boolean", SelectValues = null, Category = "cooling", ReadOnly = false, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "maxSpeed", Type = "int", SelectValues = null, Category = "general", ReadOnly = false, MinValue = 0, MaxValue = ushort.MaxValue},
new FieldsConfiguration{ Name = "maxLoad", Type = "int", SelectValues = null, Category = "general", ReadOnly = false, MinValue = 0, MaxValue = byte.MaxValue},
new FieldsConfiguration{ Name = "minLoadPctAutoload", Type = "int", SelectValues = null, Category = "general", ReadOnly = false, MinValue = 0, MaxValue = byte.MaxValue},
new FieldsConfiguration{ Name = "maxLoadPctAutoload", Type = "int", SelectValues = null, Category = "general", ReadOnly = false, MinValue = 0, MaxValue = byte.MaxValue},
new FieldsConfiguration{ Name = "minLoadDynamicCompensation", Type = "int", SelectValues = null, Category = "general", ReadOnly = false, MinValue = 0, MaxValue = byte.MaxValue},
new FieldsConfiguration{ Name = "maxLoadDynamicCompensation", Type = "int", SelectValues = null, Category = "general", ReadOnly = false, MinValue = 0, MaxValue = byte.MaxValue},
new FieldsConfiguration{ Name = "maxSpeed", Type = "int", SelectValues = null, Category = "limits", ReadOnly = false, MinValue = 0, MaxValue = ushort.MaxValue},
new FieldsConfiguration{ Name = "maxLoad", Type = "int", SelectValues = null, Category = "limits", ReadOnly = false, MinValue = 0, MaxValue = byte.MaxValue},
new FieldsConfiguration{ Name = "minLoadPctAutoload", Type = "int", SelectValues = null, Category = "selfAdaptive", ReadOnly = false, MinValue = 0, MaxValue = byte.MaxValue},
new FieldsConfiguration{ Name = "maxLoadPctAutoload", Type = "int", SelectValues = null, Category = "selfAdaptive", ReadOnly = false, MinValue = 0, MaxValue = byte.MaxValue},
new FieldsConfiguration{ Name = "dynamicCompensation", Type = "int", SelectValues = null, Category = "dynamicCompensation", ReadOnly = false, MinValue = 0, MaxValue = byte.MaxValue},
new FieldsConfiguration{ Name = "minLoadDynamicCompensation", Type = "int", SelectValues = null, Category = "dynamicCompensation", ReadOnly = false, MinValue = 0, MaxValue = byte.MaxValue},
new FieldsConfiguration{ Name = "maxLoadDynamicCompensation", Type = "int", SelectValues = null, Category = "dynamicCompensation", ReadOnly = false, MinValue = 0, MaxValue = byte.MaxValue},
new FieldsConfiguration{ Name = "lifeType", Type = "int", SelectValues = null, Category = "life", ReadOnly = false, MinValue = 0, MaxValue = byte.MaxValue},
new FieldsConfiguration{ Name = "nominalLife", Type = "int", SelectValues = null, Category = "life", ReadOnly = false, MinValue = 0, MaxValue = ushort.MaxValue},
new FieldsConfiguration{ Name = "reviveDelta", Type = "int", SelectValues = null, Category = "general", ReadOnly = false, MinValue = 0, MaxValue = ushort.MaxValue},
new FieldsConfiguration{ Name = "reviveDelta", Type = "int", SelectValues = null, Category = "revive", ReadOnly = false, MinValue = 0, MaxValue = ushort.MaxValue},
},
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}
new FieldsConfiguration{ Name = "shankId", Type = "int", SelectValues = toolTypeList, Category = "general", ReadOnly = true, MinValue = 0, MaxValue = 0 },
}
};
@@ -238,17 +237,15 @@ namespace CMS_CORE_Library
ShankConfiguration = new List<FieldsConfiguration>()
{
new FieldsConfiguration{ Name = "id", Type = "int", SelectValues = null, Category = "general", ReadOnly = true, MinValue = 0, MaxValue = 0 },
new FieldsConfiguration{ Name = "balluf", Type = "int", SelectValues = null, Category = "magazine", ReadOnly = false, MinValue = 0, MaxValue = (uint)short.MaxValue },
new FieldsConfiguration{ Name = "magazinePositionType", Type = "int", SelectValues = null, Category = "magazine", ReadOnly = false, MinValue = 0, MaxValue = byte.MaxValue },
new FieldsConfiguration{ Name = "magazineId", Type = "int", SelectValues = null, Category = "magazine", ReadOnly = false, MinValue = 0, MaxValue = byte.MaxValue },
new FieldsConfiguration{ Name = "positionId", Type = "int", SelectValues = null, Category = "magazine", ReadOnly = false, MinValue = 0, MaxValue = byte.MaxValue }
new FieldsConfiguration{ Name = "balluf", Type = "int", SelectValues = null, Category = "balluf", ReadOnly = false, MinValue = 0, MaxValue = (uint)short.MaxValue },
new FieldsConfiguration{ Name = "magazinePositionType", Type = "int", SelectValues = null, Category = "magPosType", ReadOnly = false, MinValue = 0, MaxValue = byte.MaxValue },
new FieldsConfiguration{ Name = "magazineId", Type = "int", SelectValues = null, Category = "position", ReadOnly = true, MinValue = 0, MaxValue = byte.MaxValue },
new FieldsConfiguration{ Name = "positionId", Type = "int", SelectValues = null, Category = "position", ReadOnly = true, MinValue = 0, MaxValue = byte.MaxValue }
},
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 }
new FieldsConfiguration{ Name = "id", Type = "int", SelectValues = null, Category = "general", ReadOnly = true, MinValue = 0, MaxValue = 0 },
new FieldsConfiguration{ Name = "familyId", Type = "int", SelectValues = null, Category = "general", ReadOnly = true, MinValue = 0, MaxValue = 0 },
}
};
@@ -256,19 +253,17 @@ namespace CMS_CORE_Library
{
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 = "type", Type = "int", SelectValues = null, Category = "magPosType", ReadOnly = true, MinValue = 0, MaxValue = 0 },
new FieldsConfiguration{ Name = "disabled", Type = "boolean", SelectValues = null, Category = "general", ReadOnly = false, MinValue = 0, MaxValue = 0 }
};
// Offset
public static EdgesConfiguration NcOffsetFieldsConfiguration = 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 = "ncOffsetId", Type = "int", SelectValues = null, Category = "general", ReadOnly = false, MinValue = 0, MaxValue = (uint)short.MaxValue },
new FieldsConfiguration{Name = "lenght", Type = "double", SelectValues = null, Category = "general", ReadOnly = false, MinValue = 0, MaxValue = uint.MaxValue },
new FieldsConfiguration{Name = "radius", Type = "double", SelectValues = null, Category = "general", ReadOnly = false, MinValue = 0, MaxValue = uint.MaxValue },
new FieldsConfiguration{Name = "lenght", Type = "double", SelectValues = null, Category = "general", ReadOnly = false, MinValue = 0, MaxValue = uint.MaxValue },
new FieldsConfiguration{Name = "radius", Type = "double", SelectValues = null, Category = "general", ReadOnly = false, MinValue = 0, MaxValue = uint.MaxValue },
new FieldsConfiguration{Name = "wear_length", Type = "double", SelectValues = null, Category = "general", ReadOnly = false, MinValue = 0, MaxValue = uint.MaxValue },
new FieldsConfiguration{Name = "wear_radius", Type = "double", SelectValues = null, Category = "general", ReadOnly = false, MinValue = 0, MaxValue = uint.MaxValue }
},