Merge remote-tracking branch 'CMS/develop' into develop
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -15,6 +15,21 @@
|
||||
<xs:element name="description" type="xs:string" />
|
||||
<xs:element name="format" type="xs:string" />
|
||||
<xs:element name="scaleFactor" type="xs:int" default="1"/>
|
||||
<xs:element name="numDec" type="xs:int" default="0"/>
|
||||
<xs:element name="enumList" minOccurs="0">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="enumVal" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="label" type="xs:string" />
|
||||
<xs:element name="value" type="xs:string" />
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
@@ -38,4 +53,15 @@
|
||||
<xs:enumeration value="Options"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
|
||||
<!-- Enum Type -->
|
||||
<!--<xs:complexType name="enumVal">
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute name="label" use="required" type="xs:string" />
|
||||
<xs:attribute name="value" use="required" type="xs:string" />
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>-->
|
||||
</xs:schema>
|
||||
@@ -5,10 +5,10 @@
|
||||
<showNcHMI>false</showNcHMI>
|
||||
<ncIpAddress>192.168.0.102</ncIpAddress>
|
||||
<ncPort>102</ncPort>
|
||||
<machineModel>Ares 37 OF</machineModel>
|
||||
<machineModel>Thermo 2020</machineModel>
|
||||
<sharedPath>C:\PartPrg\</sharedPath>
|
||||
<sharedName>//PARTPRG:/</sharedName>
|
||||
<installationDate>01/01/2019</installationDate>
|
||||
<installationDate>01/06/2020</installationDate>
|
||||
<mgiOption>false</mgiOption>
|
||||
<siemensKeyboardOption>false</siemensKeyboardOption>
|
||||
<machineNumberHasLetters>false</machineNumberHasLetters>
|
||||
|
||||
@@ -593,7 +593,12 @@ namespace Thermo.Active.Config
|
||||
Name = x.Element("name").Value,
|
||||
Description = x.Element("description").Value,
|
||||
Format = x.Element("format").Value,
|
||||
ScaleFactor = Convert.ToInt16(x.Element("scaleFactor").Value)
|
||||
ScaleFactor = Convert.ToInt16(x.Element("scaleFactor").Value),
|
||||
NumDec = Convert.ToInt16(x.Element("numDec").Value),
|
||||
//EnumVal = new Dictionary<string, string>()
|
||||
EnumVal = x.Element("enumList") != null ? x.Element("enumList").Elements().ToDictionary(
|
||||
y => y.Element("label").Value, y => y.Element("value").Value
|
||||
) : new Dictionary<string, string>()
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
|
||||
@@ -793,10 +793,13 @@ public static class ThreadsFunctions
|
||||
|
||||
MessageServices.Current.Publish(SEND_THERMO_RECIPE_FULL, null, currRecipe);
|
||||
|
||||
// FIXME TODO verificare come ridurre chiamate
|
||||
|
||||
// ora gestisco la overview!
|
||||
libraryError = ncAdapter.GetRecipeOverview(out Dictionary<RecipeSection, RecipeCatStatus> currOverview);
|
||||
if (libraryError.IsError())
|
||||
ManageLibraryError(libraryError);
|
||||
|
||||
MessageServices.Current.Publish(SEND_THERMO_RECIPE_OVERWIEW, null, currOverview);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using static Thermo.Active.Model.Constants;
|
||||
using System.Collections.Generic;
|
||||
using static Thermo.Active.Model.Constants;
|
||||
|
||||
namespace Thermo.Active.Model.ConfigModels
|
||||
{
|
||||
@@ -12,5 +13,7 @@ namespace Thermo.Active.Model.ConfigModels
|
||||
public string Description { get; set; }
|
||||
public string Format { get; set; }
|
||||
public int ScaleFactor { get; set; }
|
||||
public int NumDec { get; set; }
|
||||
public Dictionary<string, string> EnumVal { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
namespace Thermo.Active.Model.DTOModels.ThRecipe
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ThRecipe
|
||||
{
|
||||
public class DTORecipeConfigModel
|
||||
{
|
||||
@@ -11,5 +13,7 @@
|
||||
public string Format;
|
||||
public string Label;
|
||||
public int ScaleFactor;
|
||||
public int NumDec;
|
||||
public Dictionary<string, string> EnumVal { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,7 @@
|
||||
namespace Thermo.Active.Model.DTOModels.ThRecipe
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ThRecipe
|
||||
{
|
||||
public class DTORecipeParam
|
||||
{
|
||||
@@ -10,6 +13,8 @@
|
||||
public string UnitMeasure { get; set; }
|
||||
public double ValueAct { get; set; }
|
||||
public int ScaleFactor { get; set; }
|
||||
public int NumDec { get; set; }
|
||||
public Dictionary<string, string> EnumVal { get; set; }
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
@@ -32,6 +37,10 @@
|
||||
return false;
|
||||
if (ScaleFactor != item.ScaleFactor)
|
||||
return false;
|
||||
if (NumDec != item.NumDec)
|
||||
return false;
|
||||
if (!EnumVal.SequenceEqual(item.EnumVal))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1298,13 +1298,15 @@ namespace Thermo.Active.NC
|
||||
{
|
||||
Id = x.Id,
|
||||
ScaleFactor = x.ScaleFactor,
|
||||
NumDec = x.NumDec,
|
||||
Category = x.Category.ToString(),
|
||||
SubCategory_1 = x.SubCategory_1,
|
||||
SubCategory_2 = x.SubCategory_2,
|
||||
Name = x.Name,
|
||||
Description = x.Description,
|
||||
Format = x.Format,
|
||||
Label = $"{x.Category}_{x.SubCategory_1}_{x.SubCategory_2}_{x.Name}".Replace("__", "_").Replace("__", "_").ToLower()
|
||||
Label = $"{x.Category}_{x.SubCategory_1}_{x.SubCategory_2}_{x.Name}".Replace("__", "_").Replace("__", "_").ToLower(),
|
||||
EnumVal = x.EnumVal
|
||||
}).ToList();
|
||||
|
||||
foreach (var item in recipeConfig)
|
||||
@@ -1320,7 +1322,7 @@ namespace Thermo.Active.NC
|
||||
};
|
||||
|
||||
// FIXME TODO impostato a true x testing
|
||||
#if true
|
||||
#if debug
|
||||
currStatus = new RPStatus()
|
||||
{
|
||||
Visible = true,
|
||||
@@ -1346,7 +1348,9 @@ namespace Thermo.Active.NC
|
||||
ValueAct = paramPLC.ValueAct / item.ScaleFactor,
|
||||
SetpointHMI = paramPLC.SetpointHMI / item.ScaleFactor,
|
||||
SetpointPLC = paramPLC.SetpointPLC / item.ScaleFactor,
|
||||
ScaleFactor = item.ScaleFactor
|
||||
ScaleFactor = item.ScaleFactor,
|
||||
NumDec = item.NumDec,
|
||||
EnumVal=item.EnumVal
|
||||
};
|
||||
}
|
||||
else
|
||||
@@ -1370,7 +1374,9 @@ namespace Thermo.Active.NC
|
||||
Status = currStatus,
|
||||
UnitMeasure = "",
|
||||
ValueAct = 0,
|
||||
ScaleFactor = 1
|
||||
ScaleFactor = 1,
|
||||
NumDec = 0,
|
||||
EnumVal= new Dictionary<string, string>()
|
||||
};
|
||||
}
|
||||
currentRecipe.Add(item.Label, currParam);
|
||||
@@ -1905,13 +1911,15 @@ namespace Thermo.Active.NC
|
||||
{
|
||||
Id = x.Id,
|
||||
ScaleFactor = x.ScaleFactor,
|
||||
NumDec = x.NumDec,
|
||||
Category = x.Category.ToString(),
|
||||
SubCategory_1 = x.SubCategory_1,
|
||||
SubCategory_2 = x.SubCategory_2,
|
||||
Name = x.Name,
|
||||
Description = x.Description,
|
||||
Format = x.Format,
|
||||
Label = $"{x.Category}_{x.SubCategory_1}_{x.SubCategory_2}_{x.Name}".Replace("__", "_").Replace("__", "_").ToLower()
|
||||
Label = $"{x.Category}_{x.SubCategory_1}_{x.SubCategory_2}_{x.Name}".Replace("__", "_").Replace("__", "_").ToLower(),
|
||||
EnumVal = x.EnumVal
|
||||
}).ToList();
|
||||
|
||||
RecipeCatStatus currStatus = RecipeCatStatus.Unchanged;
|
||||
@@ -2012,7 +2020,7 @@ namespace Thermo.Active.NC
|
||||
currVal = new DTOModulesBlock()
|
||||
{
|
||||
Id = item.Id,
|
||||
Label = item.Label,
|
||||
Label = item.Label,
|
||||
Type = item.Type,
|
||||
Section = item.Section,
|
||||
IdParam = item.IdParam,
|
||||
|
||||
@@ -108,13 +108,15 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
{
|
||||
Id = x.Id,
|
||||
ScaleFactor = x.ScaleFactor,
|
||||
NumDec = x.NumDec,
|
||||
Category = x.Category.ToString(),
|
||||
SubCategory_1 = x.SubCategory_1,
|
||||
SubCategory_2 = x.SubCategory_2,
|
||||
Name = x.Name,
|
||||
Description = x.Description,
|
||||
Format = x.Format,
|
||||
Label = $"{x.Category}_{x.SubCategory_1}_{x.SubCategory_2}_{x.Name}".Replace("__", "_").Replace("__", "_").ToLower()
|
||||
Label = $"{x.Category}_{x.SubCategory_1}_{x.SubCategory_2}_{x.Name}".Replace("__", "_").Replace("__", "_").ToLower(),
|
||||
EnumVal = x.EnumVal
|
||||
}).ToList();
|
||||
|
||||
return Ok(recipeConfig);
|
||||
|
||||
@@ -266,7 +266,6 @@ namespace Thermo.Active.Listeners.SignalR
|
||||
// comparazione
|
||||
if (!item.Value.Equals(LastRecipeFullData[item.Key]))
|
||||
{
|
||||
//diffData[item.Key] = item.Value;
|
||||
diffData.Add(item.Key, item.Value);
|
||||
}
|
||||
}
|
||||
@@ -284,19 +283,33 @@ namespace Thermo.Active.Listeners.SignalR
|
||||
public static void SendThermoRecipeOverviewData(object recipeOver)
|
||||
{
|
||||
Dictionary<RecipeSection, RecipeCatStatus> currRecipeOver = recipeOver as Dictionary<RecipeSection, RecipeCatStatus>;
|
||||
Dictionary<RecipeSection, RecipeCatStatus> diffData = new Dictionary<RecipeSection, RecipeCatStatus>();
|
||||
|
||||
if (!LastRecipeOverData.SequenceEqual(currRecipeOver))
|
||||
|
||||
foreach (var item in currRecipeOver)
|
||||
{
|
||||
LastRecipeOverData = currRecipeOver;
|
||||
if (!LastRecipeOverData.ContainsKey(item.Key))
|
||||
{
|
||||
diffData.Add(item.Key, item.Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
// comparazione
|
||||
if (!item.Value.Equals(LastRecipeOverData[item.Key]))
|
||||
{
|
||||
diffData.Add(item.Key, item.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (diffData.Count > 0)
|
||||
{
|
||||
// salvo update
|
||||
LastRecipeOverData = new Dictionary<RecipeSection, RecipeCatStatus>(currRecipeOver);
|
||||
|
||||
var context = GlobalHost.ConnectionManager.GetHubContext<NcHub>();
|
||||
context.Clients.Group("ncData").recipeOverData(currRecipeOver);
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// var context = GlobalHost.ConnectionManager.GetHubContext<NcHub>();
|
||||
// context.Clients.Group("ncData").recipeOverData(currRecipeOver);
|
||||
//}
|
||||
}
|
||||
|
||||
public static void SendThermoModulesData(object modules)
|
||||
|
||||
@@ -30,4 +30,4 @@ using System.Runtime.InteropServices;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("0.9.10")]
|
||||
[assembly: AssemblyVersion("0.9.12")]
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
"env": "development",
|
||||
"api": {
|
||||
"enabled": true,
|
||||
"apiServerUrl": "http://seriate.steamware.net:9000/"
|
||||
"apiServerUrl": "http://localhost:9000/"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user