Fix osai configuration

This commit is contained in:
Lucio Maranta
2018-08-27 10:28:09 +00:00
parent a48ab8217d
commit dbd9a584c1
3 changed files with 41 additions and 7 deletions
+1
View File
@@ -671,6 +671,7 @@ namespace CMS_CORE_Library
public class FamiliesConfiguration
{
public List<FieldsConfiguration> FamilyConfiguration;
public List<FieldsConfiguration> FamilyReadOnlyConfiguration;
public List<FieldsConfiguration> ToolsConfiguration;
}
+8 -5
View File
@@ -1879,16 +1879,16 @@ namespace CMS_CORE.Siemens
try
{
FileSvc fileSvc = new FileSvc();
//var splittedPath = path.Split('/');
//path = String.Join(@"/", splittedPath.Take(splittedPath.Count() - 1));
var splittedPath = path.Split('/');
var filePath = String.Join(@"/", splittedPath.Take(splittedPath.Count() - 1));
var fileName = splittedPath[splittedPath.Count() - 1];
// Preapare folder node
Node folderNode = new Node(BASE_FILE_PATH + path);
Node folderNode = new Node(BASE_FILE_PATH + filePath);
// Read files in the folder
Node[] nodeArray = fileSvc.List(folderNode);
fileInfo = nodeArray.Where(x => x.Name == "MPF0").Select(x =>
fileInfo = nodeArray.Where(x => x.Name == fileName).Select(x =>
new InfoFile()
{
CreationDate = nodeArray[0].Attributes.LastAccess,
@@ -1913,6 +1913,8 @@ namespace CMS_CORE.Siemens
public override CmsError FILES_WDeactivateProgram(int processId)
{
return NO_ERROR;
}
@@ -2130,6 +2132,7 @@ namespace CMS_CORE.Siemens
PiSvc pi = new PiSvc(piArgs);
pi.Start();
// Get new tool id
tool.Id = GetLastToolId();
+32 -2
View File
@@ -178,8 +178,8 @@ 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 = 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 = "shankId", Type = "int", SelectValues = null, Category = "general", ReadOnly = true, MinValue = 0, MaxValue = 0},
new FieldsConfiguration{ Name = "familyId", Type = "int", SelectValues = null, Category = "general", ReadOnly = false, MinValue = 0, 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 = "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},
@@ -225,6 +225,36 @@ namespace CMS_CORE_Library
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 = "revive", ReadOnly = false, MinValue = 0, MaxValue = ushort.MaxValue},
},
FamilyReadOnlyConfiguration = new List<FieldsConfiguration>()
{
new FieldsConfiguration{ Name = "name", Type = "string", SelectValues = null, Category = "family", ReadOnly = true, MinValue = 0, MaxValue = 0},
new FieldsConfiguration{ Name = "toolType", Type = "int", SelectValues = null, Category = "family", ReadOnly = true, MinValue = 0, MaxValue = byte.MaxValue},
new FieldsConfiguration{ Name = "leftSize", Type = "int", SelectValues = null, Category = "family", ReadOnly = true, MinValue = 0, MaxValue = byte.MaxValue},
new FieldsConfiguration{ Name = "rightSize", Type = "int", SelectValues = null, Category = "family", ReadOnly = true, MinValue = 0, MaxValue = byte.MaxValue},
new FieldsConfiguration{ Name = "tcpTable", Type = "int", SelectValues = null, Category = "family", ReadOnly = true, MinValue = 0, MaxValue = byte.MaxValue},
new FieldsConfiguration{ Name = "gamma", Type = "int", SelectValues = null, Category = "family", ReadOnly = true, MinValue = 0, MaxValue = byte.MaxValue},
new FieldsConfiguration{ Name = "rotationType", Type = "int", SelectValues = null, Category = "family", ReadOnly = true, MinValue = 0, MaxValue = byte.MaxValue},
new FieldsConfiguration{ Name = "cooling", Type = "boolean", SelectValues = null, Category = "family", ReadOnly = true, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "cooling1", Type = "boolean", SelectValues = null, Category = "family", ReadOnly = true, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "cooling2", Type = "boolean", SelectValues = null, Category = "family", ReadOnly = true, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "cooling3", Type = "boolean", SelectValues = null, Category = "family", ReadOnly = true, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "cooling4", Type = "boolean", SelectValues = null, Category = "family", ReadOnly = true, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "cooling5", Type = "boolean", SelectValues = null, Category = "family", ReadOnly = true, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "cooling6", Type = "boolean", SelectValues = null, Category = "family", ReadOnly = true, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "cooling7", Type = "boolean", SelectValues = null, Category = "family", ReadOnly = true, MinValue = 0, MaxValue = int.MaxValue},
new FieldsConfiguration{ Name = "maxSpeed", Type = "int", SelectValues = null, Category = "family", ReadOnly = true, MinValue = 0, MaxValue = ushort.MaxValue},
new FieldsConfiguration{ Name = "maxLoad", Type = "int", SelectValues = null, Category = "family", ReadOnly = true, MinValue = 0, MaxValue = byte.MaxValue},
new FieldsConfiguration{ Name = "minLoadPctAutoload", Type = "int", SelectValues = null, Category = "family", ReadOnly = true, MinValue = 0, MaxValue = byte.MaxValue},
new FieldsConfiguration{ Name = "maxLoadPctAutoload", Type = "int", SelectValues = null, Category = "family", ReadOnly = true, MinValue = 0, MaxValue = byte.MaxValue},
new FieldsConfiguration{ Name = "dynamicCompensation", Type = "int", SelectValues = null, Category = "family", ReadOnly = true, MinValue = 0, MaxValue = byte.MaxValue},
new FieldsConfiguration{ Name = "minLoadDynamicCompensation", Type = "int", SelectValues = null, Category = "family", ReadOnly = true, MinValue = 0, MaxValue = byte.MaxValue},
new FieldsConfiguration{ Name = "maxLoadDynamicCompensation", Type = "int", SelectValues = null, Category = "family", ReadOnly = true, MinValue = 0, MaxValue = byte.MaxValue},
new FieldsConfiguration{ Name = "lifeType", Type = "int", SelectValues = null, Category = "family", ReadOnly = true, MinValue = 0, MaxValue = byte.MaxValue},
new FieldsConfiguration{ Name = "nominalLife", Type = "int", SelectValues = null, Category = "family", ReadOnly = true, MinValue = 0, MaxValue = ushort.MaxValue},
new FieldsConfiguration{ Name = "reviveDelta", Type = "int", SelectValues = null, Category = "family", ReadOnly = true, 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 },