Merge branch 'develop' into newfeature/paddle
This commit is contained in:
@@ -10,7 +10,7 @@ namespace Client.Config.SubModels
|
||||
{
|
||||
public Boolean Enabled { get; set; }
|
||||
public Boolean FollowNcWindow { get; set; }
|
||||
public ushort Type { get; set; } /* 0: Demo - 1: Fanuc - 2: Siemens - 3: Osai */
|
||||
public ushort Type { get; set; } /* 0: Demo - 1: Fanuc - 2: Siemens - 3: Osai - 4: Siemens S7 */
|
||||
public string IpAddress { get; set; }
|
||||
public string Port { get; set; }
|
||||
|
||||
|
||||
@@ -1283,6 +1283,21 @@ namespace Active_Client.View
|
||||
ncWindowHeight = HMI_WINDOW_HEIGHT_OSAI;
|
||||
ncWindowX = HMI_WINDOW_POS_X_OSAI;
|
||||
ncWindowY = HMI_WINDOW_POS_Y_OSAI;
|
||||
}; break;
|
||||
|
||||
// 4: Siemens S7
|
||||
case 4:
|
||||
{
|
||||
processname = DemoName;
|
||||
processpath = @"C:\CMS\ACTIVE\DEMO" + DemoPath;
|
||||
ncWindowWidth = 0;
|
||||
ncWindowHeight = 0;
|
||||
ncWindowX = 0;
|
||||
ncWindowY = 0; ;
|
||||
//ncWindowWidth = HMI_WINDOW_WIDTH_SIEMENS;
|
||||
//ncWindowHeight = HMI_WINDOW_HEIGHT_SIEMENS;
|
||||
//ncWindowX = HMI_WINDOW_POS_X_SIEMENS;
|
||||
//ncWindowY = HMI_WINDOW_POS_Y_SIEMENS;
|
||||
}; break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -257,6 +257,8 @@ namespace Active_Client.View
|
||||
Config.VendorHmiConfig.Type = 2;
|
||||
else if (ncVendorName.Equals("OSAI"))
|
||||
Config.VendorHmiConfig.Type = 3;
|
||||
else if (ncVendorName.Equals("S7NET"))
|
||||
Config.VendorHmiConfig.Type = 4;
|
||||
else
|
||||
{
|
||||
setStatus("Close the application!", "Errror in configuration, from server");
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<system.serviceModel>
|
||||
<bindings>
|
||||
<basicHttpBinding>
|
||||
<binding name="OPENcontrol" />
|
||||
</basicHttpBinding>
|
||||
</bindings>
|
||||
<client>
|
||||
<endpoint address="http://192.168.20.2:8080" binding="basicHttpBinding"
|
||||
bindingConfiguration="OPENcontrol" contract="OPENControl.OPENcontrolPortType"
|
||||
name="OPENcontrol" />
|
||||
</client>
|
||||
</system.serviceModel>
|
||||
</configuration>
|
||||
Binary file not shown.
@@ -5,12 +5,12 @@ using System.Runtime.InteropServices;
|
||||
// Le informazioni generali relative a un assembly sono controllate dal seguente
|
||||
// set di attributi. Modificare i valori di questi attributi per modificare le informazioni
|
||||
// associate a un assembly.
|
||||
[assembly: AssemblyTitle("Step.CmsConnect")]
|
||||
[assembly: AssemblyTitle("Thermo.Active.CmsConnect")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Step.CmsConnect")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019")]
|
||||
[assembly: AssemblyProduct("Thermo.Active.CmsConnect")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2020")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
|
||||
@@ -5,11 +5,6 @@
|
||||
<allowExternalBrowser>false</allowExternalBrowser>
|
||||
<ncNeeded>true</ncNeeded>
|
||||
</production>
|
||||
<tooling>
|
||||
<enabled>true</enabled>
|
||||
<allowExternalBrowser>false</allowExternalBrowser>
|
||||
<ncNeeded>true</ncNeeded>
|
||||
</tooling>
|
||||
<report>
|
||||
<enabled>false</enabled>
|
||||
<allowExternalBrowser>true</allowExternalBrowser>
|
||||
|
||||
@@ -13,16 +13,6 @@
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="tooling">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="enabled" type="xs:boolean" />
|
||||
<xs:element name="allowExternalBrowser" />
|
||||
<xs:element name="ncNeeded" type="xs:boolean" />
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="report">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="recipe">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<!-- Heads -->
|
||||
<xs:element name="parameter" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="id" type="xs:int"/>
|
||||
<xs:element name="category" type="param_type" />
|
||||
<xs:element name="subCategory_1" type="xs:string" />
|
||||
<xs:element name="subCategory_2" type="xs:string" />
|
||||
<xs:element name="name" type="xs:string" />
|
||||
<xs:element name="description" type="xs:string" />
|
||||
<xs:element name="format" type="xs:string" />
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<!-- Head Type -->
|
||||
<xs:simpleType name="param_type" final="restriction">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="General" />
|
||||
<xs:enumeration value="Positions" />
|
||||
<xs:enumeration value="Cycle"/>
|
||||
<xs:enumeration value="Heats"/>
|
||||
<xs:enumeration value="Pyrometer"/>
|
||||
<xs:enumeration value="Drawing"/>
|
||||
<xs:enumeration value="UpperPlate"/>
|
||||
<xs:enumeration value="Cooling"/>
|
||||
<xs:enumeration value="Vacuum"/>
|
||||
<xs:enumeration value="Extraction"/>
|
||||
<xs:enumeration value="Options"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:schema>
|
||||
@@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<serverConfig>
|
||||
<ncConfig>
|
||||
<ncVendor>DEMO</ncVendor> <!-- NO_NC/DEMO/FANUC/SIEMENS/OSAI -->
|
||||
<showNcHMI>true</showNcHMI>
|
||||
<ncIpAddress>localhost</ncIpAddress>
|
||||
<ncPort>8080</ncPort>
|
||||
<ncVendor>S7NET</ncVendor> <!-- NO_NC/DEMO/FANUC/SIEMENS/OSAI/S7NET -->
|
||||
<showNcHMI>false</showNcHMI>
|
||||
<ncIpAddress>192.168.0.102</ncIpAddress>
|
||||
<ncPort>102</ncPort>
|
||||
<machineModel>Ares 37 OF</machineModel>
|
||||
<sharedPath>C:\PartPrg\</sharedPath>
|
||||
<sharedName>//PARTPRG:/</sharedName>
|
||||
|
||||
@@ -1,78 +1,79 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="serverConfig">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="ncConfig">
|
||||
<xs:complexType>
|
||||
<xs:element name="serverConfig">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="ncVendor" type="ncType" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="showNcHMI" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
|
||||
<xs:element name="ncIpAddress" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="ncPort" type="xs:int" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="machineModel" type="xs:string" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="sharedPath" type="xs:string" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="sharedName" type="xs:string" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="installationDate" type="xs:string" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="mgiOption" type="xs:boolean" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="siemensKeyboardOption" type="xs:boolean" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="machineNumberHasLetters" type="xs:boolean" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="ncConfig">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="ncVendor" type="ncType" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="showNcHMI" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
|
||||
<xs:element name="ncIpAddress" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="ncPort" type="xs:int" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="machineModel" type="xs:string" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="sharedPath" type="xs:string" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="sharedName" type="xs:string" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="installationDate" type="xs:string" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="mgiOption" type="xs:boolean" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="siemensKeyboardOption" type="xs:boolean" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="machineNumberHasLetters" type="xs:boolean" minOccurs='1' maxOccurs='1'/>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="softwareProdConfig">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="enabled" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
|
||||
<xs:element name="path" type="xs:string" minOccurs='1' maxOccurs='1'/>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="serverConfig">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="serverAddress" type="xs:string" minOccurs="1" maxOccurs="1"/>
|
||||
<xs:element name="serverPort" type="xs:int" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="language" type="xs:language" minOccurs='1' maxOccurs='1' default="en"/>
|
||||
<xs:element name="enableDirectoryBrowsing" type="xs:boolean" default="false"/>
|
||||
<xs:element name="databaseAddress" type="xs:string" minOccurs="1" maxOccurs="1"/>
|
||||
<xs:element name="autoOpenCmsClient" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
|
||||
<xs:element name="textEditorPath" type="xs:string" minOccurs="1" maxOccurs="1"/>
|
||||
<xs:element name="MTCFolderPath" type="xs:string" minOccurs="1" maxOccurs="1"/>
|
||||
<xs:element name="MTCApplicationName" type="xs:string" minOccurs="1" maxOccurs="1"/>
|
||||
<xs:element name="maxAlarmsRows" type="xs:int" minOccurs="1" maxOccurs="1"/>
|
||||
<xs:element name="alarmToDelete" type="xs:int" minOccurs="1" maxOccurs="1"/>
|
||||
<xs:element name="CMSConnectReady" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="extSoftwares">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="software" minOccurs='0' maxOccurs='15'>
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="path" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="longName" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="shortName" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="arguments" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="inMainMenuBar" minOccurs='1' maxOccurs='1'/>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="softwareProdConfig">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="enabled" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
|
||||
<xs:element name="path" type="xs:string" minOccurs='1' maxOccurs='1'/>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="serverConfig">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="serverAddress" type="xs:string" minOccurs="1" maxOccurs="1"/>
|
||||
<xs:element name="serverPort" type="xs:int" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="language" type="xs:language" minOccurs='1' maxOccurs='1' default="en"/>
|
||||
<xs:element name="enableDirectoryBrowsing" type="xs:boolean" default="false"/>
|
||||
<xs:element name="databaseAddress" type="xs:string" minOccurs="1" maxOccurs="1"/>
|
||||
<xs:element name="autoOpenCmsClient" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
|
||||
<xs:element name="textEditorPath" type="xs:string" minOccurs="1" maxOccurs="1"/>
|
||||
<xs:element name="MTCFolderPath" type="xs:string" minOccurs="1" maxOccurs="1"/>
|
||||
<xs:element name="MTCApplicationName" type="xs:string" minOccurs="1" maxOccurs="1"/>
|
||||
<xs:element name="maxAlarmsRows" type="xs:int" minOccurs="1" maxOccurs="1"/>
|
||||
<xs:element name="alarmToDelete" type="xs:int" minOccurs="1" maxOccurs="1"/>
|
||||
<xs:element name="CMSConnectReady" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="extSoftwares">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="software" minOccurs='0' maxOccurs='15'>
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="path" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="longName" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="shortName" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="arguments" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="inMainMenuBar" minOccurs='1' maxOccurs='1'/>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:simpleType name="ncType" final="restriction" >
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="DEMO" />
|
||||
<xs:enumeration value="OSAI" />
|
||||
<xs:enumeration value="FANUC" />
|
||||
<xs:enumeration value="SIEMENS" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:simpleType name="ncType" final="restriction" >
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="DEMO" />
|
||||
<xs:enumeration value="OSAI" />
|
||||
<xs:enumeration value="FANUC" />
|
||||
<xs:enumeration value="SIEMENS" />
|
||||
<xs:enumeration value="S7NET" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:schema>
|
||||
@@ -1,923 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<root>
|
||||
<toolManagerConfig>
|
||||
<toolMetricType>DIAMETER</toolMetricType> <!-- RADIUS/DIAMETER -->
|
||||
<familyOpt>true</familyOpt>
|
||||
<shankOpt>true</shankOpt>
|
||||
<magPositionOpt>true</magPositionOpt>
|
||||
<offsetOpt>true</offsetOpt>
|
||||
<reviveOpt>true</reviveOpt>
|
||||
<gammaOpt>true</gammaOpt>
|
||||
<lifeOpt>true</lifeOpt>
|
||||
<tcpOpt>true</tcpOpt>
|
||||
<coolingOpt>true</coolingOpt>
|
||||
<multidimensionalShankOpt>true</multidimensionalShankOpt>
|
||||
<selfAdaptivePathOpt>true</selfAdaptivePathOpt>
|
||||
<dynamicCompensationOpt>true</dynamicCompensationOpt>
|
||||
<ballufOpt>true</ballufOpt>
|
||||
<integrityCheckOpt>true</integrityCheckOpt>
|
||||
</toolManagerConfig>
|
||||
<coolingLocalizedNames>
|
||||
<cooling>
|
||||
<lang langKey="en">Cooling</lang>
|
||||
<lang langKey="it">Raffreddamento</lang>
|
||||
</cooling>
|
||||
<cooling1>
|
||||
<lang langKey="en">Cooling 1</lang>
|
||||
<lang langKey="it">Raffreddamento 1</lang>
|
||||
</cooling1>
|
||||
<cooling2>
|
||||
<lang langKey="en">Cooling 2</lang>
|
||||
<lang langKey="it">Raffreddamento 2</lang>
|
||||
</cooling2>
|
||||
<cooling3>
|
||||
<lang langKey="en">Cooling 3</lang>
|
||||
<lang langKey="it">Raffreddamento 3</lang>
|
||||
</cooling3>
|
||||
<cooling4>
|
||||
<lang langKey="en">Cooling 4</lang>
|
||||
<lang langKey="it">Raffreddamento 4</lang>
|
||||
</cooling4>
|
||||
<cooling5>
|
||||
<lang langKey="en">Cooling 5</lang>
|
||||
<lang langKey="it">Raffreddamento 5</lang>
|
||||
</cooling5>
|
||||
<cooling6>
|
||||
<lang langKey="en">Cooling 6</lang>
|
||||
<lang langKey="it">Raffreddamento 6</lang>
|
||||
</cooling6>
|
||||
<cooling7>
|
||||
<lang langKey="en">Cooling 7</lang>
|
||||
<lang langKey="it">Raffreddamento 7</lang>
|
||||
</cooling7>
|
||||
</coolingLocalizedNames>
|
||||
<magazineNames>
|
||||
<magazine>
|
||||
<id>1</id>
|
||||
<assistedTooling>true</assistedTooling>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Magazine 1</lang>
|
||||
<lang langKey="it">Magazzino 1</lang>
|
||||
</localizedNames>
|
||||
</magazine>
|
||||
<magazine>
|
||||
<id>2</id>
|
||||
<assistedTooling>false</assistedTooling>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Magazine 2</lang>
|
||||
<lang langKey="it">Magazzino 2</lang>
|
||||
</localizedNames>
|
||||
</magazine>
|
||||
<magazine>
|
||||
<id>3</id>
|
||||
<assistedTooling>false</assistedTooling>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Magazine 3</lang>
|
||||
<lang langKey="it">Magazzino 3</lang>
|
||||
</localizedNames>
|
||||
</magazine>
|
||||
</magazineNames>
|
||||
|
||||
<toolTypes>
|
||||
<toolType>
|
||||
<id>0</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Generic</lang>
|
||||
<lang langKey="it">Generico</lang>
|
||||
<lang langKey="fr">Générique</lang>
|
||||
<lang langKey="de">Allgemein</lang>
|
||||
<lang langKey="hr">Opće</lang>
|
||||
<lang langKey="ro">Generic</lang>
|
||||
<lang langKey="nl">Algemeen</lang>
|
||||
<lang langKey="el">Γενικό</lang>
|
||||
<lang langKey="ru">Общий</lang>
|
||||
<lang langKey="pl">Ogólny</lang>
|
||||
<lang langKey="sv">Generisk</lang>
|
||||
<lang langKey="da">Generel</lang>
|
||||
<lang langKey="pt">Genérico</lang>
|
||||
<lang langKey="es">Genérico</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>10</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Angular Transmission</lang>
|
||||
<lang langKey="it">Rinvio Angolare</lang>
|
||||
<lang langKey="fr">Transmission Angulaire</lang>
|
||||
<lang langKey="de">Scheibe</lang>
|
||||
<lang langKey="hr">Disk</lang>
|
||||
<lang langKey="ro">Transmisie unghiulară</lang>
|
||||
<lang langKey="nl">Hoekige transmissie</lang>
|
||||
<lang langKey="el">Γωνιακή μετάδοση</lang>
|
||||
<lang langKey="ru">Угловой контрпривод</lang>
|
||||
<lang langKey="pl">Przekładnia kątowa</lang>
|
||||
<lang langKey="sv">Vinkelöverföring</lang>
|
||||
<lang langKey="da">Vinkel mellemarm</lang>
|
||||
<lang langKey="pt">Transmissão Angular</lang>
|
||||
<lang langKey="es">Reenvío Angular</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>70</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound disk amplitude 15%%</lang>
|
||||
<lang langKey="it">Disco ultrasuoni amplitude 15%%</lang>
|
||||
<lang langKey="fr">Disque à ultrasons, amplitude 15%%</lang>
|
||||
<lang langKey="de">Ultraschallscheibenamplitude 15%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučnog diska 15%%</lang>
|
||||
<lang langKey="ro">Disc de ultrasunete, amplitudine 15%%</lang>
|
||||
<lang langKey="nl">Ultrasoon schijf amplitude 15%%</lang>
|
||||
<lang langKey="el">Δίσκος υπερήχων πλάτους 15%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой диск амплитуда 15%%</lang>
|
||||
<lang langKey="pl">Tarcza ultradźwiękowa amplituda 15%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsskiva 15%%</lang>
|
||||
<lang langKey="da">Ultralydsskive amplitude 15%%</lang>
|
||||
<lang langKey="pt">Disco ultrassom amplitude 15%%</lang>
|
||||
<lang langKey="es">Disco ultrasonidos amplitud 15%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>71</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound disk amplitude 20%%</lang>
|
||||
<lang langKey="it">Disco ultrasuoni amplitude 20%%</lang>
|
||||
<lang langKey="fr">Disque à ultrasons, amplitude 20%%</lang>
|
||||
<lang langKey="de">Ultraschallscheibenamplitude 20%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučnog diska 20%%</lang>
|
||||
<lang langKey="ro">Disc de ultrasunete, amplitudine 20%%</lang>
|
||||
<lang langKey="nl">Ultrasoon schijf amplitude 20%%</lang>
|
||||
<lang langKey="el">Δίσκος υπερήχων πλάτους 20%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой диск амплитуда 20%%</lang>
|
||||
<lang langKey="pl">Tarcza ultradźwiękowa amplituda 20%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsskiva 20%%</lang>
|
||||
<lang langKey="da">Ultralydsskive amplitude 20%%</lang>
|
||||
<lang langKey="pt">Disco ultrassom amplitude 20%%</lang>
|
||||
<lang langKey="es">Disco ultrasonidos amplitud 20%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>72</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound disk amplitude 30%%</lang>
|
||||
<lang langKey="it">Disco ultrasuoni amplitude 30%%</lang>
|
||||
<lang langKey="fr">Disque à ultrasons, amplitude 30%%</lang>
|
||||
<lang langKey="de">Ultraschallscheibenamplitude 30%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučnog diska 30%%</lang>
|
||||
<lang langKey="ro">Disc de ultrasunete, amplitudine 30%%</lang>
|
||||
<lang langKey="nl">Ultrasoon schijf amplitude 30%%</lang>
|
||||
<lang langKey="el">Δίσκος υπερήχων πλάτους 30%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой диск амплитуда 30%%</lang>
|
||||
<lang langKey="pl">Tarcza ultradźwiękowa amplituda 30%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsskiva 30%%</lang>
|
||||
<lang langKey="da">Ultralydsskive amplitude 30%%</lang>
|
||||
<lang langKey="pt">Disco ultrassom amplitude 30%%</lang>
|
||||
<lang langKey="es">Disco ultrasonidos amplitud 30%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>73</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound disk amplitude 40%%</lang>
|
||||
<lang langKey="it">Disco ultrasuoni amplitude 40%%</lang>
|
||||
<lang langKey="fr">Disque à ultrasons, amplitude 40%%</lang>
|
||||
<lang langKey="de">Ultraschallscheibenamplitude 40%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučnog diska 40%%</lang>
|
||||
<lang langKey="ro">Disc de ultrasunete, amplitudine 40%%</lang>
|
||||
<lang langKey="nl">Ultrasoon schijf amplitude 40%%</lang>
|
||||
<lang langKey="el">Δίσκος υπερήχων πλάτους 40%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой диск амплитуда 40%%</lang>
|
||||
<lang langKey="pl">Tarcza ultradźwiękowa amplituda 40%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsskiva 40%%</lang>
|
||||
<lang langKey="da">Ultralydsskive amplitude 40%%</lang>
|
||||
<lang langKey="pt">Disco ultrassom amplitude 40%%</lang>
|
||||
<lang langKey="es">Disco ultrasonidos amplitud 40%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>74</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound disk amplitude 50%%</lang>
|
||||
<lang langKey="it">Disco ultrasuoni amplitude 50%%</lang>
|
||||
<lang langKey="fr">Disque à ultrasons, amplitude 50%%</lang>
|
||||
<lang langKey="de">Ultraschallscheibenamplitude 50%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučnog diska 50%%</lang>
|
||||
<lang langKey="ro">Disc de ultrasunete, amplitudine 50%%</lang>
|
||||
<lang langKey="nl">Ultrasoon schijf amplitude 50%%</lang>
|
||||
<lang langKey="el">Δίσκος υπερήχων πλάτους 50%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой диск амплитуда 50%%</lang>
|
||||
<lang langKey="pl">Tarcza ultradźwiękowa amplituda 50%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsskiva 50%%</lang>
|
||||
<lang langKey="da">Ultralydsskive amplitude 50%%</lang>
|
||||
<lang langKey="pt">Disco ultrassom amplitude 50%%</lang>
|
||||
<lang langKey="es">Disco ultrasonidos amplitud 50%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>75</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound disk amplitude 60%%</lang>
|
||||
<lang langKey="it">Disco ultrasuoni amplitude 60%%</lang>
|
||||
<lang langKey="fr">Disque à ultrasons, amplitude 60%%</lang>
|
||||
<lang langKey="de">Ultraschallscheibenamplitude 60%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučnog diska 60%%</lang>
|
||||
<lang langKey="ro">Disc de ultrasunete, amplitudine 60%%</lang>
|
||||
<lang langKey="nl">Ultrasoon schijf amplitude 60%%</lang>
|
||||
<lang langKey="el">Δίσκος υπερήχων πλάτους 60%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой диск амплитуда 60%%</lang>
|
||||
<lang langKey="pl">Tarcza ultradźwiękowa amplituda 60%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsskiva 60%%</lang>
|
||||
<lang langKey="da">Ultralydsskive amplitude 60%%</lang>
|
||||
<lang langKey="pt">Disco ultrassom amplitude 60%%</lang>
|
||||
<lang langKey="es">Disco ultrasonidos amplitud 60%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>76</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound disk amplitude 70%%</lang>
|
||||
<lang langKey="it">Disco ultrasuoni amplitude 70%%</lang>
|
||||
<lang langKey="fr">Disque à ultrasons, amplitude 70%%</lang>
|
||||
<lang langKey="de">Ultraschallscheibenamplitude 70%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučnog diska 70%%</lang>
|
||||
<lang langKey="ro">Disc de ultrasunete, amplitudine 70%%</lang>
|
||||
<lang langKey="nl">Ultrasoon schijf amplitude 70%%</lang>
|
||||
<lang langKey="el">Δίσκος υπερήχων πλάτους 70%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой диск амплитуда 70%%</lang>
|
||||
<lang langKey="pl">Tarcza ultradźwiękowa amplituda 70%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsskiva 70%%</lang>
|
||||
<lang langKey="da">Ultralydsskive amplitude 70%%</lang>
|
||||
<lang langKey="pt">Disco ultrassom amplitude 70%%</lang>
|
||||
<lang langKey="es">Disco ultrasonidos amplitud 70%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>77</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound disk amplitude 80%%</lang>
|
||||
<lang langKey="it">Disco ultrasuoni amplitude 80%%</lang>
|
||||
<lang langKey="fr">Disque à ultrasons, amplitude 80%%</lang>
|
||||
<lang langKey="de">Ultraschallscheibenamplitude 80%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučnog diska 80%%</lang>
|
||||
<lang langKey="ro">Disc de ultrasunete, amplitudine 80%%</lang>
|
||||
<lang langKey="nl">Ultrasoon schijf amplitude 80%%</lang>
|
||||
<lang langKey="el">Δίσκος υπερήχων πλάτους 80%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой диск амплитуда 80%%</lang>
|
||||
<lang langKey="pl">Tarcza ultradźwiękowa amplituda 80%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsskiva 80%%</lang>
|
||||
<lang langKey="da">Ultralydsskive amplitude 80%%</lang>
|
||||
<lang langKey="pt">Disco ultrassom amplitude 80%%</lang>
|
||||
<lang langKey="es">Disco ultrasonidos amplitud 80%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>78</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound disk amplitude 90%%</lang>
|
||||
<lang langKey="it">Disco ultrasuoni amplitude 90%%</lang>
|
||||
<lang langKey="fr">Disque à ultrasons, amplitude 90%%</lang>
|
||||
<lang langKey="de">Ultraschallscheibenamplitude 90%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučnog diska 90%%</lang>
|
||||
<lang langKey="ro">Disc de ultrasunete, amplitudine 90%%</lang>
|
||||
<lang langKey="nl">Ultrasoon schijf amplitude 90%%</lang>
|
||||
<lang langKey="el">Δίσκος υπερήχων πλάτους 90%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой диск амплитуда 90%%</lang>
|
||||
<lang langKey="pl">Tarcza ultradźwiękowa amplituda 90%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsskiva 90%%</lang>
|
||||
<lang langKey="da">Ultralydsskive amplitude 90%%</lang>
|
||||
<lang langKey="pt">Disco ultrassom amplitude 90%%</lang>
|
||||
<lang langKey="es">Disco ultrasonidos amplitud 90%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>79</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound disk amplitude 100%%</lang>
|
||||
<lang langKey="it">Disco ultrasuoni amplitude 100%%</lang>
|
||||
<lang langKey="fr">Disque à ultrasons, amplitude 100%%</lang>
|
||||
<lang langKey="de">Ultraschallscheibenamplitude 100%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučnog diska 100%%</lang>
|
||||
<lang langKey="ro">Disc de ultrasunete, amplitudine 100%%</lang>
|
||||
<lang langKey="nl">Ultrasoon schijf amplitude 100%%</lang>
|
||||
<lang langKey="el">Δίσκος υπερήχων πλάτους 100%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой диск амплитуда 100%%</lang>
|
||||
<lang langKey="pl">Tarcza ultradźwiękowa amplituda 100%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsskiva 100%%</lang>
|
||||
<lang langKey="da">Ultralydsskive amplitude 100%%</lang>
|
||||
<lang langKey="pt">Disco ultrassom amplitude 100%%</lang>
|
||||
<lang langKey="es">Disco ultrasonidos amplitud 100%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>80</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound blade amplitude 10%%</lang>
|
||||
<lang langKey="it">Lama ultrasuoni amplitude 10%%</lang>
|
||||
<lang langKey="fr">Lame à ultrasons, amplitude 10%%</lang>
|
||||
<lang langKey="de">Ultraschallklingenamplitude 10%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučne oštrice 10%%</lang>
|
||||
<lang langKey="ro">Lama cu ultrasunete, amplitudine 10%%</lang>
|
||||
<lang langKey="nl">Ultrasoon mes amplitude 10%%</lang>
|
||||
<lang langKey="el">Λεπίδα υπερήχων πλάτους 10%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой резец амплитуда 10%%</lang>
|
||||
<lang langKey="pl">Ostrze ultradźwiękowe amplituda 10%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsblad 10%%</lang>
|
||||
<lang langKey="da">Ultralydsklinge amplitude 10%%</lang>
|
||||
<lang langKey="pt">Lâmina ultrassom amplitude 10%%</lang>
|
||||
<lang langKey="es">Cuchilla ultrasonidos amplitud 10%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>81</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound blade amplitude 20%%</lang>
|
||||
<lang langKey="it">Lama ultrasuoni amplitude 20%%</lang>
|
||||
<lang langKey="fr">Lame à ultrasons, amplitude 20%%</lang>
|
||||
<lang langKey="de">Ultraschallklingenamplitude 20%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučne oštrice 20%%</lang>
|
||||
<lang langKey="ro">Lama cu ultrasunete, amplitudine 20%%</lang>
|
||||
<lang langKey="nl">Ultrasoon mes amplitude 20%%</lang>
|
||||
<lang langKey="el">Λεπίδα υπερήχων πλάτους 20%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой резец амплитуда 20%%</lang>
|
||||
<lang langKey="pl">Ostrze ultradźwiękowe amplituda 20%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsblad 20%%</lang>
|
||||
<lang langKey="da">Ultralydsklinge amplitude 20%%</lang>
|
||||
<lang langKey="pt">Lâmina ultrassom amplitude 20%%</lang>
|
||||
<lang langKey="es">Cuchilla ultrasonidos amplitud 20%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>82</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound blade amplitude 30%%</lang>
|
||||
<lang langKey="it">Lama ultrasuoni amplitude 30%%</lang>
|
||||
<lang langKey="fr">Lame à ultrasons, amplitude 30%%</lang>
|
||||
<lang langKey="de">Ultraschallklingenamplitude 30%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučne oštrice 30%%</lang>
|
||||
<lang langKey="ro">Lama cu ultrasunete, amplitudine 30%%</lang>
|
||||
<lang langKey="nl">Ultrasoon mes amplitude 30%%</lang>
|
||||
<lang langKey="el">Λεπίδα υπερήχων πλάτους 30%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой резец амплитуда 30%%</lang>
|
||||
<lang langKey="pl">Ostrze ultradźwiękowe amplituda 30%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsblad 30%%</lang>
|
||||
<lang langKey="da">Ultralydsklinge amplitude 30%%</lang>
|
||||
<lang langKey="pt">Lâmina ultrassom amplitude 30%%</lang>
|
||||
<lang langKey="es">Cuchilla ultrasonidos amplitud 30%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>83</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound blade amplitude 40%%</lang>
|
||||
<lang langKey="it">Lama ultrasuoni amplitude 40%%</lang>
|
||||
<lang langKey="fr">Lame à ultrasons, amplitude 40%%</lang>
|
||||
<lang langKey="de">Ultraschallklingenamplitude 40%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučne oštrice 40%%</lang>
|
||||
<lang langKey="ro">Lama cu ultrasunete, amplitudine 40%%</lang>
|
||||
<lang langKey="nl">Ultrasoon mes amplitude 40%%</lang>
|
||||
<lang langKey="el">Λεπίδα υπερήχων πλάτους 40%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой резец амплитуда 40%%</lang>
|
||||
<lang langKey="pl">Ostrze ultradźwiękowe amplituda 40%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsblad 40%%</lang>
|
||||
<lang langKey="da">Ultralydsklinge amplitude 40%%</lang>
|
||||
<lang langKey="pt">Lâmina ultrassom amplitude 40%%</lang>
|
||||
<lang langKey="es">Cuchilla ultrasonidos amplitud 40%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>84</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound blade amplitude 50%%</lang>
|
||||
<lang langKey="it">Lama ultrasuoni amplitude 50%%</lang>
|
||||
<lang langKey="fr">Lame à ultrasons, amplitude 50%%</lang>
|
||||
<lang langKey="de">Ultraschallklingenamplitude 50%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučne oštrice 50%%</lang>
|
||||
<lang langKey="ro">Lama cu ultrasunete, amplitudine 50%%</lang>
|
||||
<lang langKey="nl">Ultrasoon mes amplitude 50%%</lang>
|
||||
<lang langKey="el">Λεπίδα υπερήχων πλάτους 50%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой резец амплитуда 50%%</lang>
|
||||
<lang langKey="pl">Ostrze ultradźwiękowe amplituda 50%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsblad 50%%</lang>
|
||||
<lang langKey="da">Ultralydsklinge amplitude 50%%</lang>
|
||||
<lang langKey="pt">Lâmina ultrassom amplitude 50%%</lang>
|
||||
<lang langKey="es">Cuchilla ultrasonidos amplitud 50%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>85</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound blade amplitude 60%%</lang>
|
||||
<lang langKey="it">Lama ultrasuoni amplitude 60%%</lang>
|
||||
<lang langKey="fr">Lame à ultrasons, amplitude 60%%</lang>
|
||||
<lang langKey="de">Ultraschallklingenamplitude 60%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučne oštrice 60%%</lang>
|
||||
<lang langKey="ro">Lama cu ultrasunete, amplitudine 60%%</lang>
|
||||
<lang langKey="nl">Ultrasoon mes amplitude 60%%</lang>
|
||||
<lang langKey="el">Λεπίδα υπερήχων πλάτους 60%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой резец амплитуда 60%%</lang>
|
||||
<lang langKey="pl">Ostrze ultradźwiękowe amplituda 60%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsblad 60%%</lang>
|
||||
<lang langKey="da">Ultralydsklinge amplitude 60%%</lang>
|
||||
<lang langKey="pt">Lâmina ultrassom amplitude 60%%</lang>
|
||||
<lang langKey="es">Cuchilla ultrasonidos amplitud 60%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>86</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound blade amplitude 70%%</lang>
|
||||
<lang langKey="it">Lama ultrasuoni amplitude 70%%</lang>
|
||||
<lang langKey="fr">Lame à ultrasons, amplitude 70%%</lang>
|
||||
<lang langKey="de">Ultraschallklingenamplitude 70%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučne oštrice 70%%</lang>
|
||||
<lang langKey="ro">Lama cu ultrasunete, amplitudine 70%%</lang>
|
||||
<lang langKey="nl">Ultrasoon mes amplitude 70%%</lang>
|
||||
<lang langKey="el">Λεπίδα υπερήχων πλάτους 70%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой резец амплитуда 70%%</lang>
|
||||
<lang langKey="pl">Ostrze ultradźwiękowe amplituda 70%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsblad 70%%</lang>
|
||||
<lang langKey="da">Ultralydsklinge amplitude 70%%</lang>
|
||||
<lang langKey="pt">Lâmina ultrassom amplitude 70%%</lang>
|
||||
<lang langKey="es">Cuchilla ultrasonidos amplitud 70%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>87</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound blade amplitude 80%%</lang>
|
||||
<lang langKey="it">Lama ultrasuoni amplitude 80%%</lang>
|
||||
<lang langKey="fr">Lame à ultrasons, amplitude 80%%</lang>
|
||||
<lang langKey="de">Ultraschallklingenamplitude 80%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučne oštrice 80%%</lang>
|
||||
<lang langKey="ro">Lama cu ultrasunete, amplitudine 80%%</lang>
|
||||
<lang langKey="nl">Ultrasoon mes amplitude 80%%</lang>
|
||||
<lang langKey="el">Λεπίδα υπερήχων πλάτους 80%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой резец амплитуда 80%%</lang>
|
||||
<lang langKey="pl">Ostrze ultradźwiękowe amplituda 80%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsblad 80%%</lang>
|
||||
<lang langKey="da">Ultralydsklinge amplitude 80%%</lang>
|
||||
<lang langKey="pt">Lâmina ultrassom amplitude 80%%</lang>
|
||||
<lang langKey="es">Cuchilla ultrasonidos amplitud 80%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>88</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound blade amplitude 90%%</lang>
|
||||
<lang langKey="it">Lama ultrasuoni amplitude 90%%</lang>
|
||||
<lang langKey="fr">Lame à ultrasons, amplitude 90%%</lang>
|
||||
<lang langKey="de">Ultraschallklingenamplitude 90%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučne oštrice 90%%</lang>
|
||||
<lang langKey="ro">Lama cu ultrasunete, amplitudine 90%%</lang>
|
||||
<lang langKey="nl">Ultrasoon mes amplitude 90%%</lang>
|
||||
<lang langKey="el">Λεπίδα υπερήχων πλάτους 90%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой резец амплитуда 90%%</lang>
|
||||
<lang langKey="pl">Ostrze ultradźwiękowe amplituda 90%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsblad 90%%</lang>
|
||||
<lang langKey="da">Ultralydsklinge amplitude 90%%</lang>
|
||||
<lang langKey="pt">Lâmina ultrassom amplitude 90%%</lang>
|
||||
<lang langKey="es">Cuchilla ultrasonidos amplitud 90%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>89</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound blade amplitude 100%%</lang>
|
||||
<lang langKey="it">Lama ultrasuoni amplitude 100%%</lang>
|
||||
<lang langKey="fr">Lame à ultrasons, amplitude 100%%</lang>
|
||||
<lang langKey="de">Ultraschallklingenamplitude 100%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučne oštrice 100%%</lang>
|
||||
<lang langKey="ro">Lama cu ultrasunete, amplitudine 100%%</lang>
|
||||
<lang langKey="nl">Ultrasoon mes amplitude 100%%</lang>
|
||||
<lang langKey="el">Λεπίδα υπερήχων πλάτους 100%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой резец амплитуда 100%%</lang>
|
||||
<lang langKey="pl">Ostrze ultradźwiękowe amplituda 100%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsblad 100%%</lang>
|
||||
<lang langKey="da">Ultralydsklinge amplitude 100%%</lang>
|
||||
<lang langKey="pt">Lâmina ultrassom amplitude 100%%</lang>
|
||||
<lang langKey="es">Cuchilla ultrasonidos amplitud 100%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>90</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Blade 1</lang>
|
||||
<lang langKey="it">Lama 1</lang>
|
||||
<lang langKey="fr">Lame 1</lang>
|
||||
<lang langKey="de">Klinge 1</lang>
|
||||
<lang langKey="hr">List pile 1</lang>
|
||||
<lang langKey="ro">Lama 1</lang>
|
||||
<lang langKey="nl">Mes 1</lang>
|
||||
<lang langKey="el">Λάμα 1</lang>
|
||||
<lang langKey="ru">Резец 1</lang>
|
||||
<lang langKey="pl">Ostrze 1</lang>
|
||||
<lang langKey="sv">Blad 1</lang>
|
||||
<lang langKey="da">Klinge 1</lang>
|
||||
<lang langKey="pt">Lâmina 1</lang>
|
||||
<lang langKey="es">Cuchilla 1</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>91</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Blade 2</lang>
|
||||
<lang langKey="it">Lama 2</lang>
|
||||
<lang langKey="fr">Lame 2</lang>
|
||||
<lang langKey="de">Klinge 2</lang>
|
||||
<lang langKey="hr">List pile 2</lang>
|
||||
<lang langKey="ro">Lama 2</lang>
|
||||
<lang langKey="nl">Mes 2</lang>
|
||||
<lang langKey="el">Λάμα 2</lang>
|
||||
<lang langKey="ru">Резец 2</lang>
|
||||
<lang langKey="pl">Ostrze 2</lang>
|
||||
<lang langKey="sv">Blad 2</lang>
|
||||
<lang langKey="da">Klinge 2</lang>
|
||||
<lang langKey="pt">Lâmina 2</lang>
|
||||
<lang langKey="es">Cuchilla 2</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>92</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Blade 3</lang>
|
||||
<lang langKey="it">Lama 3</lang>
|
||||
<lang langKey="fr">Lame 3</lang>
|
||||
<lang langKey="de">Klinge 3</lang>
|
||||
<lang langKey="hr">List pile 3</lang>
|
||||
<lang langKey="ro">Lama 3</lang>
|
||||
<lang langKey="nl">Mes 3</lang>
|
||||
<lang langKey="el">Λάμα 3</lang>
|
||||
<lang langKey="ru">Резец 3</lang>
|
||||
<lang langKey="pl">Ostrze 3</lang>
|
||||
<lang langKey="sv">Blad 3</lang>
|
||||
<lang langKey="da">Klinge 3</lang>
|
||||
<lang langKey="pt">Lâmina 3</lang>
|
||||
<lang langKey="es">Cuchilla 3</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>93</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Blade 4</lang>
|
||||
<lang langKey="it">Lama 4</lang>
|
||||
<lang langKey="fr">Lame 4</lang>
|
||||
<lang langKey="de">Klinge 4</lang>
|
||||
<lang langKey="hr">List pile 4</lang>
|
||||
<lang langKey="ro">Lama 4</lang>
|
||||
<lang langKey="nl">Mes 4</lang>
|
||||
<lang langKey="el">Λάμα 4</lang>
|
||||
<lang langKey="ru">Резец 4</lang>
|
||||
<lang langKey="pl">Ostrze 4</lang>
|
||||
<lang langKey="sv">Blad 4</lang>
|
||||
<lang langKey="da">Klinge 4</lang>
|
||||
<lang langKey="pt">Lâmina 4</lang>
|
||||
<lang langKey="es">Cuchilla 4</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>94</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Blade 5</lang>
|
||||
<lang langKey="it">Lama 5</lang>
|
||||
<lang langKey="fr">Lame 5</lang>
|
||||
<lang langKey="de">Klinge 5</lang>
|
||||
<lang langKey="hr">List pile 5</lang>
|
||||
<lang langKey="ro">Lama 5</lang>
|
||||
<lang langKey="nl">Mes 5</lang>
|
||||
<lang langKey="el">Λάμα 5</lang>
|
||||
<lang langKey="ru">Резец 5</lang>
|
||||
<lang langKey="pl">Ostrze 5</lang>
|
||||
<lang langKey="sv">Blad 5</lang>
|
||||
<lang langKey="da">Klinge 5</lang>
|
||||
<lang langKey="pt">Lâmina 5</lang>
|
||||
<lang langKey="es">Cuchilla 5</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>95</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Blade 6</lang>
|
||||
<lang langKey="it">Lama 6</lang>
|
||||
<lang langKey="fr">Lame 6</lang>
|
||||
<lang langKey="de">Klinge 6</lang>
|
||||
<lang langKey="hr">List pile 6</lang>
|
||||
<lang langKey="ro">Lama 6</lang>
|
||||
<lang langKey="nl">Mes 6</lang>
|
||||
<lang langKey="el">Λάμα 6</lang>
|
||||
<lang langKey="ru">Резец 6</lang>
|
||||
<lang langKey="pl">Ostrze 6</lang>
|
||||
<lang langKey="sv">Blad 6</lang>
|
||||
<lang langKey="da">Klinge 6</lang>
|
||||
<lang langKey="pt">Lâmina 6</lang>
|
||||
<lang langKey="es">Cuchilla 6</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>96</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Blade 7</lang>
|
||||
<lang langKey="it">Lama 7</lang>
|
||||
<lang langKey="fr">Lame 7</lang>
|
||||
<lang langKey="de">Klinge 7</lang>
|
||||
<lang langKey="hr">List pile 7</lang>
|
||||
<lang langKey="ro">Lama 7</lang>
|
||||
<lang langKey="nl">Mes 7</lang>
|
||||
<lang langKey="el">Λάμα 7</lang>
|
||||
<lang langKey="ru">Резец 7</lang>
|
||||
<lang langKey="pl">Ostrze 7</lang>
|
||||
<lang langKey="sv">Blad 7</lang>
|
||||
<lang langKey="da">Klinge 7</lang>
|
||||
<lang langKey="pt">Lâmina 7</lang>
|
||||
<lang langKey="es">Cuchilla 7</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>97</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Blade ⌀300</lang>
|
||||
<lang langKey="it">Lama ⌀300</lang>
|
||||
<lang langKey="fr">Lame ⌀300</lang>
|
||||
<lang langKey="de">Klinge ⌀300</lang>
|
||||
<lang langKey="hr">List pile ⌀300</lang>
|
||||
<lang langKey="ro">Lama ⌀300</lang>
|
||||
<lang langKey="nl">Mes ⌀300</lang>
|
||||
<lang langKey="el">Λάμα ⌀300</lang>
|
||||
<lang langKey="ru">Резец ⌀300</lang>
|
||||
<lang langKey="pl">Ostrze ⌀300</lang>
|
||||
<lang langKey="sv">Blad ⌀300</lang>
|
||||
<lang langKey="da">Klinge ⌀300</lang>
|
||||
<lang langKey="pt">Lâmina ⌀300</lang>
|
||||
<lang langKey="es">Cuchilla ⌀300</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>98</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Blade ⌀400</lang>
|
||||
<lang langKey="it">Lama ⌀400</lang>
|
||||
<lang langKey="fr">Lame ⌀400</lang>
|
||||
<lang langKey="de">Klinge ⌀400</lang>
|
||||
<lang langKey="hr">List pile ⌀400</lang>
|
||||
<lang langKey="ro">Lama ⌀400</lang>
|
||||
<lang langKey="nl">Mes ⌀400</lang>
|
||||
<lang langKey="el">Λάμα ⌀400</lang>
|
||||
<lang langKey="ru">Резец ⌀400</lang>
|
||||
<lang langKey="pl">Ostrze ⌀400</lang>
|
||||
<lang langKey="sv">Blad ⌀400</lang>
|
||||
<lang langKey="da">Klinge ⌀400</lang>
|
||||
<lang langKey="pt">Lâmina ⌀400</lang>
|
||||
<lang langKey="es">Cuchilla ⌀400</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>99</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Blade ⌀500</lang>
|
||||
<lang langKey="it">Lama ⌀500</lang>
|
||||
<lang langKey="fr">Lame ⌀500</lang>
|
||||
<lang langKey="de">Klinge ⌀500</lang>
|
||||
<lang langKey="hr">List pile ⌀500</lang>
|
||||
<lang langKey="ro">Lama ⌀500</lang>
|
||||
<lang langKey="nl">Mes ⌀500</lang>
|
||||
<lang langKey="el">Λάμα ⌀500</lang>
|
||||
<lang langKey="ru">Резец ⌀500</lang>
|
||||
<lang langKey="pl">Ostrze ⌀500</lang>
|
||||
<lang langKey="sv">Blad ⌀500</lang>
|
||||
<lang langKey="da">Klinge ⌀500</lang>
|
||||
<lang langKey="pt">Lâmina ⌀500</lang>
|
||||
<lang langKey="es">Cuchilla ⌀500</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>101</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Radio Probe 1 - Reciever 1</lang>
|
||||
<lang langKey="it">Radio Probe 1 - Ricevitore 1</lang>
|
||||
<lang langKey="fr">Radio Probe 1 - Récepteur 1</lang>
|
||||
<lang langKey="de">Radio Probe 1 - Empfänger 1</lang>
|
||||
<lang langKey="hr">Radio Probe 1 - Prijemnik 1</lang>
|
||||
<lang langKey="ro">Probe Radio 1 - Receptor 1</lang>
|
||||
<lang langKey="nl">Radio Probe 1 - Ontvanger 1</lang>
|
||||
<lang langKey="el">Ραδιο-ανιχνευτής 1 - Δέκτης 1</lang>
|
||||
<lang langKey="ru">Радиодатчик 1 - Приемник 1</lang>
|
||||
<lang langKey="pl">Sonda radiowa 1 - Odbiornik 1</lang>
|
||||
<lang langKey="sv">Radiosond 1 - Mottagare 1</lang>
|
||||
<lang langKey="da">Radio Sonde 1 - Modtager 1</lang>
|
||||
<lang langKey="pt">Sonda Probe 1 - Receptor 1</lang>
|
||||
<lang langKey="es">Radio Probe 1 - Receptor 1</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>102</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Radio Probe 2 - Reciever 1</lang>
|
||||
<lang langKey="it">Radio Probe 2 - Ricevitore 1</lang>
|
||||
<lang langKey="fr">Radio Probe 2 - Récepteur 1</lang>
|
||||
<lang langKey="de">Radio Probe 2 - Empfänger 1</lang>
|
||||
<lang langKey="hr">Radio Probe 2 - Prijemnik 1</lang>
|
||||
<lang langKey="ro">Probe Radio 2 - Receptor 1</lang>
|
||||
<lang langKey="nl">Radio Probe 2 - Ontvanger 1</lang>
|
||||
<lang langKey="el">Ραδιο-ανιχνευτής 2 - Δέκτης 1</lang>
|
||||
<lang langKey="ru">Радиодатчик 2 - Приемник 1</lang>
|
||||
<lang langKey="pl">Sonda radiowa 2 - Odbiornik 1</lang>
|
||||
<lang langKey="sv">Radiosond 2 - Mottagare 1</lang>
|
||||
<lang langKey="da">Radio Sonde 2 - Modtager 1</lang>
|
||||
<lang langKey="pt">Sonda Probe 2 - Receptor 1</lang>
|
||||
<lang langKey="es">Radio Probe 2 - Receptor 1</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>103</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Radio Probe 3 - Reciever 1</lang>
|
||||
<lang langKey="it">Radio Probe 3 - Ricevitore 1</lang>
|
||||
<lang langKey="fr">Radio Probe 3 - Récepteur 1</lang>
|
||||
<lang langKey="de">Radio Probe 3 - Empfänger 1</lang>
|
||||
<lang langKey="hr">Radio Probe 3 - Prijemnik 1</lang>
|
||||
<lang langKey="ro">Probe Radio 3 - Receptor 1</lang>
|
||||
<lang langKey="nl">Radio Probe 3 - Ontvanger 1</lang>
|
||||
<lang langKey="el">Ραδιο-ανιχνευτής 3 - Δέκτης 1</lang>
|
||||
<lang langKey="ru">Радиодатчик 3 - Приемник 1</lang>
|
||||
<lang langKey="pl">Sonda radiowa 3 - Odbiornik 1</lang>
|
||||
<lang langKey="sv">Radiosond 3 - Mottagare 1</lang>
|
||||
<lang langKey="da">Radio Sonde 3 - Modtager 1</lang>
|
||||
<lang langKey="pt">Sonda Probe 3 - Receptor 1</lang>
|
||||
<lang langKey="es">Radio Probe 3 - Receptor 1</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>104</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Radio Probe 4 - Reciever 1</lang>
|
||||
<lang langKey="it">Radio Probe 4 - Ricevitore 1</lang>
|
||||
<lang langKey="fr">Radio Probe 4 - Récepteur 1</lang>
|
||||
<lang langKey="de">Radio Probe 4 - Empfänger 1</lang>
|
||||
<lang langKey="hr">Radio Probe 4 - Prijemnik 1</lang>
|
||||
<lang langKey="ro">Probe Radio 4 - Receptor 1</lang>
|
||||
<lang langKey="nl">Radio Probe 4 - Ontvanger 1</lang>
|
||||
<lang langKey="el">Ραδιο-ανιχνευτής 4 - Δέκτης 1</lang>
|
||||
<lang langKey="ru">Радиодатчик 4 - Приемник 1</lang>
|
||||
<lang langKey="pl">Sonda radiowa 4 - Odbiornik 1</lang>
|
||||
<lang langKey="sv">Radiosond 4 - Mottagare 1</lang>
|
||||
<lang langKey="da">Radio Sonde 4 - Modtager 1</lang>
|
||||
<lang langKey="pt">Sonda Probe 4 - Receptor 1</lang>
|
||||
<lang langKey="es">Radio Probe 4 - Receptor 1</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>105</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Radio Probe 1 - Reciever 2</lang>
|
||||
<lang langKey="it">Radio Probe 1 - Ricevitore 2</lang>
|
||||
<lang langKey="fr">Radio Probe 1 - Récepteur 2</lang>
|
||||
<lang langKey="de">Radio Probe 1 - Empfänger 2</lang>
|
||||
<lang langKey="hr">Radio Probe 1 - Prijemnik 2</lang>
|
||||
<lang langKey="ro">Probe Radio 1 - Receptor 2</lang>
|
||||
<lang langKey="nl">Radio Probe 1 - Ontvanger 2</lang>
|
||||
<lang langKey="el">Ραδιο-ανιχνευτής 1 - Δέκτης 2</lang>
|
||||
<lang langKey="ru">Радиодатчик 1 - Приемник 2</lang>
|
||||
<lang langKey="pl">Sonda radiowa 1 - Odbiornik 2</lang>
|
||||
<lang langKey="sv">Radiosond 1 - Mottagare 2</lang>
|
||||
<lang langKey="da">Radio Sonde 1 - Modtager 2</lang>
|
||||
<lang langKey="pt">Sonda Probe 1 - Receptor 2</lang>
|
||||
<lang langKey="es">Radio Probe 1 - Receptor 2</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>106</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Radio Probe 2 - Reciever 2</lang>
|
||||
<lang langKey="it">Radio Probe 2 - Ricevitore 2</lang>
|
||||
<lang langKey="fr">Radio Probe 2 - Récepteur 2</lang>
|
||||
<lang langKey="de">Radio Probe 2 - Empfänger 2</lang>
|
||||
<lang langKey="hr">Radio Probe 2 - Prijemnik 2</lang>
|
||||
<lang langKey="ro">Probe Radio 2 - Receptor 2</lang>
|
||||
<lang langKey="nl">Radio Probe 2 - Ontvanger 2</lang>
|
||||
<lang langKey="el">Ραδιο-ανιχνευτής 2 - Δέκτης 2</lang>
|
||||
<lang langKey="ru">Радиодатчик 2 - Приемник 2</lang>
|
||||
<lang langKey="pl">Sonda radiowa 2 - Odbiornik 2</lang>
|
||||
<lang langKey="sv">Radiosond 2 - Mottagare 2</lang>
|
||||
<lang langKey="da">Radio Sonde 2 - Modtager 2</lang>
|
||||
<lang langKey="pt">Sonda Probe 2 - Receptor 2</lang>
|
||||
<lang langKey="es">Radio Probe 2 - Receptor 2</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>107</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Radio Probe 3 - Reciever 2</lang>
|
||||
<lang langKey="it">Radio Probe 3 - Ricevitore 2</lang>
|
||||
<lang langKey="fr">Radio Probe 3 - Récepteur 2</lang>
|
||||
<lang langKey="de">Radio Probe 3 - Empfänger 2</lang>
|
||||
<lang langKey="hr">Radio Probe 3 - Prijemnik 2</lang>
|
||||
<lang langKey="ro">Probe Radio 3 - Receptor 2</lang>
|
||||
<lang langKey="nl">Radio Probe 3 - Ontvanger 2</lang>
|
||||
<lang langKey="el">Ραδιο-ανιχνευτής 3 - Δέκτης 2</lang>
|
||||
<lang langKey="ru">Радиодатчик 3 - Приемник 2</lang>
|
||||
<lang langKey="pl">Sonda radiowa 3 - Odbiornik 2</lang>
|
||||
<lang langKey="sv">Radiosond 3 - Mottagare 2</lang>
|
||||
<lang langKey="da">Radio Sonde 3 - Modtager 2</lang>
|
||||
<lang langKey="pt">Sonda Probe 3 - Receptor 2</lang>
|
||||
<lang langKey="es">Radio Probe 3 - Receptor 2</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>108</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Radio Probe 4 - Reciever 2</lang>
|
||||
<lang langKey="it">Radio Probe 4 - Ricevitore 2</lang>
|
||||
<lang langKey="fr">Radio Probe 4 - Récepteur 2</lang>
|
||||
<lang langKey="de">Radio Probe 4 - Empfänger 2</lang>
|
||||
<lang langKey="hr">Radio Probe 4 - Prijemnik 2</lang>
|
||||
<lang langKey="ro">Probe Radio 4 - Receptor 2</lang>
|
||||
<lang langKey="nl">Radio Probe 4 - Ontvanger 2</lang>
|
||||
<lang langKey="el">Ραδιο-ανιχνευτής 4 - Δέκτης 2</lang>
|
||||
<lang langKey="ru">Радиодатчик 4 - Приемник 2</lang>
|
||||
<lang langKey="pl">Sonda radiowa 4 - Odbiornik 2</lang>
|
||||
<lang langKey="sv">Radiosond 4 - Mottagare 2</lang>
|
||||
<lang langKey="da">Radio Sonde 4 - Modtager 2</lang>
|
||||
<lang langKey="pt">Sonda Probe 4 - Receptor 2</lang>
|
||||
<lang langKey="es">Radio Probe 4 - Receptor 2</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
</toolTypes>
|
||||
</root>
|
||||
@@ -1,175 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="root">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="toolManagerConfig">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="toolMetricType" type="tmType" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="familyOpt" type="xs:boolean" minOccurs='1' maxOccurs='1' />
|
||||
<xs:element name="shankOpt" type="xs:boolean" minOccurs="1" maxOccurs="1" />
|
||||
<xs:element name="magPositionOpt" type="xs:boolean" minOccurs='1' maxOccurs='1' />
|
||||
<xs:element name="offsetOpt" type="xs:boolean" minOccurs='1' maxOccurs='1' />
|
||||
<xs:element name="reviveOpt" type="xs:boolean" minOccurs='1' maxOccurs='1' />
|
||||
<xs:element name="gammaOpt" type="xs:boolean" minOccurs='1' maxOccurs='1' />
|
||||
<xs:element name="lifeOpt" type="xs:boolean" minOccurs='1' maxOccurs='1' />
|
||||
<xs:element name="tcpOpt" type="xs:boolean" minOccurs='1' maxOccurs='1' />
|
||||
<xs:element name="coolingOpt" type="xs:boolean" minOccurs='1' maxOccurs='1' />
|
||||
<xs:element name="multidimensionalShankOpt" type="xs:boolean" minOccurs='1' maxOccurs='1' />
|
||||
<xs:element name="selfAdaptivePathOpt" type="xs:boolean" minOccurs='1' maxOccurs='1' />
|
||||
<xs:element name="dynamicCompensationOpt" type="xs:boolean" minOccurs='1' maxOccurs='1' />
|
||||
<xs:element name="ballufOpt" type="xs:boolean" minOccurs='1' maxOccurs='1' />
|
||||
<xs:element name="integrityCheckOpt" type="xs:boolean" minOccurs='1' maxOccurs='1' />
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="coolingLocalizedNames">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
|
||||
<xs:element name="cooling">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="lang" type="langType" minOccurs="0" maxOccurs="unbounded">
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="cooling1">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="lang" type="langType" minOccurs="0" maxOccurs="unbounded">
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="cooling2">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="lang" type="langType" minOccurs="0" maxOccurs="unbounded">
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="cooling3">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="lang" type="langType" minOccurs="0" maxOccurs="unbounded">
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="cooling4">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="lang" type="langType" minOccurs="0" maxOccurs="unbounded">
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="cooling5">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="lang" type="langType" minOccurs="0" maxOccurs="unbounded">
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="cooling6">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="lang" type="langType" minOccurs="0" maxOccurs="unbounded">
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="cooling7">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="lang" type="langType" minOccurs="0" maxOccurs="unbounded">
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="magazineNames">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="magazine" minOccurs="1" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="id" type="xs:int"/>
|
||||
<xs:element name="assistedTooling" type="xs:boolean"/>
|
||||
<xs:element name="localizedNames">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="lang" type="langType" minOccurs="0" maxOccurs="unbounded">
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<!-- ToolTypes -->
|
||||
<xs:element name="toolTypes">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="toolType" type="toolTypeType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
|
||||
<xs:simpleType name="tmType" final="restriction" >
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="RADIUS" />
|
||||
<xs:enumeration value="DIAMETER" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<!-- Language Type -->
|
||||
<xs:complexType name="langType">
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute name="langKey" use="required" type="xs:string" />
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
|
||||
<!-- Language Type -->
|
||||
<xs:complexType name="toolTypeType">
|
||||
<xs:all>
|
||||
<xs:element name="id" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="disabled" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="localizedNames">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="lang" type="langType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
||||
@@ -205,7 +205,7 @@
|
||||
<visible>true</visible>
|
||||
</softKey_procedure>
|
||||
|
||||
<softKey_toggle>
|
||||
<!--<softKey_toggle>
|
||||
<active>false</active>
|
||||
<category>6</category>
|
||||
<operatorConfirmationNeeded>false</operatorConfirmationNeeded>
|
||||
@@ -227,7 +227,7 @@
|
||||
<lang langKey="it">Protezione magazzino 2</lang>
|
||||
</localizedNames>
|
||||
<visible>true</visible>
|
||||
</softKey_toggle>
|
||||
</softKey_toggle>-->
|
||||
|
||||
<softKey_group>
|
||||
<active>true</active>
|
||||
@@ -348,7 +348,7 @@
|
||||
<visible>true</visible>
|
||||
</softKey_procedure>
|
||||
|
||||
<softKey_procedure>
|
||||
<!--<softKey_procedure>
|
||||
<active>false</active>
|
||||
<category>6</category>
|
||||
<operatorConfirmationNeeded>false</operatorConfirmationNeeded>
|
||||
@@ -358,9 +358,9 @@
|
||||
<lang langKey="it">Attrezzaggio macchina</lang>
|
||||
</localizedNames>
|
||||
<visible>true</visible>
|
||||
</softKey_procedure>
|
||||
</softKey_procedure>-->
|
||||
|
||||
<softKey_procedure>
|
||||
<!--<softKey_procedure>
|
||||
<active>true</active>
|
||||
<category>5</category>
|
||||
<operatorConfirmationNeeded>false</operatorConfirmationNeeded>
|
||||
@@ -370,7 +370,7 @@
|
||||
<lang langKey="it">Ripristino cambio utensile</lang>
|
||||
</localizedNames>
|
||||
<visible>true</visible>
|
||||
</softKey_procedure>
|
||||
</softKey_procedure>-->
|
||||
|
||||
<softKey_toggle>
|
||||
<active>false</active>
|
||||
@@ -399,7 +399,7 @@
|
||||
<visible>true</visible>
|
||||
</softKey_group>
|
||||
|
||||
<softKey_toggle>
|
||||
<!--<softKey_toggle>
|
||||
<active>true</active>
|
||||
<category>3</category>
|
||||
<operatorConfirmationNeeded>false</operatorConfirmationNeeded>
|
||||
@@ -409,9 +409,9 @@
|
||||
<lang langKey="it">Soffiatore esterno utensile</lang>
|
||||
</localizedNames>
|
||||
<visible>true</visible>
|
||||
</softKey_toggle>
|
||||
</softKey_toggle>-->
|
||||
|
||||
<softKey_toggle>
|
||||
<!--<softKey_toggle>
|
||||
<active>false</active>
|
||||
<category>3</category>
|
||||
<operatorConfirmationNeeded>false</operatorConfirmationNeeded>
|
||||
@@ -421,7 +421,7 @@
|
||||
<lang langKey="it">Soffiatore interno utensile</lang>
|
||||
</localizedNames>
|
||||
<visible>true</visible>
|
||||
</softKey_toggle>
|
||||
</softKey_toggle>-->
|
||||
|
||||
<softKey_toggle>
|
||||
<active>false</active>
|
||||
@@ -435,7 +435,7 @@
|
||||
<visible>true</visible>
|
||||
</softKey_toggle>
|
||||
|
||||
<softKey_toggle>
|
||||
<!--<softKey_toggle>
|
||||
<active>false</active>
|
||||
<category>3</category>
|
||||
<operatorConfirmationNeeded>false</operatorConfirmationNeeded>
|
||||
@@ -457,7 +457,7 @@
|
||||
<lang langKey="it">Nebulizzatore interno utensile</lang>
|
||||
</localizedNames>
|
||||
<visible>true</visible>
|
||||
</softKey_toggle>
|
||||
</softKey_toggle>-->
|
||||
|
||||
<softKey_toggle>
|
||||
<active>false</active>
|
||||
|
||||
@@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
|
||||
// Le informazioni generali relative a un assembly sono controllate dal seguente
|
||||
// set di attributi. Modificare i valori di questi attributi per modificare le informazioni
|
||||
// associate a un assembly.
|
||||
[assembly: AssemblyTitle("Step.Config")]
|
||||
[assembly: AssemblyTitle("Thermo.Active.Config")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Step.Config")]
|
||||
[assembly: AssemblyProduct("Thermo.Active.Config")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2017")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
@@ -32,11 +32,10 @@ namespace Thermo.Active.Config
|
||||
public static List<NcSoftKeysModel> NcSoftKeysConfig;
|
||||
public static List<AlarmsConfigModel> InitialAlarmsConfig;
|
||||
public static List<HeadsConfigModel> HeadsConfig;
|
||||
public static ToolManagerConfigModel ToolManagerConfig;
|
||||
public static List<RecipeConfigModel> RecipeConfig;
|
||||
public static CmsConnectConfigModel CmsConnectConfig;
|
||||
|
||||
public static AreasConfigModel ProductionConfig;
|
||||
public static AreasConfigModel ToolingConfig;
|
||||
public static AreasConfigModel ReportConfig;
|
||||
public static AreasConfigModel AlarmsConfig;
|
||||
public static AreasConfigModel MaintenanceConfig;
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Thermo.Active.Config
|
||||
ReadUserSoftKeysConfig();
|
||||
ReadAlarmsConfig();
|
||||
ReadHeadsConfig();
|
||||
ReadToolManagerConfig();
|
||||
ReadRecipeConfig();
|
||||
// ReadCMSConnectConfig();
|
||||
ReadMacros();
|
||||
ReadScadaFile();
|
||||
@@ -113,10 +113,6 @@ namespace Thermo.Active.Config
|
||||
SetAreaValue(ref ProductionConfig, element);
|
||||
break;
|
||||
|
||||
case AREAS.TOOLING_KEY:
|
||||
SetAreaValue(ref ToolingConfig, element);
|
||||
break;
|
||||
|
||||
case AREAS.REPORT_KEY:
|
||||
SetAreaValue(ref ReportConfig, element);
|
||||
break;
|
||||
@@ -181,9 +177,6 @@ namespace Thermo.Active.Config
|
||||
{
|
||||
case AREAS.PRODUCTION_KEY:
|
||||
return ProductionConfig.Enabled;
|
||||
|
||||
case AREAS.TOOLING_KEY:
|
||||
return ToolingConfig.Enabled;
|
||||
|
||||
case AREAS.REPORT_KEY:
|
||||
return ProductionConfig.Enabled;
|
||||
@@ -580,98 +573,27 @@ namespace Thermo.Active.Config
|
||||
.ToList();
|
||||
}
|
||||
|
||||
private static void ReadToolManagerConfig()
|
||||
private static void ReadRecipeConfig()
|
||||
{
|
||||
XDocument xmlConfigFile = GetXmlHandlerWithValidator(TOOL_MANAGER_CONFIG_SCHEMA_PATH, TOOL_MANAGER_CONFIG_PATH);
|
||||
XDocument xmlConfigFile = GetXmlHandlerWithValidator(RECIPE_CONFIG_SCHEMA_PATH, RECIPE_CONFIG_PATH);
|
||||
|
||||
// Read config from XML file
|
||||
ToolManagerConfig = xmlConfigFile
|
||||
// Read head config from XML file
|
||||
RecipeConfig = xmlConfigFile
|
||||
.Root
|
||||
.Descendants("toolManagerConfig")
|
||||
.Select(x => new ToolManagerConfigModel()
|
||||
{
|
||||
ToolMetricType = x.Element("toolMetricType").Value,
|
||||
FamilyOpt = Convert.ToBoolean(x.Element("familyOpt").Value),
|
||||
ShankOpt = Convert.ToBoolean(x.Element("shankOpt").Value),
|
||||
MagPosTypeOpt = Convert.ToBoolean(x.Element("magPositionOpt").Value),
|
||||
OffsetOpt = Convert.ToBoolean(x.Element("offsetOpt").Value),
|
||||
ReviveOpt = Convert.ToBoolean(x.Element("reviveOpt").Value),
|
||||
GammaOpt = Convert.ToBoolean(x.Element("gammaOpt").Value),
|
||||
LifeOpt = Convert.ToBoolean(x.Element("lifeOpt").Value),
|
||||
TcpOpt = Convert.ToBoolean(x.Element("tcpOpt").Value),
|
||||
CoolingOpt = Convert.ToBoolean(x.Element("coolingOpt").Value),
|
||||
MultidimensionalShankOpt = Convert.ToBoolean(x.Element("multidimensionalShankOpt").Value),
|
||||
SelfAdaptivePathOpt = Convert.ToBoolean(x.Element("selfAdaptivePathOpt").Value),
|
||||
DynamicCompensationOpt = Convert.ToBoolean(x.Element("dynamicCompensationOpt").Value),
|
||||
BallufOpt = Convert.ToBoolean(x.Element("ballufOpt").Value),
|
||||
IntegrityCheckOpt = Convert.ToBoolean(x.Element("integrityCheckOpt").Value)
|
||||
})
|
||||
.FirstOrDefault();
|
||||
|
||||
|
||||
ToolManagerConfig.CooligsTranslations = xmlConfigFile
|
||||
.Root
|
||||
.Descendants("coolingLocalizedNames")
|
||||
.Select(x => new CooligTranslations()
|
||||
{
|
||||
Cooling = x.Element("cooling").Elements().ToDictionary( // Read localized names of cooling and convert into a dictionary
|
||||
y => y.Attribute("langKey").Value, y => y.Value
|
||||
),
|
||||
Cooling1 = x.Element("cooling1").Elements().ToDictionary(
|
||||
y => y.Attribute("langKey").Value, y => y.Value
|
||||
),
|
||||
Cooling2 = x.Element("cooling2").Elements().ToDictionary(
|
||||
y => y.Attribute("langKey").Value, y => y.Value
|
||||
),
|
||||
Cooling3 = x.Element("cooling3").Elements().ToDictionary(
|
||||
y => y.Attribute("langKey").Value, y => y.Value
|
||||
),
|
||||
Cooling4 = x.Element("cooling4").Elements().ToDictionary(
|
||||
y => y.Attribute("langKey").Value, y => y.Value
|
||||
),
|
||||
Cooling5 = x.Element("cooling5").Elements().ToDictionary(
|
||||
y => y.Attribute("langKey").Value, y => y.Value
|
||||
),
|
||||
Cooling6 = x.Element("cooling6").Elements().ToDictionary(
|
||||
y => y.Attribute("langKey").Value, y => y.Value
|
||||
),
|
||||
Cooling7 = x.Element("cooling7").Elements().ToDictionary(
|
||||
y => y.Attribute("langKey").Value, y => y.Value
|
||||
)
|
||||
|
||||
})
|
||||
.FirstOrDefault();
|
||||
|
||||
ToolManagerConfig.MagazineNames = xmlConfigFile
|
||||
.Root
|
||||
.Descendants("magazineNames")
|
||||
.Elements()
|
||||
.Select(x => new MagazineNamesModel()
|
||||
.Select(x => new RecipeConfigModel()
|
||||
{
|
||||
MagazineId = Convert.ToInt32(x.Element("id").Value),
|
||||
AssistedTooling = Convert.ToBoolean(x.Element("assistedTooling").Value),
|
||||
LocalizedNames = x.Element("localizedNames").Elements().ToDictionary( // Read localized names and convert into a dictionary
|
||||
y => y.Attribute("langKey").Value, y => y.Value
|
||||
),
|
||||
})
|
||||
.ToList();
|
||||
|
||||
ToolManagerConfig.ToolTypes = xmlConfigFile
|
||||
.Root
|
||||
.Descendants("toolTypes")
|
||||
.Elements()
|
||||
.Select(x => new ToolTypeConfigModel()
|
||||
{
|
||||
Id = Convert.ToInt32(x.Element("id").Value),
|
||||
Disabled = Convert.ToBoolean(x.Element("disabled").Value),
|
||||
LocalizedNames = x.Element("localizedNames").Elements().ToDictionary( // Read localized names and convert into a dictionary
|
||||
y => y.Attribute("langKey").Value, y => y.Value
|
||||
),
|
||||
Id = Convert.ToInt16(x.Element("id").Value),
|
||||
Category = GetTActCategory(x.Element("category").Value),
|
||||
SubCategory_1 = x.Element("subCategory_1").Value,
|
||||
SubCategory_2 = x.Element("subCategory_2").Value,
|
||||
Name = x.Element("name").Value,
|
||||
Description = x.Element("description").Value,
|
||||
Format = x.Element("format").Value
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
|
||||
|
||||
private static void ReadCMSConnectConfig()
|
||||
{
|
||||
String _tempUSR, _tempPSW;
|
||||
|
||||
@@ -69,9 +69,8 @@
|
||||
<Content Include="Config\customMainProgram.txt">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Config\toolManagerConfig.xml">
|
||||
<Content Include="Config\recipeConfig.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="Config\userSoftKeyConfig.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
@@ -87,7 +86,7 @@
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<EmbeddedResource Include="Config\headsConfigValidator.xsd">
|
||||
<EmbeddedResource Include="Config\recipeConfigValidator.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Config\maintenancesConfigValidator.xsd">
|
||||
@@ -113,9 +112,6 @@
|
||||
<EmbeddedResource Include="Config\ncSoftKeyConfigValidator.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Config\toolManagerConfigValidator.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Thermo.Active.Model\Thermo.Active.Model.csproj">
|
||||
@@ -158,5 +154,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Config\headsConfigValidator.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
|
||||
// Le informazioni generali relative a un assembly sono controllate dal seguente
|
||||
// set di attributi. Modificare i valori di questi attributi per modificare le informazioni
|
||||
// associate a un assembly.
|
||||
[assembly: AssemblyTitle("Step.Core")]
|
||||
[assembly: AssemblyTitle("Thermo.Active.Core")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Step.Tasks")]
|
||||
[assembly: AssemblyProduct("Thermo.Active.Tasks")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2017")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
@@ -32,9 +32,6 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="CMS_CORE_Library">
|
||||
<HintPath>..\Libs\CMS_CORE_Library.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
@@ -63,6 +60,10 @@
|
||||
<Compile Include="ThreadsSiemensHmi.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\cms_core_library\CMS_CORE_Library\CMS_CORE_Library.csproj">
|
||||
<Project>{4abf8eef-2b23-483e-acdc-53214fe28681}</Project>
|
||||
<Name>CMS_CORE_Library</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Thermo.Active.Config\Thermo.Active.Config.csproj">
|
||||
<Project>{3f5c2483-fc87-43ef-92a8-66ff7d0e440f}</Project>
|
||||
<Name>Thermo.Active.Config</Name>
|
||||
|
||||
@@ -5,7 +5,6 @@ using Thermo.Active.Database.Controllers;
|
||||
using Thermo.Active.Model.DTOModels;
|
||||
using Thermo.Active.Model.DTOModels.AlarmModels;
|
||||
using Thermo.Active.Model.DTOModels.Scada;
|
||||
using Thermo.Active.Model.DTOModels.ToolModels;
|
||||
using Thermo.Active.NC;
|
||||
using Thermo.Active.Utils;
|
||||
using System;
|
||||
@@ -22,20 +21,22 @@ using TeamDev.SDK.MVVM;
|
||||
using static CMS_CORE_Library.Models.DataStructures;
|
||||
using static Thermo.Active.Config.ServerConfig;
|
||||
using static Thermo.Active.Model.Constants;
|
||||
using static Thermo.Active.Utils.ExceptionManager;
|
||||
using static Thermo.Active.Utils.ExceptionManager;
|
||||
using Thermo.Active.Model.DTOModels.Recipe;
|
||||
|
||||
public static class ThreadsFunctions
|
||||
public static class ThreadsFunctions
|
||||
{
|
||||
public static int recipeRtCounter = 5;
|
||||
public static bool reconnectionIsRunning = false;
|
||||
|
||||
private static ConcurrentDictionary<string, long> Timers = new ConcurrentDictionary<string, long>();
|
||||
private static ConcurrentDictionary<string, long> Counter = new ConcurrentDictionary<string, long>();
|
||||
|
||||
private static Thread ConnThread;
|
||||
|
||||
|
||||
#region Functions
|
||||
|
||||
public static void ManageWatchdog()
|
||||
public static void ManageWatchdog()
|
||||
{
|
||||
NcAdapter ncAdapter = new NcAdapter();
|
||||
Stopwatch sw = new Stopwatch();
|
||||
@@ -48,7 +49,7 @@ public static class ThreadsFunctions
|
||||
|
||||
while (true)
|
||||
{
|
||||
sw.Restart();
|
||||
sw.Restart();
|
||||
|
||||
//if(errorCounter == MAX_NUM_OF_WATCHDOG_ERROR)
|
||||
//{
|
||||
@@ -56,7 +57,7 @@ public static class ThreadsFunctions
|
||||
//}
|
||||
|
||||
// Check if client is connected
|
||||
if (ncAdapter.numericalControl.NC_IsConnected())
|
||||
if (ncAdapter.numericalControl.NC_IsConnected())
|
||||
{
|
||||
// Manage watchdog
|
||||
libraryError = ncAdapter.ManageWatchdog();
|
||||
@@ -66,7 +67,7 @@ public static class ThreadsFunctions
|
||||
errorCounter++;
|
||||
}
|
||||
else if (libraryError == NO_ERROR)
|
||||
errorCounter = 0;
|
||||
errorCounter = 0;
|
||||
}
|
||||
else
|
||||
RestoreConnection();
|
||||
@@ -376,6 +377,7 @@ public static class ThreadsFunctions
|
||||
}
|
||||
}
|
||||
|
||||
#if false
|
||||
public static void ReadHeadsData()
|
||||
{
|
||||
NcAdapter ncAdapter = new NcAdapter();
|
||||
@@ -418,7 +420,8 @@ public static class ThreadsFunctions
|
||||
{
|
||||
ncAdapter.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
public static void ReadAxesNamesData()
|
||||
{
|
||||
@@ -508,50 +511,7 @@ public static class ThreadsFunctions
|
||||
}
|
||||
}
|
||||
|
||||
public static void ReadMagazinesStatus()
|
||||
{
|
||||
SiemensToolTableAdapter ncAdapter = new SiemensToolTableAdapter();
|
||||
Stopwatch sw = new Stopwatch();
|
||||
|
||||
try
|
||||
{
|
||||
// Try connection
|
||||
CmsError libraryError = ncAdapter.Connect();
|
||||
if (libraryError.errorCode != 0)
|
||||
ManageLibraryError(libraryError);
|
||||
|
||||
while (true)
|
||||
{
|
||||
sw.Restart();
|
||||
|
||||
if (ncAdapter.numericalControl.NC_IsConnected())
|
||||
{
|
||||
// Get Data from config and PLC
|
||||
libraryError = ncAdapter.GetMagazineStatus(out DTOMagazineActionModel magazineStatus);
|
||||
if (libraryError.errorCode != 0)
|
||||
ManageLibraryError(libraryError);
|
||||
else
|
||||
// Send through signalR
|
||||
MessageServices.Current.Publish(SEND_MAGAZINES_STATUS, null, magazineStatus);
|
||||
}
|
||||
else
|
||||
RestoreConnection();
|
||||
|
||||
sw.Stop();
|
||||
|
||||
//Update thread timer
|
||||
UpdateStat(MethodBase.GetCurrentMethod().Name, sw.ElapsedMilliseconds);
|
||||
|
||||
// Wait
|
||||
Thread.Sleep(CalcSleepTime(1000, (int)sw.ElapsedMilliseconds));
|
||||
}
|
||||
}
|
||||
catch (ThreadAbortException)
|
||||
{
|
||||
ncAdapter.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
#if false
|
||||
public static void ReadActiveProgramData()
|
||||
{
|
||||
NcFileAdapter ncAdapter = new NcFileAdapter();
|
||||
@@ -595,110 +555,10 @@ public static class ThreadsFunctions
|
||||
{
|
||||
ncAdapter.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
public static void UpdateToolsData()
|
||||
{
|
||||
NcToolTableAdapter ncAdapter = new NcToolTableAdapter();
|
||||
Stopwatch sw = new Stopwatch();
|
||||
|
||||
if(NcConfig.NcVendor != NC_VENDOR.SIEMENS)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Try connection
|
||||
CmsError libraryError = ncAdapter.Connect();
|
||||
if (libraryError.errorCode != 0)
|
||||
ManageLibraryError(libraryError);
|
||||
|
||||
while (true)
|
||||
{
|
||||
sw.Restart();
|
||||
|
||||
// Check if client is connected
|
||||
if (ncAdapter.numericalControl.NC_IsConnected())
|
||||
{
|
||||
// Get new data from PLC
|
||||
libraryError = ncAdapter.GetUpdatedToolsData(out Dictionary<int, byte> updatedStatus, out Dictionary<int, uint> updatedLives);
|
||||
if (libraryError.IsError())
|
||||
ManageLibraryError(libraryError);
|
||||
|
||||
MessageServices.Current.Publish(UPDATE_TOOLS_DATA, null,
|
||||
new DTONewToolDataModel
|
||||
{
|
||||
UpdatedStatus = updatedStatus,
|
||||
UpdatedLives = updatedLives
|
||||
});
|
||||
}
|
||||
else
|
||||
RestoreConnection();
|
||||
sw.Stop();
|
||||
|
||||
//Update thread timer
|
||||
UpdateStat(MethodBase.GetCurrentMethod().Name, sw.ElapsedMilliseconds);
|
||||
|
||||
// Wait
|
||||
Thread.Sleep(CalcSleepTime(1000, (int)sw.ElapsedMilliseconds));
|
||||
}
|
||||
}
|
||||
catch (ThreadAbortException)
|
||||
{
|
||||
ncAdapter.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void ReadNcMagazineActive()
|
||||
{
|
||||
if (NcConfig.NcVendor != NC_VENDOR.SIEMENS)
|
||||
{
|
||||
NcToolTableAdapter ncAdapter = new NcToolTableAdapter();
|
||||
Stopwatch sw = new Stopwatch();
|
||||
try
|
||||
{
|
||||
// Try connection
|
||||
CmsError libraryError = ncAdapter.Connect();
|
||||
if (libraryError.errorCode != 0)
|
||||
ManageLibraryError(libraryError);
|
||||
|
||||
while (true)
|
||||
{
|
||||
sw.Restart();
|
||||
|
||||
// Check if client is connected
|
||||
if (ncAdapter.numericalControl.NC_IsConnected())
|
||||
{
|
||||
// Get new data from PLC
|
||||
libraryError = ncAdapter.GetNcMagazineStatus(out Dictionary<int, bool> status);
|
||||
if (libraryError.IsError())
|
||||
ManageLibraryError(libraryError);
|
||||
|
||||
MessageServices.Current.Publish(NC_MAGAZINE_IS_ACTIVE, null, status);
|
||||
|
||||
libraryError = ncAdapter.ReadAssistedToolingProcedure(out DTOAssistedToolingEndValueModel data);
|
||||
if (libraryError.IsError())
|
||||
ManageLibraryError(libraryError);
|
||||
|
||||
MessageServices.Current.Publish(ASSISTED_TOOLING_DATA, null, data);
|
||||
}
|
||||
else
|
||||
RestoreConnection();
|
||||
sw.Stop();
|
||||
|
||||
//Update thread timer
|
||||
UpdateStat(MethodBase.GetCurrentMethod().Name, sw.ElapsedMilliseconds);
|
||||
|
||||
// Wait
|
||||
Thread.Sleep(CalcSleepTime(500, (int)sw.ElapsedMilliseconds));
|
||||
}
|
||||
}
|
||||
catch (ThreadAbortException)
|
||||
{
|
||||
ncAdapter.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if false
|
||||
public static void ReadPartProgramQueueData()
|
||||
{
|
||||
NcFileAdapter ncAdapter = new NcFileAdapter();
|
||||
@@ -744,9 +604,10 @@ public static class ThreadsFunctions
|
||||
{
|
||||
ncAdapter.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
public static void ReadScadaData()
|
||||
public static void ReadScadaData()
|
||||
{
|
||||
NcAdapter ncAdapter = new NcAdapter();
|
||||
Stopwatch sw = new Stopwatch();
|
||||
@@ -790,7 +651,192 @@ public static class ThreadsFunctions
|
||||
ncAdapter.Dispose();
|
||||
}
|
||||
}
|
||||
public static void ReadGaugeData()
|
||||
{
|
||||
NcAdapter ncAdapter = new NcAdapter();
|
||||
Stopwatch sw = new Stopwatch();
|
||||
|
||||
try
|
||||
{
|
||||
// Try connection
|
||||
CmsError libraryError = ncAdapter.Connect();
|
||||
if (libraryError.errorCode != 0)
|
||||
ManageLibraryError(libraryError);
|
||||
|
||||
while (true)
|
||||
{
|
||||
sw.Restart();
|
||||
|
||||
// Check if client is connected
|
||||
if (ncAdapter.numericalControl.NC_IsConnected())
|
||||
{
|
||||
|
||||
// Get new data from PLC
|
||||
libraryError = ncAdapter.ReadGaugeData(out ThermoModels.GaugeModel gaugeData);
|
||||
if (libraryError.IsError())
|
||||
ManageLibraryError(libraryError);
|
||||
|
||||
MessageServices.Current.Publish(SEND_THERMO_GAUGE_DATA, null, gaugeData);
|
||||
}
|
||||
else
|
||||
RestoreConnection();
|
||||
|
||||
sw.Stop();
|
||||
|
||||
//Update thread timer
|
||||
UpdateStat(MethodBase.GetCurrentMethod().Name, sw.ElapsedMilliseconds);
|
||||
// Wait
|
||||
Thread.Sleep(CalcSleepTime(500, (int)sw.ElapsedMilliseconds));
|
||||
}
|
||||
}
|
||||
catch (ThreadAbortException)
|
||||
{
|
||||
ncAdapter.Dispose();
|
||||
}
|
||||
}
|
||||
public static void ReadRecipeData()
|
||||
{
|
||||
NcAdapter ncAdapter = new NcAdapter();
|
||||
Stopwatch sw = new Stopwatch();
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
// Try connection
|
||||
CmsError libraryError = ncAdapter.Connect();
|
||||
if (libraryError.errorCode != 0)
|
||||
ManageLibraryError(libraryError);
|
||||
|
||||
while (true)
|
||||
{
|
||||
// ogni n counter leggo anche dati NON RT
|
||||
recipeRtCounter--;
|
||||
bool onlyRt = recipeRtCounter > 0;
|
||||
//check reset...
|
||||
recipeRtCounter = recipeRtCounter < 0 ? 5 : recipeRtCounter;
|
||||
|
||||
sw.Restart();
|
||||
|
||||
// Check if client is connected
|
||||
if (ncAdapter.numericalControl.NC_IsConnected())
|
||||
{
|
||||
// Get new data from PLC
|
||||
libraryError = ncAdapter.ReadRecipeData(onlyRt, out Dictionary<string, DTORecipeParam> currRecipe);
|
||||
if (libraryError.IsError())
|
||||
ManageLibraryError(libraryError);
|
||||
|
||||
MessageServices.Current.Publish(SEND_THERMO_RECIPE_FULL, null, currRecipe);
|
||||
}
|
||||
else
|
||||
RestoreConnection();
|
||||
|
||||
sw.Stop();
|
||||
|
||||
// Update thread timer
|
||||
UpdateStat(MethodBase.GetCurrentMethod().Name, sw.ElapsedMilliseconds);
|
||||
// Wait
|
||||
Thread.Sleep(CalcSleepTime(250, (int)sw.ElapsedMilliseconds));
|
||||
}
|
||||
}
|
||||
catch (ThreadAbortException)
|
||||
{
|
||||
ncAdapter.Dispose();
|
||||
}
|
||||
}
|
||||
public static void ReadWarmersData()
|
||||
{
|
||||
// TODO FIXME
|
||||
#if false
|
||||
NcAdapter ncAdapter = new NcAdapter();
|
||||
Stopwatch sw = new Stopwatch();
|
||||
|
||||
try
|
||||
{
|
||||
// Try connection
|
||||
CmsError libraryError = ncAdapter.Connect();
|
||||
if (libraryError.errorCode != 0)
|
||||
ManageLibraryError(libraryError);
|
||||
|
||||
while (true)
|
||||
{
|
||||
sw.Restart();
|
||||
|
||||
// Check if client is connected
|
||||
if (ncAdapter.numericalControl.NC_IsConnected())
|
||||
{
|
||||
List<ScadaSchemaModel> scadaToRead = ProductionScadaSchema.Concat(SubscribedScada).ToList();
|
||||
|
||||
// Get new data from PLC
|
||||
libraryError = ncAdapter.ReadScadasData(scadaToRead, out List<DTOScadaModel> scadas);
|
||||
if (libraryError.IsError())
|
||||
ManageLibraryError(libraryError);
|
||||
|
||||
MessageServices.Current.Publish(SEND_SCADA_DATA, null, scadas);
|
||||
}
|
||||
else
|
||||
RestoreConnection();
|
||||
|
||||
sw.Stop();
|
||||
|
||||
//Update thread timer
|
||||
UpdateStat(MethodBase.GetCurrentMethod().Name, sw.ElapsedMilliseconds);
|
||||
// Wait
|
||||
Thread.Sleep(CalcSleepTime(500, (int)sw.ElapsedMilliseconds));
|
||||
}
|
||||
}
|
||||
catch (ThreadAbortException)
|
||||
{
|
||||
ncAdapter.Dispose();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
public static void ReadModulesData()
|
||||
{
|
||||
// TODO FIXME
|
||||
#if false
|
||||
NcAdapter ncAdapter = new NcAdapter();
|
||||
Stopwatch sw = new Stopwatch();
|
||||
|
||||
try
|
||||
{
|
||||
// Try connection
|
||||
CmsError libraryError = ncAdapter.Connect();
|
||||
if (libraryError.errorCode != 0)
|
||||
ManageLibraryError(libraryError);
|
||||
|
||||
while (true)
|
||||
{
|
||||
sw.Restart();
|
||||
|
||||
// Check if client is connected
|
||||
if (ncAdapter.numericalControl.NC_IsConnected())
|
||||
{
|
||||
List<ScadaSchemaModel> scadaToRead = ProductionScadaSchema.Concat(SubscribedScada).ToList();
|
||||
|
||||
// Get new data from PLC
|
||||
libraryError = ncAdapter.ReadScadasData(scadaToRead, out List<DTOScadaModel> scadas);
|
||||
if (libraryError.IsError())
|
||||
ManageLibraryError(libraryError);
|
||||
|
||||
MessageServices.Current.Publish(SEND_SCADA_DATA, null, scadas);
|
||||
}
|
||||
else
|
||||
RestoreConnection();
|
||||
|
||||
sw.Stop();
|
||||
|
||||
//Update thread timer
|
||||
UpdateStat(MethodBase.GetCurrentMethod().Name, sw.ElapsedMilliseconds);
|
||||
// Wait
|
||||
Thread.Sleep(CalcSleepTime(500, (int)sw.ElapsedMilliseconds));
|
||||
}
|
||||
}
|
||||
catch (ThreadAbortException)
|
||||
{
|
||||
ncAdapter.Dispose();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
public static void ReadM154Data()
|
||||
{
|
||||
NcAdapter ncAdapter = new NcAdapter();
|
||||
@@ -845,7 +891,7 @@ public static class ThreadsFunctions
|
||||
foreach (M154DataModel m154 in data)
|
||||
{
|
||||
//if (CmsConnectConfig.Enabled)
|
||||
if(ServerStartupConfig.CmsConnectReady)
|
||||
if (ServerStartupConfig.CmsConnectReady)
|
||||
{
|
||||
|
||||
if (m154.Parameters.Count() >= 2 && m154.Parameters[0] == "SOUR")
|
||||
@@ -974,7 +1020,7 @@ public static class ThreadsFunctions
|
||||
{
|
||||
List<DTOLanguageModel> availableLanguages = LanguageController.GetLanguageListFromDirectory();
|
||||
if (availableLanguages == null)
|
||||
return ;
|
||||
return;
|
||||
|
||||
ICollection<CultureInfo> cultureInfos = new List<CultureInfo>();
|
||||
|
||||
@@ -985,7 +1031,7 @@ public static class ThreadsFunctions
|
||||
|
||||
// Filter available language with
|
||||
availableLanguages = availableLanguages.Where(x => cultureInfos.Any(y => y.TwoLetterISOLanguageName == x.IsoId)).ToList();
|
||||
|
||||
|
||||
// Fill redis DB
|
||||
int count = 1;
|
||||
Dictionary<string, string> defAlarmsNamesEn = null;
|
||||
@@ -994,10 +1040,10 @@ public static class ThreadsFunctions
|
||||
{
|
||||
Dictionary<string, string> alarmsNames = GetPlcAlarmsTranslations(lang.IsoId);
|
||||
|
||||
if(lang.IsoId.ToLower() == "en")
|
||||
if (lang.IsoId.ToLower() == "en")
|
||||
{
|
||||
defAlarmsNamesEn = alarmsNames;
|
||||
if(!RedisController.WriteAlarmsConfigEn(alarmsNames))
|
||||
if (!RedisController.WriteAlarmsConfigEn(alarmsNames))
|
||||
ManageError(ERROR_LEVEL.FATAL, CMS_CONNECT_SETUP_ALARM_MESSAGE);
|
||||
}
|
||||
else if (lang.IsoId.ToLower() == "it")
|
||||
@@ -1008,7 +1054,7 @@ public static class ThreadsFunctions
|
||||
}
|
||||
else
|
||||
if (!RedisController.WriteAlarmsConfigCurr(alarmsNames))
|
||||
ManageError(ERROR_LEVEL.FATAL, CMS_CONNECT_SETUP_ALARM_MESSAGE);
|
||||
ManageError(ERROR_LEVEL.FATAL, CMS_CONNECT_SETUP_ALARM_MESSAGE);
|
||||
|
||||
if (count == 3)
|
||||
break;
|
||||
@@ -1018,10 +1064,10 @@ public static class ThreadsFunctions
|
||||
|
||||
if (availableLanguages.Count < 3 && defAlarmsNamesEn != null)
|
||||
if (!RedisController.WriteAlarmsConfigCurr(defAlarmsNamesEn))
|
||||
ManageError(ERROR_LEVEL.FATAL, CMS_CONNECT_SETUP_ALARM_MESSAGE);
|
||||
else if (availableLanguages.Count < 3 && defAlarmsNamesIt != null)
|
||||
if (!RedisController.WriteAlarmsConfigCurr(defAlarmsNamesIt))
|
||||
ManageError(ERROR_LEVEL.FATAL, CMS_CONNECT_SETUP_ALARM_MESSAGE);
|
||||
else if (availableLanguages.Count < 3 && defAlarmsNamesIt != null)
|
||||
if (!RedisController.WriteAlarmsConfigCurr(defAlarmsNamesIt))
|
||||
ManageError(ERROR_LEVEL.FATAL, CMS_CONNECT_SETUP_ALARM_MESSAGE);
|
||||
|
||||
}
|
||||
catch (ThreadAbortException)
|
||||
@@ -1037,44 +1083,28 @@ public static class ThreadsFunctions
|
||||
private static void TryNcConnection()
|
||||
{
|
||||
// Stop all the NC threads
|
||||
ThreadsHandler.Stop();
|
||||
StatReset();
|
||||
ThreadsHandler.Stop();
|
||||
StatReset();
|
||||
NcAdapter ncAdapter = new NcAdapter();
|
||||
CmsError cmsError = NO_ERROR;
|
||||
// Run loop until NC is connected
|
||||
while (!ncAdapter.numericalControl.NC_IsConnected())
|
||||
while (!ncAdapter.numericalControl.NC_IsConnected())
|
||||
{
|
||||
// Try reconnection
|
||||
cmsError = ncAdapter.Connect();
|
||||
if (cmsError.errorCode == CMS_ERROR_CODES.SIEMENS_ENVIRONMENT_NOT_FOUND || cmsError.errorCode == CMS_ERROR_CODES.SIEMENS_HMI_NOT_RUNNING || cmsError.errorCode == CMS_ERROR_CODES.OSAI_TT_FOLDER_NOT_FOUND)
|
||||
if (cmsError.errorCode == CMS_ERROR_CODES.SIEMENS_ENVIRONMENT_NOT_FOUND || cmsError.errorCode == CMS_ERROR_CODES.SIEMENS_HMI_NOT_RUNNING || cmsError.errorCode == CMS_ERROR_CODES.OSAI_TT_FOLDER_NOT_FOUND)
|
||||
ManageLibraryError(cmsError);
|
||||
else if (cmsError.errorCode != CMS_ERROR_CODES.OK)
|
||||
{
|
||||
ncAdapter.Dispose();
|
||||
}
|
||||
|
||||
if (cmsError.errorCode == CMS_ERROR_CODES.SIEMENS_TOOL_TABLE_ERROR)
|
||||
ManageLibraryError(cmsError);
|
||||
|
||||
// Send status to UI
|
||||
MessageServices.Current.Publish(SEND_NC_STATUS, null, ncAdapter.numericalControl.NC_IsConnected());
|
||||
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
|
||||
|
||||
if(NcConfig.NcVendor == NC_VENDOR.FANUC || NcConfig.NcVendor == NC_VENDOR.OSAI)
|
||||
{
|
||||
using (NcToolTableAdapter toolTable = new NcToolTableAdapter())
|
||||
{
|
||||
toolTable.Connect();
|
||||
// After reconecction write option
|
||||
cmsError = toolTable.SetupNcToolManager();
|
||||
if (cmsError.IsError())
|
||||
ManageLibraryError(cmsError);
|
||||
// cmsError = toolTable.RestoreTableLock();
|
||||
}
|
||||
}
|
||||
if (!cmsError.IsError())
|
||||
{
|
||||
if (ServerStartupConfig.AutoOpenCmsClient)
|
||||
@@ -1122,7 +1152,6 @@ public static class ThreadsFunctions
|
||||
case CMS_ERROR_CODES.SIEMENS_ENVIRONMENT_NOT_FOUND:
|
||||
case CMS_ERROR_CODES.OSAI_TT_FOLDER_NOT_FOUND:
|
||||
case CMS_ERROR_CODES.OPTION_NOT_CONSISTENT:
|
||||
case CMS_ERROR_CODES.SIEMENS_TOOL_TABLE_ERROR:
|
||||
ManageError(ERROR_LEVEL.FATAL, cmsError.localizationKey);
|
||||
break;
|
||||
|
||||
@@ -1139,7 +1168,7 @@ public static class ThreadsFunctions
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
internal static void UpdateStat(string functionName, long timer)
|
||||
{
|
||||
if (!Timers.ContainsKey(functionName))
|
||||
@@ -1158,16 +1187,16 @@ public static class ThreadsFunctions
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
foreach(var value in Counter)
|
||||
foreach (var value in Counter)
|
||||
{
|
||||
if(ThreadsHandler.RunningThreadStatus.ContainsKey(value.Key) && Counter[value.Key] != 0)
|
||||
if (ThreadsHandler.RunningThreadStatus.ContainsKey(value.Key) && Counter[value.Key] != 0)
|
||||
{
|
||||
ThreadsHandler.RunningThreadStatus[value.Key] = (Timers[value.Key] / Counter[value.Key]) + " mS";
|
||||
Timers[value.Key] = 0;
|
||||
Counter[value.Key] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
MessageServices.Current.Publish(SEND_THREADS_STATUS, null, ThreadsHandler.RunningThreadStatus);
|
||||
|
||||
Thread.Sleep(2000);
|
||||
@@ -1271,7 +1300,7 @@ public static class ThreadsFunctions
|
||||
message = string.Format(NOT_FOUND_ALARM_MESSAGE, i);
|
||||
}
|
||||
// Add to dictionary
|
||||
returnValue.Add(i.ToString("D6") + "|900",message);
|
||||
returnValue.Add(i.ToString("D6") + "|900", message);
|
||||
}
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
@@ -18,17 +18,18 @@ namespace Thermo.Active.Core
|
||||
ThreadsFunctions.ReadEnabledFunctionality,
|
||||
ThreadsFunctions.ReadExpiredMaintenances,
|
||||
ThreadsFunctions.ReadAxesPositionsData,
|
||||
ThreadsFunctions.ReadMagazinesStatus,
|
||||
ThreadsFunctions.ReadUserSoftKeysData,
|
||||
ThreadsFunctions.ReadHeadsData,
|
||||
//ThreadsFunctions.ReadHeadsData,
|
||||
ThreadsFunctions.ReadAxesNamesData,
|
||||
ThreadsFunctions.ReadActiveProgramData,
|
||||
ThreadsFunctions.UpdateToolsData,
|
||||
ThreadsFunctions.ReadNcMagazineActive,
|
||||
//ThreadsFunctions.ReadActiveProgramData,
|
||||
//ThreadsFunctions.ReadPartProgramQueueData,
|
||||
ThreadsFunctions.ReadScadaData,
|
||||
ThreadsFunctions.ReadM154Data
|
||||
ThreadsFunctions.ReadM154Data, // levare?
|
||||
// ThreadsFunctions.ReadNcSoftKeysData,
|
||||
ThreadsFunctions.ReadGaugeData,
|
||||
ThreadsFunctions.ReadRecipeData,
|
||||
ThreadsFunctions.ReadWarmersData,
|
||||
ThreadsFunctions.ReadModulesData
|
||||
};
|
||||
private static Action ThreadSetupCmsConnect = ThreadsFunctions.SetupCmsConnect;
|
||||
|
||||
@@ -47,6 +48,7 @@ namespace Thermo.Active.Core
|
||||
{
|
||||
Thread t = new Thread(() => ThreadSetupCmsConnect());
|
||||
t.Start();
|
||||
Thread.Sleep(50);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,6 +65,8 @@ namespace Thermo.Active.Core
|
||||
threadFunction()
|
||||
);
|
||||
t.Start();
|
||||
// aggiungo pausa x evitare sovrapposizioni chiamate
|
||||
Thread.Sleep(50);
|
||||
// Add thread to running threads list
|
||||
lock (RunningThreadsList)
|
||||
RunningThreadsList.Add(t);
|
||||
|
||||
@@ -1,685 +0,0 @@
|
||||
using Thermo.Active.Model.DatabaseModels;
|
||||
using Thermo.Active.Model.DTOModels.ToolModels;
|
||||
using Thermo.Active.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.Entity;
|
||||
using System.Linq;
|
||||
using static Thermo.Active.Utils.SupportFunctions;
|
||||
using static Thermo.Active.Model.Constants;
|
||||
|
||||
namespace Thermo.Active.Database.Controllers
|
||||
{
|
||||
public class NcToolManagerController : IDisposable
|
||||
{
|
||||
public DatabaseContext dbCtx;
|
||||
|
||||
public NcToolManagerController()
|
||||
{
|
||||
// Initialize database context
|
||||
dbCtx = new DatabaseContext();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Clear database context
|
||||
dbCtx.Dispose();
|
||||
}
|
||||
|
||||
public List<DbNcFamilyModel> FindFamilies()
|
||||
{
|
||||
List<DbNcFamilyModel> families = dbCtx
|
||||
.Families
|
||||
.Include("Tools")
|
||||
.ToList();
|
||||
|
||||
return families;
|
||||
}
|
||||
|
||||
public List<DTONcFamilyModel> GetFamilies()
|
||||
{
|
||||
List<DbNcFamilyModel> dbFamilies = FindFamilies();
|
||||
|
||||
return dbFamilies
|
||||
.Select(x => (DTONcFamilyModel)x)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
public List<DbNcFamilyModel> FindFamiliesByShankId(int shankId)
|
||||
{
|
||||
DbNcShankModel shank = FindShankWithTools(shankId);
|
||||
// Get only families id
|
||||
short[] ids = shank.Tools.Select(x => x.FamilyId).ToArray();
|
||||
|
||||
return FindFamilies() // Get Families
|
||||
.Where(x => ids.Contains(x.FamilyId)) // Filter by ids
|
||||
.ToList();
|
||||
}
|
||||
|
||||
public DbNcToolModel FindTool(int toolId)
|
||||
{
|
||||
return dbCtx.Tools
|
||||
.Where(x => x.ToolId == toolId)
|
||||
.FirstOrDefault();
|
||||
}
|
||||
|
||||
public DbNcToolModel FindToolWithDependencies(int toolId)
|
||||
{
|
||||
return dbCtx.Tools
|
||||
.Where(x => x.ToolId == toolId)
|
||||
.Include("Family")
|
||||
.Include("Shank")
|
||||
.FirstOrDefault();
|
||||
}
|
||||
|
||||
public DbNcShankModel FindShankWithTools(int shankId)
|
||||
{
|
||||
return dbCtx.Shanks
|
||||
.Include("Tools")
|
||||
.Where(x => x.ShankId == shankId)
|
||||
.FirstOrDefault();
|
||||
}
|
||||
|
||||
public DbNcFamilyModel FindFamily(int familyId)
|
||||
{
|
||||
return dbCtx
|
||||
.Families
|
||||
.Where(x => x.FamilyId == familyId)
|
||||
.Include("Tools")
|
||||
.FirstOrDefault();
|
||||
}
|
||||
|
||||
public List<DbNcToolModel> FindToolsWithDependencies()
|
||||
{
|
||||
List<DbNcToolModel> tools = dbCtx
|
||||
.Tools
|
||||
.Include("Family")
|
||||
.Include("Shank")
|
||||
.ToList();
|
||||
|
||||
return tools;
|
||||
}
|
||||
|
||||
public List<DbNcToolModel> FindToolsByShankIdWithDependencies(int shankId)
|
||||
{
|
||||
List<DbNcToolModel> tools = FindToolsWithDependencies()
|
||||
.Where(x => x.ShankId == shankId)
|
||||
.ToList();
|
||||
|
||||
return tools;
|
||||
}
|
||||
|
||||
public List<DbNcToolModel> FindTools()
|
||||
{
|
||||
List<DbNcToolModel> tools = dbCtx
|
||||
.Tools
|
||||
.ToList();
|
||||
|
||||
return tools;
|
||||
}
|
||||
|
||||
public List<DTONcToolModel> GetTools()
|
||||
{
|
||||
List<DbNcToolModel> dbTools = FindToolsWithDependencies();
|
||||
|
||||
return dbTools
|
||||
.Select(x => (DTONcToolModel)x)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
public List<DbNcShankModel> FindShanks()
|
||||
{
|
||||
List<DbNcShankModel> shanks = dbCtx
|
||||
.Shanks
|
||||
.Include("MagazinePosition")
|
||||
.ToList();
|
||||
|
||||
return shanks;
|
||||
}
|
||||
|
||||
public DbNcShankModel FindShank(int shankId)
|
||||
{
|
||||
return dbCtx.Shanks
|
||||
.Where(x => x.ShankId == shankId)
|
||||
.FirstOrDefault();
|
||||
}
|
||||
|
||||
public DbNcShankModel FindShanksByPositions(int magazineId, int positionId)
|
||||
{
|
||||
DbNcShankModel shank = FindShanks()
|
||||
.Where(x => x.MagazineId == magazineId && x.PositionId == positionId)
|
||||
.FirstOrDefault();
|
||||
|
||||
return shank;
|
||||
}
|
||||
|
||||
public List<DbNcShankModel> FindShanksByFamilyId(int familyId)
|
||||
{
|
||||
return dbCtx
|
||||
.Tools
|
||||
.Include("Shank")
|
||||
.Where(x => x.FamilyId == familyId && x.ShankId != null)
|
||||
.Select(x => x.Shank)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
public DbNcShankModel FindShankByToolId(int toolId)
|
||||
{
|
||||
return dbCtx
|
||||
.Tools
|
||||
.Include("Shank")
|
||||
.Where(x => x.ToolId == toolId && x.ShankId != null)
|
||||
.Select(x => x.Shank)
|
||||
.FirstOrDefault();
|
||||
}
|
||||
|
||||
public List<DTONcShankModel> GetShanks()
|
||||
{
|
||||
// Get shank from database
|
||||
List<DbNcShankModel> dbShanks = dbCtx
|
||||
.Shanks
|
||||
.Include("Tools")
|
||||
.ToList();
|
||||
|
||||
// Populate dto shanks
|
||||
List<DTONcShankModel> dtoShanks = dbShanks
|
||||
.Select(x => (DTONcShankModel)x)
|
||||
.ToList();
|
||||
|
||||
return dtoShanks;
|
||||
}
|
||||
|
||||
public List<DTONcShankModel> GetShanksWithSpace()
|
||||
{
|
||||
// Populate nks
|
||||
List<DTONcShankModel> dtoShanks = GetShanks();
|
||||
|
||||
List<DTONcFamilyModel> dtoFamilies = GetFamilies();
|
||||
|
||||
// Calculate & set space occupied for each shank
|
||||
foreach(var shank in dtoShanks)
|
||||
{
|
||||
// Get only families id
|
||||
short[] ids = shank.ChildsTools.Select(x => x.FamilyId).ToArray();
|
||||
|
||||
// Get Families data
|
||||
List<DTONcFamilyModel> families = dtoFamilies
|
||||
.Where(x => ids.Contains(x.Id))
|
||||
.ToList();
|
||||
|
||||
if (families.Count() > 0)
|
||||
{
|
||||
// Find max between families
|
||||
shank.MaxRight = families.Max(x => x.RightSize);
|
||||
shank.MaxLeft = families.Max(x => x.LeftSize);
|
||||
}
|
||||
}
|
||||
|
||||
return dtoShanks;
|
||||
}
|
||||
|
||||
public DTONcShankModel GetShank(int shankId)
|
||||
{
|
||||
// Get shank from database
|
||||
DTONcShankModel dtoShanks = GetShanksWithSpace()
|
||||
.Where(x => x.Id == shankId)
|
||||
.FirstOrDefault();
|
||||
|
||||
return dtoShanks;
|
||||
}
|
||||
|
||||
public List<DbNcMagazinePositionModel> FindMagazinesPositions()
|
||||
{
|
||||
List<DbNcMagazinePositionModel> positions = dbCtx
|
||||
.MagazinePositions
|
||||
.ToList();
|
||||
|
||||
return positions;
|
||||
}
|
||||
|
||||
public List<DbNcMagazinePositionModel> FindMagazinePositions(byte magId)
|
||||
{
|
||||
return dbCtx
|
||||
.MagazinePositions
|
||||
.Where(x => x.MagazineId == magId)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
public void GetShankMaxSpaceOccupied(int shankId, out int maxRight, out int maxLeft)
|
||||
{
|
||||
// Get families
|
||||
List<DbNcFamilyModel> families = FindFamiliesByShankId(shankId);
|
||||
// Find max
|
||||
maxRight = families.Max(x => x.RightSize);
|
||||
maxLeft = families.Max(x => x.LeftSize);
|
||||
}
|
||||
|
||||
public List<DTONcMagazinePositionModel> GetMagazinePositions(byte magId)
|
||||
{
|
||||
// Get only magazine positions that match with magazineId
|
||||
List<DTONcMagazinePositionModel> magPos = FindMagazinePositions(magId).Select(x => (DTONcMagazinePositionModel)x).ToList();
|
||||
// Get&filter shanks by magazineId in order to get only mounted shanks in the current magazineId
|
||||
List<DbNcShankModel> shanks = dbCtx.Shanks.Where(x => x.MagazineId == magId).ToList();
|
||||
|
||||
foreach(DbNcShankModel shank in shanks)
|
||||
{
|
||||
// Populate magazinePosition shank Id
|
||||
var pos = magPos
|
||||
.FirstOrDefault(x => x.PositionId == shank.PositionId);
|
||||
|
||||
if(pos != null)
|
||||
pos.ShankId = shank.ShankId;
|
||||
}
|
||||
// Convert in DTOModel and return
|
||||
return magPos;
|
||||
}
|
||||
|
||||
public DbNcMagazinePositionModel FindMagazinePosition(byte magId, byte posId)
|
||||
{
|
||||
DbNcMagazinePositionModel positions = dbCtx
|
||||
.MagazinePositions
|
||||
.FirstOrDefault(x => x.MagazineId == magId && x.PositionId == posId);
|
||||
|
||||
return positions;
|
||||
}
|
||||
|
||||
public List<DTONcShankModel> GetMountedShanks(int magazineId)
|
||||
{
|
||||
List<DTONcShankModel> dtoShanks = GetShanksWithSpace()
|
||||
.Where(x => x.MagazineId != null && x.MagazineId == magazineId)
|
||||
.ToList();
|
||||
|
||||
return dtoShanks;
|
||||
}
|
||||
|
||||
public List<DbNcToolModel> GetMountedTools()
|
||||
{
|
||||
List<DbNcToolModel> tools = FindToolsWithDependencies()
|
||||
.Where(x => x.Shank != null && x.Shank.MagazineId != null)
|
||||
.ToList();
|
||||
|
||||
return tools;
|
||||
}
|
||||
|
||||
public List<DTONcShankModel> GetAvailableShanksWithChilds()
|
||||
{
|
||||
List<DTONcShankModel> dtoShanks = GetShanksWithSpace()
|
||||
.Where(x => x.MagazineId == null && x.ChildsTools.Count > 0)
|
||||
.ToList();
|
||||
|
||||
return dtoShanks;
|
||||
}
|
||||
|
||||
public List<DTONcToolModel> GetAvailableTools()
|
||||
{
|
||||
List<DTONcToolModel> dtoTools = GetTools()
|
||||
.Where(x => x.ShankId == null || x.ShankId == 0)
|
||||
.ToList();
|
||||
|
||||
return dtoTools;
|
||||
}
|
||||
|
||||
public DbNcToolModel AddTool(DTONewNcToolModel dtoTool, short toolId)
|
||||
{
|
||||
// Copy data
|
||||
DbNcToolModel dbTool = (DbNcToolModel)dtoTool;
|
||||
|
||||
if (toolId == 0)
|
||||
// Get next id
|
||||
dbTool.ToolId = GetFirstFreeId(dbCtx.Tools.Select(x => x.ToolId).ToList());
|
||||
else
|
||||
dbTool.ToolId = toolId;
|
||||
|
||||
dbCtx.Tools.Add(dbTool);
|
||||
|
||||
dbCtx.SaveChanges();
|
||||
// Get foreign key data
|
||||
dbCtx.Entry(dbTool).Reference(x => x.Family).Load();
|
||||
dbCtx.Entry(dbTool).Reference(x => x.Shank).Load();
|
||||
|
||||
return dbTool;
|
||||
}
|
||||
|
||||
public DbNcToolModel UpdateTool(int toolId, DTONewNcToolModel dtoTool)
|
||||
{
|
||||
DbNcToolModel tool = FindTool(toolId);
|
||||
|
||||
tool.Status = ((DbNcToolModel)dtoTool).Status;
|
||||
var shankId = tool.ShankId;
|
||||
|
||||
// Update db model
|
||||
SupportFunctions.CopyProperties(dtoTool, tool);
|
||||
tool.ShankId = shankId;
|
||||
|
||||
// Save
|
||||
dbCtx.SaveChanges();
|
||||
|
||||
return tool;
|
||||
}
|
||||
|
||||
public DbNcToolModel UpdateToolOffset(int toolId, int position, short offsetId)
|
||||
{
|
||||
DbNcToolModel tool = FindTool(toolId);
|
||||
|
||||
switch (position)
|
||||
{
|
||||
case 1:
|
||||
tool.OffsetId1 = offsetId;
|
||||
break;
|
||||
case 2:
|
||||
tool.OffsetId2 = offsetId;
|
||||
break;
|
||||
case 3:
|
||||
tool.OffsetId3 = offsetId;
|
||||
break;
|
||||
}
|
||||
|
||||
// Save
|
||||
dbCtx.SaveChanges();
|
||||
|
||||
return tool;
|
||||
}
|
||||
|
||||
public void DeleteTool(int toolId)
|
||||
{
|
||||
DbNcToolModel tool = FindTool(toolId);
|
||||
if(tool != null)
|
||||
DeleteTool(tool);
|
||||
}
|
||||
|
||||
public void DeleteTool(DbNcToolModel tool)
|
||||
{
|
||||
dbCtx.Tools.Remove(tool);
|
||||
|
||||
dbCtx.SaveChanges();
|
||||
}
|
||||
|
||||
public DbNcFamilyModel AddFamily(DTONcFamilyModel family)
|
||||
{
|
||||
DbNcFamilyModel dbFamily = (DbNcFamilyModel)family;
|
||||
|
||||
// Get next free id if id is 0
|
||||
if (dbFamily.FamilyId == 0)
|
||||
dbFamily.FamilyId = GetFirstFreeId(dbCtx.Families.Select(x => x.FamilyId).ToList());
|
||||
|
||||
dbFamily.Name = DEFAULT_FAM_NAME + dbFamily.FamilyId;
|
||||
dbCtx.Families.Add(dbFamily);
|
||||
|
||||
dbCtx.SaveChanges();
|
||||
|
||||
return dbFamily;
|
||||
}
|
||||
|
||||
public DbNcFamilyModel UpdateFamily(int familyId, DTONewNcFamilyModel family)
|
||||
{
|
||||
DbNcFamilyModel dbFamily = FindFamily(familyId);
|
||||
// Copy data from NewModel to DbModel
|
||||
SupportFunctions.CopyProperties(family, dbFamily);
|
||||
// Set cooling byte
|
||||
dbFamily.CoolingByte = ((DbNcFamilyModel)family).CoolingByte;
|
||||
|
||||
dbCtx.SaveChanges();
|
||||
// Connect tools data
|
||||
dbCtx.Entry(dbFamily).Collection(x => x.Tools).Load();
|
||||
|
||||
return dbFamily;
|
||||
}
|
||||
|
||||
public void DeleteFamily(int famId)
|
||||
{
|
||||
var family = FindFamily(famId);
|
||||
|
||||
dbCtx.Families.Remove(family);
|
||||
|
||||
dbCtx.SaveChanges();
|
||||
}
|
||||
|
||||
public DbNcShankModel AddShank(DTONewNcShankModel shank, short shankId = 0)
|
||||
{
|
||||
DbNcShankModel dbShank = (DbNcShankModel)shank;
|
||||
|
||||
if (shankId == 0)
|
||||
// Get next id
|
||||
dbShank.ShankId = GetFirstFreeId(dbCtx.Shanks.Select(x => x.ShankId).ToList());
|
||||
else
|
||||
dbShank.ShankId = shankId;
|
||||
|
||||
dbCtx.Shanks.Add(dbShank);
|
||||
|
||||
dbCtx.SaveChanges();
|
||||
|
||||
|
||||
return dbShank;
|
||||
}
|
||||
|
||||
public DbNcShankModel UpdateShank(int shankId, DTONewNcShankModel dtoShank)
|
||||
{
|
||||
DbNcShankModel ncShank = FindShankWithTools(shankId);
|
||||
|
||||
return UpdateShank(ncShank, dtoShank);
|
||||
}
|
||||
|
||||
public DbNcShankModel UpdateShank(DbNcShankModel dbShank, DTONewNcShankModel dtoShank)
|
||||
{
|
||||
dbShank.Balluf = dtoShank.Balluf;
|
||||
dbShank.MagazinePositionType = dtoShank.MagazinePositionType;
|
||||
|
||||
dbCtx.SaveChanges();
|
||||
|
||||
dbCtx.Entry(dbShank).Collection(x => x.Tools).Load();
|
||||
|
||||
return dbShank;
|
||||
}
|
||||
|
||||
public DbNcShankModel DeleteNcShank(int shankId)
|
||||
{
|
||||
DbNcShankModel shank = FindShankWithTools(shankId);
|
||||
DeleteNcShank(shank);
|
||||
|
||||
return shank;
|
||||
}
|
||||
|
||||
public void DeleteNcShank(DbNcShankModel shank)
|
||||
{
|
||||
dbCtx.Shanks.Remove(shank);
|
||||
|
||||
dbCtx.SaveChanges();
|
||||
}
|
||||
|
||||
public DbNcMagazinePositionModel UpdatePosition(DbNcMagazinePositionModel dbPos, DTONcMagazinePositionModel dtoPos)
|
||||
{
|
||||
dbCtx.MagazinePositions.Attach(dbPos);
|
||||
dbPos.Type = dtoPos.Type;
|
||||
dbPos.Disabled = dtoPos.Disabled;
|
||||
|
||||
dbCtx.SaveChanges();
|
||||
|
||||
return dbPos;
|
||||
}
|
||||
|
||||
public DbNcMagazinePositionModel LoadShankInMagazine(byte magazineId, byte positionId, DbNcShankModel shank)
|
||||
{
|
||||
dbCtx.Shanks.Attach(shank);
|
||||
// Set ids with new positions
|
||||
shank.MagazineId = magazineId;
|
||||
shank.PositionId = positionId;
|
||||
|
||||
// Set original Ids
|
||||
shank.OriginMagazineId = magazineId;
|
||||
shank.OriginPositionId = positionId;
|
||||
|
||||
dbCtx.SaveChanges();
|
||||
|
||||
return FindMagazinePosition(magazineId, positionId);
|
||||
}
|
||||
|
||||
public DbNcMagazinePositionModel UnloadShankInMagazine(byte magazineId, byte positionId, DbNcShankModel shank)
|
||||
{
|
||||
dbCtx.Shanks.Attach(shank);
|
||||
// set id to null
|
||||
shank.MagazineId = null;
|
||||
shank.PositionId = null;
|
||||
|
||||
shank.OriginMagazineId = null;
|
||||
shank.OriginPositionId = null;
|
||||
|
||||
dbCtx.SaveChanges();
|
||||
|
||||
return FindMagazinePosition(magazineId, positionId);
|
||||
}
|
||||
|
||||
public DTONcShankModel LoadToolIntoShank(DbNcToolModel tool, short shankId)
|
||||
{
|
||||
dbCtx.Tools.Attach(tool);
|
||||
// Set tool shankId
|
||||
tool.ShankId = shankId;
|
||||
|
||||
dbCtx.SaveChanges();
|
||||
|
||||
return GetShank(shankId);
|
||||
}
|
||||
|
||||
public DTONcShankModel UnloadToolFromShank(DbNcToolModel tool)
|
||||
{
|
||||
dbCtx.Tools.Attach(tool);
|
||||
int? shankId = tool.ShankId;
|
||||
// Set to null shankId
|
||||
tool.ShankId = null;
|
||||
|
||||
dbCtx.SaveChanges();
|
||||
|
||||
return GetShank(shankId.Value);
|
||||
}
|
||||
|
||||
public void SetupMagazinePositions(List<DbNcMagazinePositionModel> config)
|
||||
{
|
||||
dbCtx.MagazinePositions.AddRange(config);
|
||||
dbCtx.SaveChanges();
|
||||
}
|
||||
|
||||
public void UpdateToolsData(List<DbNcToolModel> tools)
|
||||
{
|
||||
foreach (var tool in tools)
|
||||
{
|
||||
DbNcToolModel tmpTool = dbCtx.Tools.Where(x => x.ToolId == tool.ToolId).FirstOrDefault();
|
||||
tmpTool = tool;
|
||||
}
|
||||
|
||||
dbCtx.SaveChanges();
|
||||
}
|
||||
|
||||
public DTOExportToolTableModel GetExportData()
|
||||
{
|
||||
return new DTOExportToolTableModel
|
||||
{
|
||||
Tools = FindTools(),
|
||||
Families = FindFamilies(),
|
||||
Shanks = FindShanks()
|
||||
.Select(x => {
|
||||
// Reset positional Data
|
||||
x.MagazineId = null;
|
||||
x.PositionId = null;
|
||||
x.OriginMagazineId = null;
|
||||
x.OriginPositionId = null;
|
||||
|
||||
return x; })
|
||||
.ToList()
|
||||
};
|
||||
}
|
||||
|
||||
public List<DTOImportStatusModel> ImportData(DTOExportToolTableModel data)
|
||||
{
|
||||
List<DTOImportStatusModel> importStatus = new List<DTOImportStatusModel>();
|
||||
|
||||
List<DbNcToolModel> tools = FindTools();
|
||||
List<DbNcFamilyModel> families = FindFamilies();
|
||||
List<DbNcShankModel> shanks = FindShanks();
|
||||
|
||||
if(data.Families != null)
|
||||
// loop thought new families
|
||||
foreach (var family in data.Families)
|
||||
{
|
||||
// Check if not exist
|
||||
if (families.FirstOrDefault(x => x.FamilyId == family.FamilyId) == null)
|
||||
{
|
||||
dbCtx.Families.Add(family);
|
||||
// Set status
|
||||
importStatus.Add(new DTOImportStatusModel()
|
||||
{
|
||||
Id = family.FamilyId,
|
||||
Status = IMPORT_STATUS.OK.ToString(),
|
||||
Type = "FAMILY"
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set duplicated status
|
||||
importStatus.Add(new DTOImportStatusModel()
|
||||
{
|
||||
Id = family.FamilyId,
|
||||
Status = IMPORT_STATUS.EXIST.ToString(),
|
||||
Type = "FAMILY"
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if(data.Shanks != null)
|
||||
// loop thought new shanks
|
||||
foreach (var shank in data.Shanks)
|
||||
{
|
||||
// Check if not exist
|
||||
if (shanks.FirstOrDefault(x => x.ShankId == shank.ShankId) == null)
|
||||
{
|
||||
dbCtx.Shanks.Add(shank);
|
||||
importStatus.Add(new DTOImportStatusModel()
|
||||
{
|
||||
Id = shank.ShankId,
|
||||
Status = IMPORT_STATUS.OK.ToString(),
|
||||
Type = "SHANK"
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
importStatus.Add(new DTOImportStatusModel()
|
||||
{
|
||||
Id = shank.ShankId,
|
||||
Status = IMPORT_STATUS.EXIST.ToString(),
|
||||
Type = "SHANK"
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if(data.Tools != null)
|
||||
// loop thought new tools
|
||||
foreach (var tool in data.Tools)
|
||||
{
|
||||
// Check if not exist
|
||||
if (tools.FirstOrDefault(x => x.ToolId == tool.ToolId) == null)
|
||||
{
|
||||
dbCtx.Tools.Add(tool);
|
||||
importStatus.Add(new DTOImportStatusModel()
|
||||
{
|
||||
Id = tool.ToolId,
|
||||
Status = IMPORT_STATUS.EXIST.ToString(),
|
||||
Type = "TOOL"
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
importStatus.Add(new DTOImportStatusModel()
|
||||
{
|
||||
Id = tool.ToolId,
|
||||
Status = IMPORT_STATUS.EXIST.ToString(),
|
||||
Type = "TOOL"
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Save
|
||||
dbCtx.SaveChanges();
|
||||
|
||||
return importStatus;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
using Microsoft.Win32;
|
||||
using MySql.Data.Entity;
|
||||
using Thermo.Active.Database.Controllers;
|
||||
using Thermo.Active.Database.Migrations;
|
||||
using Thermo.Active.Database.Migrations;
|
||||
using Thermo.Active.Model.DatabaseModels;
|
||||
using System;
|
||||
|
||||
@@ -34,9 +34,6 @@ namespace Thermo.Active.Database
|
||||
public DbSet<MaintenanceFileModel> MaintenanceFiles { get; set; }
|
||||
// Tool tables
|
||||
public DbSet<DbNcFamilyModel> Families { get; set; }
|
||||
public DbSet<DbNcShankModel> Shanks { get; set; }
|
||||
public DbSet<DbNcToolModel> Tools { get; set; }
|
||||
public DbSet<DbNcMagazinePositionModel> MagazinePositions { get; set; }
|
||||
public DbSet<QueueItemsModel> Queue { get; set; }
|
||||
// Alarms
|
||||
public DbSet<AlarmDescriptionsModel> AlarmDescriptions { get; set; }
|
||||
@@ -85,7 +82,7 @@ namespace Thermo.Active.Database
|
||||
{
|
||||
// Run migrations and seed.
|
||||
migrator.Update();
|
||||
}
|
||||
}
|
||||
|
||||
FindOrCreateMachineUniqueId();
|
||||
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
// <auto-generated />
|
||||
namespace Thermo.Active.Database.Migrations
|
||||
{
|
||||
using System.CodeDom.Compiler;
|
||||
using System.Data.Entity.Migrations;
|
||||
using System.Data.Entity.Migrations.Infrastructure;
|
||||
using System.Resources;
|
||||
|
||||
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
|
||||
public sealed partial class InitMigration : IMigrationMetadata
|
||||
{
|
||||
private readonly ResourceManager Resources = new ResourceManager(typeof(InitMigration));
|
||||
|
||||
string IMigrationMetadata.Id
|
||||
{
|
||||
get { return "201806130949510_InitMigration"; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Source
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Target
|
||||
{
|
||||
get { return Resources.GetString("Target"); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,165 +0,0 @@
|
||||
namespace Thermo.Active.Database.Migrations
|
||||
{
|
||||
using System;
|
||||
using System.Data.Entity.Migrations;
|
||||
|
||||
public partial class InitMigration : DbMigration
|
||||
{
|
||||
public override void Up()
|
||||
{
|
||||
CreateTable(
|
||||
"dbo.function_access",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
name = c.String(unicode: false),
|
||||
write_level_min = c.Int(nullable: false),
|
||||
read_level_min = c.Int(nullable: false),
|
||||
area = c.String(unicode: false),
|
||||
enabled = c.Boolean(nullable: false),
|
||||
plc_id = c.Int(nullable: false),
|
||||
})
|
||||
.PrimaryKey(t => t.id);
|
||||
|
||||
CreateTable(
|
||||
"dbo.machine",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
name = c.String(unicode: false),
|
||||
unique_id = c.String(unicode: false),
|
||||
})
|
||||
.PrimaryKey(t => t.id);
|
||||
|
||||
CreateTable(
|
||||
"dbo.machine_user",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
machine_id = c.Int(nullable: false),
|
||||
user_id = c.Int(nullable: false),
|
||||
role_id = c.Int(nullable: false),
|
||||
})
|
||||
.PrimaryKey(t => t.id)
|
||||
.ForeignKey("dbo.machine", t => t.machine_id, cascadeDelete: true)
|
||||
.ForeignKey("dbo.role", t => t.role_id, cascadeDelete: true)
|
||||
.ForeignKey("dbo.user", t => t.user_id, cascadeDelete: true)
|
||||
.Index(t => new { t.machine_id, t.user_id }, unique: true, clustered: true, name: "unique_machine_user")
|
||||
.Index(t => t.role_id);
|
||||
|
||||
CreateTable(
|
||||
"dbo.role",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
name = c.String(unicode: false),
|
||||
level = c.Int(nullable: false),
|
||||
})
|
||||
.PrimaryKey(t => t.id);
|
||||
|
||||
CreateTable(
|
||||
"dbo.user",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
username = c.String(nullable: false, unicode: false),
|
||||
first_name = c.String(unicode: false),
|
||||
last_name = c.String(unicode: false),
|
||||
password = c.String(unicode: false),
|
||||
security_stamp = c.String(unicode: false),
|
||||
language = c.String(unicode: false),
|
||||
})
|
||||
.PrimaryKey(t => t.id);
|
||||
|
||||
CreateTable(
|
||||
"dbo.maintenance",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
intervall = c.Double(),
|
||||
deadline = c.DateTime(nullable: false, precision: 0),
|
||||
type = c.Int(nullable: false),
|
||||
counter_id = c.Int(nullable: false),
|
||||
title = c.String(unicode: false),
|
||||
description = c.String(unicode: false),
|
||||
unit_of_measure = c.Int(),
|
||||
creation_date = c.DateTime(nullable: false, precision: 0),
|
||||
last_expiration_date = c.DateTime(precision: 0),
|
||||
user_id = c.Int(),
|
||||
})
|
||||
.PrimaryKey(t => t.id)
|
||||
.ForeignKey("dbo.user", t => t.user_id)
|
||||
.Index(t => t.user_id);
|
||||
|
||||
CreateTable(
|
||||
"dbo.maintenance_note",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
message = c.String(unicode: false),
|
||||
maintenance_id = c.Int(),
|
||||
user_id = c.Int(),
|
||||
timestamp = c.DateTime(nullable: false, precision: 0),
|
||||
})
|
||||
.PrimaryKey(t => t.id)
|
||||
.ForeignKey("dbo.maintenance", t => t.maintenance_id)
|
||||
.ForeignKey("dbo.user", t => t.user_id)
|
||||
.Index(t => t.maintenance_id)
|
||||
.Index(t => t.user_id);
|
||||
|
||||
CreateTable(
|
||||
"dbo.performed_maintenance",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
date = c.DateTime(nullable: false, precision: 0),
|
||||
counter_value = c.Int(nullable: false),
|
||||
maintenance = c.Int(nullable: false),
|
||||
})
|
||||
.PrimaryKey(t => t.id)
|
||||
.ForeignKey("dbo.maintenance", t => t.maintenance, cascadeDelete: true)
|
||||
.Index(t => t.maintenance);
|
||||
|
||||
CreateTable(
|
||||
"dbo.session",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
token = c.String(unicode: false),
|
||||
machine_user_id = c.Int(nullable: false),
|
||||
})
|
||||
.PrimaryKey(t => t.id)
|
||||
.ForeignKey("dbo.machine_user", t => t.machine_user_id, cascadeDelete: true)
|
||||
.Index(t => t.machine_user_id);
|
||||
|
||||
}
|
||||
|
||||
public override void Down()
|
||||
{
|
||||
DropForeignKey("dbo.session", "machine_user_id", "dbo.machine_user");
|
||||
DropForeignKey("dbo.performed_maintenance", "maintenance", "dbo.maintenance");
|
||||
DropForeignKey("dbo.maintenance_note", "user_id", "dbo.user");
|
||||
DropForeignKey("dbo.maintenance_note", "maintenance_id", "dbo.maintenance");
|
||||
DropForeignKey("dbo.maintenance", "user_id", "dbo.user");
|
||||
DropForeignKey("dbo.machine_user", "user_id", "dbo.user");
|
||||
DropForeignKey("dbo.machine_user", "role_id", "dbo.role");
|
||||
DropForeignKey("dbo.machine_user", "machine_id", "dbo.machine");
|
||||
DropIndex("dbo.session", new[] { "machine_user_id" });
|
||||
DropIndex("dbo.performed_maintenance", new[] { "maintenance" });
|
||||
DropIndex("dbo.maintenance_note", new[] { "user_id" });
|
||||
DropIndex("dbo.maintenance_note", new[] { "maintenance_id" });
|
||||
DropIndex("dbo.maintenance", new[] { "user_id" });
|
||||
DropIndex("dbo.machine_user", new[] { "role_id" });
|
||||
DropIndex("dbo.machine_user", "unique_machine_user");
|
||||
DropTable("dbo.session");
|
||||
DropTable("dbo.performed_maintenance");
|
||||
DropTable("dbo.maintenance_note");
|
||||
DropTable("dbo.maintenance");
|
||||
DropTable("dbo.user");
|
||||
DropTable("dbo.role");
|
||||
DropTable("dbo.machine_user");
|
||||
DropTable("dbo.machine");
|
||||
DropTable("dbo.function_access");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -1,29 +0,0 @@
|
||||
// <auto-generated />
|
||||
namespace Thermo.Active.Database.Migrations
|
||||
{
|
||||
using System.CodeDom.Compiler;
|
||||
using System.Data.Entity.Migrations;
|
||||
using System.Data.Entity.Migrations.Infrastructure;
|
||||
using System.Resources;
|
||||
|
||||
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
|
||||
public sealed partial class InitMigration : IMigrationMetadata
|
||||
{
|
||||
private readonly ResourceManager Resources = new ResourceManager(typeof(InitMigration));
|
||||
|
||||
string IMigrationMetadata.Id
|
||||
{
|
||||
get { return "201807120908403_InitMigration"; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Source
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Target
|
||||
{
|
||||
get { return Resources.GetString("Target"); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,196 +0,0 @@
|
||||
namespace Thermo.Active.Database.Migrations
|
||||
{
|
||||
using System;
|
||||
using System.Data.Entity.Migrations;
|
||||
|
||||
public partial class InitMigration : DbMigration
|
||||
{
|
||||
public override void Up()
|
||||
{
|
||||
CreateTable(
|
||||
"dbo.favorite_user_softkey",
|
||||
c => new
|
||||
{
|
||||
user_softkey_id = c.Int(nullable: false),
|
||||
user_id = c.Int(nullable: false),
|
||||
})
|
||||
.PrimaryKey(t => new { t.user_softkey_id, t.user_id });
|
||||
|
||||
CreateTable(
|
||||
"dbo.function_access",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
name = c.String(unicode: false),
|
||||
write_level_min = c.Int(nullable: false),
|
||||
read_level_min = c.Int(nullable: false),
|
||||
area = c.String(unicode: false),
|
||||
enabled = c.Boolean(nullable: false),
|
||||
plc_id = c.Int(nullable: false),
|
||||
})
|
||||
.PrimaryKey(t => t.id);
|
||||
|
||||
CreateTable(
|
||||
"dbo.machine",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
name = c.String(unicode: false),
|
||||
unique_id = c.String(unicode: false),
|
||||
})
|
||||
.PrimaryKey(t => t.id);
|
||||
|
||||
CreateTable(
|
||||
"dbo.machine_user",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
machine_id = c.Int(nullable: false),
|
||||
user_id = c.Int(nullable: false),
|
||||
role_id = c.Int(nullable: false),
|
||||
})
|
||||
.PrimaryKey(t => t.id)
|
||||
.ForeignKey("dbo.machine", t => t.machine_id, cascadeDelete: true)
|
||||
.ForeignKey("dbo.role", t => t.role_id, cascadeDelete: true)
|
||||
.ForeignKey("dbo.user", t => t.user_id, cascadeDelete: true)
|
||||
.Index(t => new { t.machine_id, t.user_id }, unique: true, clustered: true, name: "unique_machine_user")
|
||||
.Index(t => t.role_id);
|
||||
|
||||
CreateTable(
|
||||
"dbo.role",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
name = c.String(unicode: false),
|
||||
level = c.Int(nullable: false),
|
||||
})
|
||||
.PrimaryKey(t => t.id);
|
||||
|
||||
CreateTable(
|
||||
"dbo.user",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
username = c.String(nullable: false, unicode: false),
|
||||
first_name = c.String(unicode: false),
|
||||
last_name = c.String(unicode: false),
|
||||
password = c.String(unicode: false),
|
||||
security_stamp = c.String(unicode: false),
|
||||
language = c.String(unicode: false),
|
||||
})
|
||||
.PrimaryKey(t => t.id);
|
||||
|
||||
CreateTable(
|
||||
"dbo.maintenance_file",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
file_name = c.String(unicode: false),
|
||||
local_file_name = c.String(unicode: false),
|
||||
maintenance_id = c.Int(nullable: false),
|
||||
user_id = c.Int(),
|
||||
})
|
||||
.PrimaryKey(t => t.id)
|
||||
.ForeignKey("dbo.maintenance", t => t.maintenance_id, cascadeDelete: true)
|
||||
.ForeignKey("dbo.user", t => t.user_id)
|
||||
.Index(t => t.maintenance_id)
|
||||
.Index(t => t.user_id);
|
||||
|
||||
CreateTable(
|
||||
"dbo.maintenance",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
intervall = c.Double(),
|
||||
deadline = c.DateTime(nullable: false, precision: 0),
|
||||
type = c.Int(nullable: false),
|
||||
counter_id = c.Int(nullable: false),
|
||||
title = c.String(unicode: false),
|
||||
description = c.String(unicode: false),
|
||||
unit_of_measure = c.Int(),
|
||||
creation_date = c.DateTime(nullable: false, precision: 0),
|
||||
last_expiration_date = c.DateTime(precision: 0),
|
||||
user_id = c.Int(),
|
||||
})
|
||||
.PrimaryKey(t => t.id)
|
||||
.ForeignKey("dbo.user", t => t.user_id)
|
||||
.Index(t => t.user_id);
|
||||
|
||||
CreateTable(
|
||||
"dbo.maintenance_note",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
message = c.String(unicode: false),
|
||||
user_id = c.Int(nullable: false),
|
||||
maintenance_id = c.Int(nullable: false),
|
||||
timestamp = c.DateTime(nullable: false, precision: 0),
|
||||
})
|
||||
.PrimaryKey(t => t.id)
|
||||
.ForeignKey("dbo.maintenance", t => t.maintenance_id, cascadeDelete: true)
|
||||
.ForeignKey("dbo.user", t => t.user_id, cascadeDelete: true)
|
||||
.Index(t => t.user_id)
|
||||
.Index(t => t.maintenance_id);
|
||||
|
||||
CreateTable(
|
||||
"dbo.performed_maintenance",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
date = c.DateTime(nullable: false, precision: 0),
|
||||
counter_value = c.Int(nullable: false),
|
||||
maintenance = c.Int(nullable: false),
|
||||
})
|
||||
.PrimaryKey(t => t.id)
|
||||
.ForeignKey("dbo.maintenance", t => t.maintenance, cascadeDelete: true)
|
||||
.Index(t => t.maintenance);
|
||||
|
||||
CreateTable(
|
||||
"dbo.session",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
token = c.String(unicode: false),
|
||||
machine_user_id = c.Int(nullable: false),
|
||||
})
|
||||
.PrimaryKey(t => t.id)
|
||||
.ForeignKey("dbo.machine_user", t => t.machine_user_id, cascadeDelete: true)
|
||||
.Index(t => t.machine_user_id);
|
||||
|
||||
}
|
||||
|
||||
public override void Down()
|
||||
{
|
||||
DropForeignKey("dbo.session", "machine_user_id", "dbo.machine_user");
|
||||
DropForeignKey("dbo.performed_maintenance", "maintenance", "dbo.maintenance");
|
||||
DropForeignKey("dbo.maintenance_note", "user_id", "dbo.user");
|
||||
DropForeignKey("dbo.maintenance_note", "maintenance_id", "dbo.maintenance");
|
||||
DropForeignKey("dbo.maintenance_file", "user_id", "dbo.user");
|
||||
DropForeignKey("dbo.maintenance_file", "maintenance_id", "dbo.maintenance");
|
||||
DropForeignKey("dbo.maintenance", "user_id", "dbo.user");
|
||||
DropForeignKey("dbo.machine_user", "user_id", "dbo.user");
|
||||
DropForeignKey("dbo.machine_user", "role_id", "dbo.role");
|
||||
DropForeignKey("dbo.machine_user", "machine_id", "dbo.machine");
|
||||
DropIndex("dbo.session", new[] { "machine_user_id" });
|
||||
DropIndex("dbo.performed_maintenance", new[] { "maintenance" });
|
||||
DropIndex("dbo.maintenance_note", new[] { "maintenance_id" });
|
||||
DropIndex("dbo.maintenance_note", new[] { "user_id" });
|
||||
DropIndex("dbo.maintenance", new[] { "user_id" });
|
||||
DropIndex("dbo.maintenance_file", new[] { "user_id" });
|
||||
DropIndex("dbo.maintenance_file", new[] { "maintenance_id" });
|
||||
DropIndex("dbo.machine_user", new[] { "role_id" });
|
||||
DropIndex("dbo.machine_user", "unique_machine_user");
|
||||
DropTable("dbo.session");
|
||||
DropTable("dbo.performed_maintenance");
|
||||
DropTable("dbo.maintenance_note");
|
||||
DropTable("dbo.maintenance");
|
||||
DropTable("dbo.maintenance_file");
|
||||
DropTable("dbo.user");
|
||||
DropTable("dbo.role");
|
||||
DropTable("dbo.machine_user");
|
||||
DropTable("dbo.machine");
|
||||
DropTable("dbo.function_access");
|
||||
DropTable("dbo.favorite_user_softkey");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -1,29 +0,0 @@
|
||||
// <auto-generated />
|
||||
namespace Thermo.Active.Database.Migrations
|
||||
{
|
||||
using System.CodeDom.Compiler;
|
||||
using System.Data.Entity.Migrations;
|
||||
using System.Data.Entity.Migrations.Infrastructure;
|
||||
using System.Resources;
|
||||
|
||||
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
|
||||
public sealed partial class InitMigration : IMigrationMetadata
|
||||
{
|
||||
private readonly ResourceManager Resources = new ResourceManager(typeof(InitMigration));
|
||||
|
||||
string IMigrationMetadata.Id
|
||||
{
|
||||
get { return "201810100646276_InitMigration"; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Source
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Target
|
||||
{
|
||||
get { return Resources.GetString("Target"); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,340 +0,0 @@
|
||||
namespace Thermo.Active.Database.Migrations
|
||||
{
|
||||
using System;
|
||||
using System.Data.Entity.Migrations;
|
||||
|
||||
public partial class InitMigration : DbMigration
|
||||
{
|
||||
public override void Up()
|
||||
{
|
||||
CreateTable(
|
||||
"dbo.alarm_description",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
title = c.String(unicode: false),
|
||||
description = c.String(unicode: false),
|
||||
})
|
||||
.PrimaryKey(t => t.id);
|
||||
|
||||
CreateTable(
|
||||
"dbo.alarm_occurrence",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
alarm_id = c.Int(),
|
||||
source = c.Int(nullable: false),
|
||||
type = c.Int(nullable: false),
|
||||
processes = c.Int(nullable: false),
|
||||
timestamp = c.DateTime(nullable: false, precision: 0),
|
||||
})
|
||||
.PrimaryKey(t => t.id)
|
||||
.ForeignKey("dbo.alarm_description", t => t.alarm_id)
|
||||
.Index(t => t.alarm_id);
|
||||
|
||||
CreateTable(
|
||||
"dbo.alarm_user",
|
||||
c => new
|
||||
{
|
||||
user_id = c.Int(nullable: false),
|
||||
alarm_occurence_id = c.Int(nullable: false),
|
||||
})
|
||||
.PrimaryKey(t => new { t.user_id, t.alarm_occurence_id })
|
||||
.ForeignKey("dbo.alarm_occurrence", t => t.alarm_occurence_id, cascadeDelete: true)
|
||||
.ForeignKey("dbo.user", t => t.user_id, cascadeDelete: true)
|
||||
.Index(t => t.user_id)
|
||||
.Index(t => t.alarm_occurence_id);
|
||||
|
||||
CreateTable(
|
||||
"dbo.user",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
username = c.String(nullable: false, unicode: false),
|
||||
first_name = c.String(unicode: false),
|
||||
last_name = c.String(unicode: false),
|
||||
password = c.String(unicode: false),
|
||||
security_stamp = c.String(unicode: false),
|
||||
language = c.String(unicode: false),
|
||||
})
|
||||
.PrimaryKey(t => t.id);
|
||||
|
||||
CreateTable(
|
||||
"dbo.family",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
name = c.String(unicode: false),
|
||||
type = c.Byte(nullable: false),
|
||||
right_size = c.Byte(nullable: false),
|
||||
left_size = c.Byte(nullable: false),
|
||||
tcp_table = c.Byte(nullable: false),
|
||||
gamma = c.Byte(nullable: false),
|
||||
rotation_type = c.Byte(nullable: false),
|
||||
cooling_byte = c.Byte(nullable: false),
|
||||
max_speed = c.Int(nullable: false),
|
||||
max_load = c.Byte(nullable: false),
|
||||
min_load_pct_autoload = c.Byte(nullable: false),
|
||||
max_load_pct_autoload = c.Byte(nullable: false),
|
||||
dynamic_compensation = c.Byte(nullable: false),
|
||||
min_load_dynamic_comp = c.Byte(nullable: false),
|
||||
max_load_dynamic_comp = c.Byte(nullable: false),
|
||||
life_type = c.Byte(nullable: false),
|
||||
nominal_life = c.Int(nullable: false),
|
||||
revive_delta = c.Int(nullable: false),
|
||||
})
|
||||
.PrimaryKey(t => t.id);
|
||||
|
||||
CreateTable(
|
||||
"dbo.tool",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
offset_length = c.Int(nullable: false),
|
||||
residual_life = c.Int(nullable: false),
|
||||
residual_revive = c.Int(nullable: false),
|
||||
status = c.Byte(nullable: false),
|
||||
family_id = c.Int(nullable: false),
|
||||
shank_id = c.Int(),
|
||||
offsetId1 = c.Int(),
|
||||
offsetId2 = c.Int(),
|
||||
offsetId3 = c.Int(),
|
||||
})
|
||||
.PrimaryKey(t => t.id)
|
||||
.ForeignKey("dbo.family", t => t.family_id, cascadeDelete: true)
|
||||
.ForeignKey("dbo.shank", t => t.shank_id)
|
||||
.Index(t => t.family_id)
|
||||
.Index(t => t.shank_id);
|
||||
|
||||
CreateTable(
|
||||
"dbo.shank",
|
||||
c => new
|
||||
{
|
||||
magazine_id = c.Byte(),
|
||||
position_id = c.Byte(),
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
balluf = c.Int(),
|
||||
magazine_position_type = c.Byte(nullable: false),
|
||||
})
|
||||
.PrimaryKey(t => t.id)
|
||||
.ForeignKey("dbo.magazine_position", t => new { t.magazine_id, t.position_id })
|
||||
.Index(t => new { t.magazine_id, t.position_id });
|
||||
|
||||
CreateTable(
|
||||
"dbo.magazine_position",
|
||||
c => new
|
||||
{
|
||||
magazine_id = c.Byte(nullable: false),
|
||||
position_id = c.Byte(nullable: false),
|
||||
type = c.Byte(nullable: false),
|
||||
disabled = c.Boolean(nullable: false),
|
||||
})
|
||||
.PrimaryKey(t => new { t.magazine_id, t.position_id });
|
||||
|
||||
CreateTable(
|
||||
"dbo.favorite_user_softkey",
|
||||
c => new
|
||||
{
|
||||
user_softkey_id = c.Int(nullable: false),
|
||||
user_id = c.Int(nullable: false),
|
||||
})
|
||||
.PrimaryKey(t => new { t.user_softkey_id, t.user_id });
|
||||
|
||||
CreateTable(
|
||||
"dbo.function_access",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
name = c.String(unicode: false),
|
||||
write_level_min = c.Int(nullable: false),
|
||||
read_level_min = c.Int(nullable: false),
|
||||
area = c.String(unicode: false),
|
||||
enabled = c.Boolean(nullable: false),
|
||||
plc_id = c.Int(nullable: false),
|
||||
})
|
||||
.PrimaryKey(t => t.id);
|
||||
|
||||
CreateTable(
|
||||
"dbo.machine",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
name = c.String(unicode: false),
|
||||
unique_id = c.String(unicode: false),
|
||||
})
|
||||
.PrimaryKey(t => t.id);
|
||||
|
||||
CreateTable(
|
||||
"dbo.machine_user",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
machine_id = c.Int(nullable: false),
|
||||
user_id = c.Int(nullable: false),
|
||||
role_id = c.Int(nullable: false),
|
||||
})
|
||||
.PrimaryKey(t => t.id)
|
||||
.ForeignKey("dbo.machine", t => t.machine_id, cascadeDelete: true)
|
||||
.ForeignKey("dbo.role", t => t.role_id, cascadeDelete: true)
|
||||
.ForeignKey("dbo.user", t => t.user_id, cascadeDelete: true)
|
||||
.Index(t => new { t.machine_id, t.user_id }, unique: true, clustered: true, name: "unique_machine_user")
|
||||
.Index(t => t.role_id);
|
||||
|
||||
CreateTable(
|
||||
"dbo.role",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
name = c.String(unicode: false),
|
||||
level = c.Int(nullable: false),
|
||||
})
|
||||
.PrimaryKey(t => t.id);
|
||||
|
||||
CreateTable(
|
||||
"dbo.maintenance_file",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
file_name = c.String(unicode: false),
|
||||
local_file_name = c.String(unicode: false),
|
||||
maintenance_id = c.Int(nullable: false),
|
||||
user_id = c.Int(),
|
||||
})
|
||||
.PrimaryKey(t => t.id)
|
||||
.ForeignKey("dbo.maintenance", t => t.maintenance_id, cascadeDelete: true)
|
||||
.ForeignKey("dbo.user", t => t.user_id)
|
||||
.Index(t => t.maintenance_id)
|
||||
.Index(t => t.user_id);
|
||||
|
||||
CreateTable(
|
||||
"dbo.maintenance",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false),
|
||||
intervall = c.Double(),
|
||||
deadline = c.DateTime(nullable: false, precision: 0),
|
||||
type = c.Int(nullable: false),
|
||||
counter_id = c.Int(nullable: false),
|
||||
title = c.String(unicode: false),
|
||||
description = c.String(unicode: false),
|
||||
unit_of_measure = c.Int(),
|
||||
creation_date = c.DateTime(nullable: false, precision: 0),
|
||||
last_expiration_date = c.DateTime(precision: 0),
|
||||
user_id = c.Int(),
|
||||
})
|
||||
.PrimaryKey(t => t.id)
|
||||
.ForeignKey("dbo.user", t => t.user_id)
|
||||
.Index(t => t.user_id);
|
||||
|
||||
CreateTable(
|
||||
"dbo.maintenance_note",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
message = c.String(unicode: false),
|
||||
user_id = c.Int(nullable: false),
|
||||
maintenance_id = c.Int(nullable: false),
|
||||
timestamp = c.DateTime(nullable: false, precision: 0),
|
||||
})
|
||||
.PrimaryKey(t => t.id)
|
||||
.ForeignKey("dbo.maintenance", t => t.maintenance_id, cascadeDelete: true)
|
||||
.ForeignKey("dbo.user", t => t.user_id, cascadeDelete: true)
|
||||
.Index(t => t.user_id)
|
||||
.Index(t => t.maintenance_id);
|
||||
|
||||
CreateTable(
|
||||
"dbo.performed_maintenance",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
date = c.DateTime(nullable: false, precision: 0),
|
||||
counter_value = c.Int(nullable: false),
|
||||
maintenance = c.Int(nullable: false),
|
||||
})
|
||||
.PrimaryKey(t => t.id)
|
||||
.ForeignKey("dbo.maintenance", t => t.maintenance, cascadeDelete: true)
|
||||
.Index(t => t.maintenance);
|
||||
|
||||
CreateTable(
|
||||
"dbo.queue",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false),
|
||||
process = c.Int(nullable: false),
|
||||
part_program_name = c.String(unicode: false),
|
||||
reps = c.Int(nullable: false),
|
||||
remaining_reps = c.Int(nullable: false),
|
||||
absolute_path = c.String(unicode: false),
|
||||
status = c.Int(nullable: false),
|
||||
})
|
||||
.PrimaryKey(t => new { t.id, t.process });
|
||||
|
||||
CreateTable(
|
||||
"dbo.session",
|
||||
c => new
|
||||
{
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
token = c.String(unicode: false),
|
||||
machine_user_id = c.Int(nullable: false),
|
||||
})
|
||||
.PrimaryKey(t => t.id)
|
||||
.ForeignKey("dbo.machine_user", t => t.machine_user_id, cascadeDelete: true)
|
||||
.Index(t => t.machine_user_id);
|
||||
|
||||
}
|
||||
|
||||
public override void Down()
|
||||
{
|
||||
DropForeignKey("dbo.session", "machine_user_id", "dbo.machine_user");
|
||||
DropForeignKey("dbo.performed_maintenance", "maintenance", "dbo.maintenance");
|
||||
DropForeignKey("dbo.maintenance_note", "user_id", "dbo.user");
|
||||
DropForeignKey("dbo.maintenance_note", "maintenance_id", "dbo.maintenance");
|
||||
DropForeignKey("dbo.maintenance_file", "user_id", "dbo.user");
|
||||
DropForeignKey("dbo.maintenance_file", "maintenance_id", "dbo.maintenance");
|
||||
DropForeignKey("dbo.maintenance", "user_id", "dbo.user");
|
||||
DropForeignKey("dbo.machine_user", "user_id", "dbo.user");
|
||||
DropForeignKey("dbo.machine_user", "role_id", "dbo.role");
|
||||
DropForeignKey("dbo.machine_user", "machine_id", "dbo.machine");
|
||||
DropForeignKey("dbo.tool", "shank_id", "dbo.shank");
|
||||
DropForeignKey("dbo.shank", new[] { "magazine_id", "position_id" }, "dbo.magazine_position");
|
||||
DropForeignKey("dbo.tool", "family_id", "dbo.family");
|
||||
DropForeignKey("dbo.alarm_user", "user_id", "dbo.user");
|
||||
DropForeignKey("dbo.alarm_user", "alarm_occurence_id", "dbo.alarm_occurrence");
|
||||
DropForeignKey("dbo.alarm_occurrence", "alarm_id", "dbo.alarm_description");
|
||||
DropIndex("dbo.session", new[] { "machine_user_id" });
|
||||
DropIndex("dbo.performed_maintenance", new[] { "maintenance" });
|
||||
DropIndex("dbo.maintenance_note", new[] { "maintenance_id" });
|
||||
DropIndex("dbo.maintenance_note", new[] { "user_id" });
|
||||
DropIndex("dbo.maintenance", new[] { "user_id" });
|
||||
DropIndex("dbo.maintenance_file", new[] { "user_id" });
|
||||
DropIndex("dbo.maintenance_file", new[] { "maintenance_id" });
|
||||
DropIndex("dbo.machine_user", new[] { "role_id" });
|
||||
DropIndex("dbo.machine_user", "unique_machine_user");
|
||||
DropIndex("dbo.shank", new[] { "magazine_id", "position_id" });
|
||||
DropIndex("dbo.tool", new[] { "shank_id" });
|
||||
DropIndex("dbo.tool", new[] { "family_id" });
|
||||
DropIndex("dbo.alarm_user", new[] { "alarm_occurence_id" });
|
||||
DropIndex("dbo.alarm_user", new[] { "user_id" });
|
||||
DropIndex("dbo.alarm_occurrence", new[] { "alarm_id" });
|
||||
DropTable("dbo.session");
|
||||
DropTable("dbo.queue");
|
||||
DropTable("dbo.performed_maintenance");
|
||||
DropTable("dbo.maintenance_note");
|
||||
DropTable("dbo.maintenance");
|
||||
DropTable("dbo.maintenance_file");
|
||||
DropTable("dbo.role");
|
||||
DropTable("dbo.machine_user");
|
||||
DropTable("dbo.machine");
|
||||
DropTable("dbo.function_access");
|
||||
DropTable("dbo.favorite_user_softkey");
|
||||
DropTable("dbo.magazine_position");
|
||||
DropTable("dbo.shank");
|
||||
DropTable("dbo.tool");
|
||||
DropTable("dbo.family");
|
||||
DropTable("dbo.user");
|
||||
DropTable("dbo.alarm_user");
|
||||
DropTable("dbo.alarm_occurrence");
|
||||
DropTable("dbo.alarm_description");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -1,29 +0,0 @@
|
||||
// <auto-generated />
|
||||
namespace Thermo.Active.Database.Migrations
|
||||
{
|
||||
using System.CodeDom.Compiler;
|
||||
using System.Data.Entity.Migrations;
|
||||
using System.Data.Entity.Migrations.Infrastructure;
|
||||
using System.Resources;
|
||||
|
||||
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
|
||||
public sealed partial class InitMigration : IMigrationMetadata
|
||||
{
|
||||
private readonly ResourceManager Resources = new ResourceManager(typeof(InitMigration));
|
||||
|
||||
string IMigrationMetadata.Id
|
||||
{
|
||||
get { return "201902121508312_InitMigration"; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Source
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Target
|
||||
{
|
||||
get { return Resources.GetString("Target"); }
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -1,18 +0,0 @@
|
||||
namespace Thermo.Active.Database.Migrations
|
||||
{
|
||||
using System;
|
||||
using System.Data.Entity.Migrations;
|
||||
|
||||
public partial class InitMigrtion : DbMigration
|
||||
{
|
||||
public override void Up()
|
||||
{
|
||||
AddColumn("dbo.performed_maintenance", "control_word", c => c.Int(nullable: false));
|
||||
}
|
||||
|
||||
public override void Down()
|
||||
{
|
||||
DropColumn("dbo.performed_maintenance", "control_word");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
-29
@@ -1,29 +0,0 @@
|
||||
// <auto-generated />
|
||||
namespace Thermo.Active.Database.Migrations
|
||||
{
|
||||
using System.CodeDom.Compiler;
|
||||
using System.Data.Entity.Migrations;
|
||||
using System.Data.Entity.Migrations.Infrastructure;
|
||||
using System.Resources;
|
||||
|
||||
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
|
||||
public sealed partial class UserDeleteMigratin : IMigrationMetadata
|
||||
{
|
||||
private readonly ResourceManager Resources = new ResourceManager(typeof(UserDeleteMigratin));
|
||||
|
||||
string IMigrationMetadata.Id
|
||||
{
|
||||
get { return "201904041054202_UserDeleteMigratin"; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Source
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Target
|
||||
{
|
||||
get { return Resources.GetString("Target"); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
namespace Thermo.Active.Database.Migrations
|
||||
{
|
||||
using System;
|
||||
using System.Data.Entity.Migrations;
|
||||
|
||||
public partial class UserDeleteMigratin : DbMigration
|
||||
{
|
||||
public override void Up()
|
||||
{
|
||||
AddColumn("dbo.user", "deleted", c => c.Boolean(nullable: false));
|
||||
}
|
||||
|
||||
public override void Down()
|
||||
{
|
||||
DropColumn("dbo.user", "deleted");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
+3
-3
@@ -7,13 +7,13 @@ namespace Thermo.Active.Database.Migrations
|
||||
using System.Resources;
|
||||
|
||||
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
|
||||
public sealed partial class InitMigrtion : IMigrationMetadata
|
||||
public sealed partial class ThermoStart : IMigrationMetadata
|
||||
{
|
||||
private readonly ResourceManager Resources = new ResourceManager(typeof(InitMigrtion));
|
||||
private readonly ResourceManager Resources = new ResourceManager(typeof(ThermoStart));
|
||||
|
||||
string IMigrationMetadata.Id
|
||||
{
|
||||
get { return "201903070940012_InitMigrtion"; }
|
||||
get { return "202004241109233_Thermo-Start"; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Source
|
||||
+3
-59
@@ -3,7 +3,7 @@ namespace Thermo.Active.Database.Migrations
|
||||
using System;
|
||||
using System.Data.Entity.Migrations;
|
||||
|
||||
public partial class InitMigration : DbMigration
|
||||
public partial class ThermoStart : DbMigration
|
||||
{
|
||||
public override void Up()
|
||||
{
|
||||
@@ -42,6 +42,7 @@ namespace Thermo.Active.Database.Migrations
|
||||
password = c.String(unicode: false),
|
||||
security_stamp = c.String(unicode: false),
|
||||
language = c.String(unicode: false),
|
||||
deleted = c.Boolean(nullable: false),
|
||||
})
|
||||
.PrimaryKey(t => t.id);
|
||||
|
||||
@@ -95,7 +96,6 @@ namespace Thermo.Active.Database.Migrations
|
||||
{
|
||||
id = c.Short(nullable: false),
|
||||
name = c.String(unicode: false),
|
||||
type = c.Byte(nullable: false),
|
||||
right_size = c.Byte(nullable: false),
|
||||
left_size = c.Byte(nullable: false),
|
||||
tcp_table = c.Byte(nullable: false),
|
||||
@@ -115,54 +115,6 @@ namespace Thermo.Active.Database.Migrations
|
||||
})
|
||||
.PrimaryKey(t => t.id);
|
||||
|
||||
CreateTable(
|
||||
"dbo.tool",
|
||||
c => new
|
||||
{
|
||||
id = c.Short(nullable: false),
|
||||
offset_length = c.Short(nullable: false),
|
||||
residual_life = c.Int(nullable: false),
|
||||
residual_revive = c.Int(nullable: false),
|
||||
status = c.Byte(nullable: false),
|
||||
family_id = c.Short(nullable: false),
|
||||
shank_id = c.Short(),
|
||||
offsetId1 = c.Short(),
|
||||
offsetId2 = c.Short(),
|
||||
offsetId3 = c.Short(),
|
||||
})
|
||||
.PrimaryKey(t => t.id)
|
||||
.ForeignKey("dbo.family", t => t.family_id, cascadeDelete: true)
|
||||
.ForeignKey("dbo.shank", t => t.shank_id)
|
||||
.Index(t => t.family_id)
|
||||
.Index(t => t.shank_id);
|
||||
|
||||
CreateTable(
|
||||
"dbo.shank",
|
||||
c => new
|
||||
{
|
||||
magazine_id = c.Byte(),
|
||||
position_id = c.Int(),
|
||||
id = c.Short(nullable: false),
|
||||
balluf = c.Int(),
|
||||
magazine_position_type = c.Byte(nullable: false),
|
||||
origin_magazine_id = c.Byte(),
|
||||
origin_position_id = c.Int(),
|
||||
})
|
||||
.PrimaryKey(t => t.id)
|
||||
.ForeignKey("dbo.magazine_position", t => new { t.magazine_id, t.position_id })
|
||||
.Index(t => new { t.magazine_id, t.position_id });
|
||||
|
||||
CreateTable(
|
||||
"dbo.magazine_position",
|
||||
c => new
|
||||
{
|
||||
magazine_id = c.Byte(nullable: false),
|
||||
position_id = c.Int(nullable: false),
|
||||
type = c.Byte(nullable: false),
|
||||
disabled = c.Boolean(nullable: false),
|
||||
})
|
||||
.PrimaryKey(t => new { t.magazine_id, t.position_id });
|
||||
|
||||
CreateTable(
|
||||
"dbo.favorite_user_softkey",
|
||||
c => new
|
||||
@@ -281,6 +233,7 @@ namespace Thermo.Active.Database.Migrations
|
||||
id = c.Int(nullable: false, identity: true),
|
||||
date = c.DateTime(nullable: false, precision: 0),
|
||||
counter_value = c.Int(nullable: false),
|
||||
control_word = c.Int(nullable: false),
|
||||
maintenance = c.Int(nullable: false),
|
||||
maintainers_id = c.Int(),
|
||||
})
|
||||
@@ -332,9 +285,6 @@ namespace Thermo.Active.Database.Migrations
|
||||
DropForeignKey("dbo.machine_user", "user_id", "dbo.user");
|
||||
DropForeignKey("dbo.machine_user", "role_id", "dbo.role");
|
||||
DropForeignKey("dbo.machine_user", "machine_id", "dbo.machine");
|
||||
DropForeignKey("dbo.tool", "shank_id", "dbo.shank");
|
||||
DropForeignKey("dbo.shank", new[] { "magazine_id", "position_id" }, "dbo.magazine_position");
|
||||
DropForeignKey("dbo.tool", "family_id", "dbo.family");
|
||||
DropForeignKey("dbo.alarm_note", "user_id", "dbo.user");
|
||||
DropForeignKey("dbo.alarm_user", "user_id", "dbo.user");
|
||||
DropForeignKey("dbo.alarm_user", "alarm_occurence_id", "dbo.alarm_occurrence");
|
||||
@@ -350,9 +300,6 @@ namespace Thermo.Active.Database.Migrations
|
||||
DropIndex("dbo.maintenance_file", new[] { "maintenance_id" });
|
||||
DropIndex("dbo.machine_user", new[] { "role_id" });
|
||||
DropIndex("dbo.machine_user", "unique_machine_user");
|
||||
DropIndex("dbo.shank", new[] { "magazine_id", "position_id" });
|
||||
DropIndex("dbo.tool", new[] { "shank_id" });
|
||||
DropIndex("dbo.tool", new[] { "family_id" });
|
||||
DropIndex("dbo.alarm_note", new[] { "user_id" });
|
||||
DropIndex("dbo.alarm_user", new[] { "alarm_occurence_id" });
|
||||
DropIndex("dbo.alarm_user", new[] { "user_id" });
|
||||
@@ -369,9 +316,6 @@ namespace Thermo.Active.Database.Migrations
|
||||
DropTable("dbo.machine");
|
||||
DropTable("dbo.function_access");
|
||||
DropTable("dbo.favorite_user_softkey");
|
||||
DropTable("dbo.magazine_position");
|
||||
DropTable("dbo.shank");
|
||||
DropTable("dbo.tool");
|
||||
DropTable("dbo.family");
|
||||
DropTable("dbo.alarm_note");
|
||||
DropTable("dbo.alarm_user");
|
||||
File diff suppressed because one or more lines are too long
@@ -1,21 +1,24 @@
|
||||
namespace Thermo.Active.Database.Migrations
|
||||
{
|
||||
using System;
|
||||
using System.Data.Entity;
|
||||
using System.Linq;
|
||||
using Thermo.Active.Model.DatabaseModels;
|
||||
using System.Data.Entity.Migrations;
|
||||
using static Thermo.Active.Model.Constants.FUNCTIONALITY_NAMES;
|
||||
using static Thermo.Active.Model.Constants.AREAS;
|
||||
using static Thermo.Active.Model.Constants;
|
||||
|
||||
public sealed class Configuration : DbMigrationsConfiguration<DatabaseContext>
|
||||
internal sealed class Configuration : DbMigrationsConfiguration<Thermo.Active.Database.DatabaseContext>
|
||||
{
|
||||
public Configuration()
|
||||
{
|
||||
AutomaticMigrationsEnabled = true;
|
||||
AutomaticMigrationDataLossAllowed = true;
|
||||
ContextKey = "Step.Database.DatabaseContext";
|
||||
ContextKey = "Thermo.Active.Database.DatabaseContext";
|
||||
}
|
||||
|
||||
protected override void Seed(DatabaseContext context)
|
||||
protected override void Seed(Thermo.Active.Database.DatabaseContext context)
|
||||
{
|
||||
// This method will be called after migrating to the latest version. 0-99 Customer. 100 - 199 CMS
|
||||
context.Roles.AddOrUpdate(
|
||||
@@ -26,30 +29,27 @@ namespace Thermo.Active.Database.Migrations
|
||||
new RoleModel() { RoleId = (int)ROLE_IDS.CUSTOMER_OPERATOR, Level = 20, Name = "Operator" },
|
||||
new RoleModel() { RoleId = (int)ROLE_IDS.CUSTOMER_MAINTAINER, Level = 10, Name = "Maintainer" }
|
||||
);
|
||||
|
||||
|
||||
context.FunctionsAccess.AddOrUpdate(
|
||||
// General Function, if plcId is 0 then the functionality is not connected to the NC
|
||||
new FunctionAccessModel() { Name = GENERAL, Area = GENERAL_KEY, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 0},
|
||||
new FunctionAccessModel() { Name = USER_FUNCTIONS, Area = GENERAL_KEY, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 0},
|
||||
new FunctionAccessModel() { Name = NC_DATA, Area = GENERAL_KEY, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 0},
|
||||
new FunctionAccessModel() { Name = ALARM_CMD, Area = GENERAL_KEY, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 1},
|
||||
new FunctionAccessModel() { Name = STARTUP_ICONS, Area = GENERAL_KEY, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 2},
|
||||
|
||||
new FunctionAccessModel() { Name = GENERAL, Area = GENERAL_KEY, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 0 },
|
||||
new FunctionAccessModel() { Name = USER_FUNCTIONS, Area = GENERAL_KEY, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 0 },
|
||||
new FunctionAccessModel() { Name = NC_DATA, Area = GENERAL_KEY, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 0 },
|
||||
new FunctionAccessModel() { Name = ALARM_CMD, Area = GENERAL_KEY, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 1 },
|
||||
new FunctionAccessModel() { Name = STARTUP_ICONS, Area = GENERAL_KEY, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 2 },
|
||||
|
||||
// Under hood
|
||||
new FunctionAccessModel() { Name = PROCESS_CMD, Area = UNDER_HOOD, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 3},
|
||||
new FunctionAccessModel() { Name = NC_SOFTKEY, Area = UNDER_HOOD, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 4},
|
||||
new FunctionAccessModel() { Name = USER_SOFTKEY, Area = UNDER_HOOD, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 5},
|
||||
new FunctionAccessModel() { Name = HEADS_CMD, Area = UNDER_HOOD, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 6},
|
||||
new FunctionAccessModel() { Name = AXES_SELECTION, Area = UNDER_HOOD, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 7},
|
||||
|
||||
new FunctionAccessModel() { Name = TOOL_MANAGER, Area = TOOLING_KEY, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 8},
|
||||
new FunctionAccessModel() { Name = MAINTENANCE, Area = MAINTENANCE_KEY, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 9},
|
||||
new FunctionAccessModel() { Name = PROCESS_CMD, Area = UNDER_HOOD, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 3 },
|
||||
new FunctionAccessModel() { Name = NC_SOFTKEY, Area = UNDER_HOOD, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 4 },
|
||||
new FunctionAccessModel() { Name = USER_SOFTKEY, Area = UNDER_HOOD, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 5 },
|
||||
new FunctionAccessModel() { Name = HEADS_CMD, Area = UNDER_HOOD, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 6 },
|
||||
new FunctionAccessModel() { Name = AXES_SELECTION, Area = UNDER_HOOD, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 7 },
|
||||
new FunctionAccessModel() { Name = MAINTENANCE, Area = MAINTENANCE_KEY, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 9 },
|
||||
|
||||
|
||||
|
||||
// Main Areas
|
||||
// Main Areas
|
||||
new FunctionAccessModel() { Name = "productionArea", Area = GENERAL_KEY, Enabled = true, WriteLevelMin = 20, ReadLevelMin = 1, PlcId = 0 },
|
||||
new FunctionAccessModel() { Name = "toolingArea", Area = GENERAL_KEY, Enabled = true, WriteLevelMin = 20, ReadLevelMin = 1, PlcId = 0 },
|
||||
new FunctionAccessModel() { Name = "reportArea", Area = GENERAL_KEY, Enabled = true, WriteLevelMin = 30, ReadLevelMin = 1, PlcId = 0 },
|
||||
new FunctionAccessModel() { Name = "alarmsArea", Area = GENERAL_KEY, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 0 },
|
||||
new FunctionAccessModel() { Name = "maintenanceArea", Area = GENERAL_KEY, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 0 },
|
||||
@@ -62,4 +62,4 @@ namespace Thermo.Active.Database.Migrations
|
||||
context.SaveChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
|
||||
// Le informazioni generali relative a un assembly sono controllate dal seguente
|
||||
// set di attributi. Modificare i valori di questi attributi per modificare le informazioni
|
||||
// associate a un assembly.
|
||||
[assembly: AssemblyTitle("Step.Database")]
|
||||
[assembly: AssemblyTitle("Thermo.Active.Database")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Step.Database")]
|
||||
[assembly: AssemblyProduct("Thermo.Active.Database")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2017")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
@@ -34,7 +34,8 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="CMS_CORE_Library">
|
||||
<Reference Include="CMS_CORE_Library, Version=1.1.1.0, Culture=neutral, processorArchitecture=AMD64">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\Libs\CMS_CORE_Library.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
@@ -115,24 +116,15 @@
|
||||
<Compile Include="Controllers\MachinesController.cs" />
|
||||
<Compile Include="Controllers\MaintenancesController.cs" />
|
||||
<Compile Include="Controllers\QueueController.cs" />
|
||||
<Compile Include="Controllers\NcToolManagerController.cs" />
|
||||
<Compile Include="Controllers\RedisController.cs" />
|
||||
<Compile Include="Controllers\SessionsController.cs" />
|
||||
<Compile Include="Controllers\UsersController.cs" />
|
||||
<Compile Include="Controllers\MachinesUsersController.cs" />
|
||||
<Compile Include="Controllers\UserSoftkeysController.cs" />
|
||||
<Compile Include="DatabaseContext.cs" />
|
||||
<Compile Include="Migrations\201902121508312_InitMigration.cs" />
|
||||
<Compile Include="Migrations\201902121508312_InitMigration.Designer.cs">
|
||||
<DependentUpon>201902121508312_InitMigration.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Migrations\201903070940012_InitMigrtion.cs" />
|
||||
<Compile Include="Migrations\201903070940012_InitMigrtion.Designer.cs">
|
||||
<DependentUpon>201903070940012_InitMigrtion.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Migrations\201904041054202_UserDeleteMigratin.cs" />
|
||||
<Compile Include="Migrations\201904041054202_UserDeleteMigratin.Designer.cs">
|
||||
<DependentUpon>201904041054202_UserDeleteMigratin.cs</DependentUpon>
|
||||
<Compile Include="Migrations\202004241109233_Thermo-Start.cs" />
|
||||
<Compile Include="Migrations\202004241109233_Thermo-Start.Designer.cs">
|
||||
<DependentUpon>202004241109233_Thermo-Start.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Migrations\Configuration.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
@@ -170,16 +162,9 @@
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Migrations\201902121508312_InitMigration.resx">
|
||||
<DependentUpon>201902121508312_InitMigration.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Migrations\201903070940012_InitMigrtion.resx">
|
||||
<DependentUpon>201903070940012_InitMigrtion.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Migrations\201904041054202_UserDeleteMigratin.resx">
|
||||
<DependentUpon>201904041054202_UserDeleteMigratin.cs</DependentUpon>
|
||||
<EmbeddedResource Include="Migrations\202004241109233_Thermo-Start.resx">
|
||||
<DependentUpon>202004241109233_Thermo-Start.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectView>ShowAllFiles</ProjectView>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -1,17 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Thermo.Active.Model.ConfigModels
|
||||
{
|
||||
public class MagazineNamesModel
|
||||
{
|
||||
public int MagazineId { get; set; }
|
||||
|
||||
public bool AssistedTooling { get; set; }
|
||||
|
||||
public Dictionary<string, string> LocalizedNames { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System.Collections.Generic;
|
||||
using static Thermo.Active.Model.Constants;
|
||||
|
||||
namespace Thermo.Active.Model.ConfigModels
|
||||
{
|
||||
public class RecipeConfigModel
|
||||
{
|
||||
public int Id;
|
||||
public TACT_PARAM_TYPE Category { get; set; }
|
||||
public string SubCategory_1 { get; set; }
|
||||
public string SubCategory_2 { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string Format { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Thermo.Active.Model.ConfigModels
|
||||
{
|
||||
public class ToolManagerConfigModel
|
||||
{
|
||||
|
||||
public string ToolMetricType { get; set; }
|
||||
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 bool IntegrityCheckOpt { get; set; }
|
||||
|
||||
public CooligTranslations CooligsTranslations { get; set; }
|
||||
|
||||
public List<MagazineNamesModel> MagazineNames { get; set; }
|
||||
|
||||
public List<ToolTypeConfigModel> ToolTypes { get; set; }
|
||||
}
|
||||
|
||||
public class CooligTranslations
|
||||
{
|
||||
public Dictionary<string, string> Cooling { get; set; }
|
||||
public Dictionary<string, string> Cooling1 { get; set; }
|
||||
public Dictionary<string, string> Cooling2 { get; set; }
|
||||
public Dictionary<string, string> Cooling3 { get; set; }
|
||||
public Dictionary<string, string> Cooling4 { get; set; }
|
||||
public Dictionary<string, string> Cooling5 { get; set; }
|
||||
public Dictionary<string, string> Cooling6 { get; set; }
|
||||
public Dictionary<string, string> Cooling7 { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Thermo.Active.Model.ConfigModels
|
||||
{
|
||||
public class ToolTypeConfigModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public bool Disabled { get; set; }
|
||||
|
||||
public Dictionary<string, string> LocalizedNames { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ namespace Thermo.Active.Model
|
||||
{
|
||||
public static class Constants
|
||||
{
|
||||
public static bool IS_BETA = false;
|
||||
public static bool IS_BETA = false;
|
||||
public static string NOT_FOUND_ALARM_MESSAGE = "Alarm_id_{0} : Message not found";
|
||||
public static string NOT_CONFIGURATED_ALARM_MESSAGE = "Alarm_id_{0} : Message not configurated";
|
||||
public static string CMS_CONNECT_SETUP_ALARM_MESSAGE = "Error during CMS-Connect setup: Redis Db Not Found";
|
||||
@@ -20,7 +20,7 @@ namespace Thermo.Active.Model
|
||||
public enum SCADA_ELEMENT_TYPE
|
||||
{
|
||||
BUTTON = 0,
|
||||
IMAGE = 1,
|
||||
IMAGE = 1,
|
||||
INPUT = 2,
|
||||
PROGRESS_BAR = 3,
|
||||
LABEL = 4,
|
||||
@@ -32,12 +32,12 @@ namespace Thermo.Active.Model
|
||||
public static string READ = "read";
|
||||
public static string WRITE = "write";
|
||||
}
|
||||
|
||||
|
||||
public const int MIN_CMS_ROLE = 100;
|
||||
public const int MIN_ADMIN_ROLE = 30;
|
||||
|
||||
public enum ROLE_IDS
|
||||
{
|
||||
{
|
||||
CMS_SERVICE = 1,
|
||||
CMS_UT = 2,
|
||||
CUSTOMER_ADMIN = 3,
|
||||
@@ -74,6 +74,22 @@ namespace Thermo.Active.Model
|
||||
LASER = 3
|
||||
}
|
||||
|
||||
public enum TACT_PARAM_TYPE
|
||||
{
|
||||
ND = 0,
|
||||
General,
|
||||
Positions,
|
||||
Cycle,
|
||||
Heats,
|
||||
Pyrometer,
|
||||
Drawing,
|
||||
UpperPlate,
|
||||
Cooling,
|
||||
Vacuum,
|
||||
Extraction,
|
||||
Options
|
||||
}
|
||||
|
||||
public enum MAINTENANCE_UNIT_OF_MEASURE
|
||||
{
|
||||
mm = 0,
|
||||
@@ -118,13 +134,14 @@ namespace Thermo.Active.Model
|
||||
public const string FANUC = "FANUC";
|
||||
public const string SIEMENS = "SIEMENS";
|
||||
public const string OSAI = "OSAI";
|
||||
public const string S7NET = "S7NET";
|
||||
}
|
||||
|
||||
// Database config
|
||||
public const string DATABASE_USER = "root";
|
||||
|
||||
public const string DATABASE_PWD = "root";
|
||||
public const string DATABASE_NAME = "step";
|
||||
public const string DATABASE_NAME = "ThermoActive";
|
||||
|
||||
// Registry key
|
||||
public const string REGISTER_MACHINE_ID_KEY_NAME = "MachineUniqueId";
|
||||
@@ -144,11 +161,10 @@ namespace Thermo.Active.Model
|
||||
public const string PROD_SFT_CONFIG_KEY = "softwareProdConfig";
|
||||
public const string AREAS_CONFIG_KEY = "areasConfig";
|
||||
|
||||
// Step Areas
|
||||
// Active Areas
|
||||
public class AREAS
|
||||
{
|
||||
public const string PRODUCTION_KEY = "production";
|
||||
public const string TOOLING_KEY = "tooling";
|
||||
public const string REPORT_KEY = "report";
|
||||
public const string ALARMS_KEY = "alarms";
|
||||
public const string MAINTENANCE_KEY = "maintenance";
|
||||
@@ -158,13 +174,15 @@ namespace Thermo.Active.Model
|
||||
public const string UNDER_HOOD = "underHood";
|
||||
public const string JOBEDITOR_KEY = "jobeditor";
|
||||
public const string USERS_KEY = "users";
|
||||
public const string THERMO_KEY = "thermo";
|
||||
public const string RISC_KEY = "risc";
|
||||
}
|
||||
|
||||
// Config File Names
|
||||
public static readonly string BASE_PATH = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
|
||||
|
||||
#if DEBUG
|
||||
public static readonly string CLIENT_PATH_64 = BASE_PATH + @"\Client_Debug\x64\" + CLIENT_EXE_NAME;
|
||||
public static readonly string CLIENT_PATH_64 = BASE_PATH + @"\Client_Debug\x64\" + CLIENT_EXE_NAME;
|
||||
public static readonly string CLIENT_PATH_86 = BASE_PATH + @"\Client_Debug\x84\" + CLIENT_EXE_NAME;
|
||||
public static string WEBSITE_DIRECTORY = Path.Combine(BASE_PATH, "..", "wwwroot");
|
||||
#else
|
||||
@@ -173,14 +191,14 @@ namespace Thermo.Active.Model
|
||||
public static string WEBSITE_DIRECTORY = BASE_PATH + "\\view";
|
||||
#endif
|
||||
public const string CONFIG_DIRECTORY = "Config\\";
|
||||
public const string RESOURCE_DIRECTORY = @"Step.Config.Config.";
|
||||
public const string RESOURCE_DIRECTORY = @"Thermo.Active.Config.Config.";
|
||||
public const string SERVER_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + @"serverConfigValidator.xsd";
|
||||
public const string SERVER_CONFIG_PATH = CONFIG_DIRECTORY + "serverConfig.xml";
|
||||
|
||||
public const string AREAS_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "areasConfigValidator.xsd";
|
||||
public const string AREAS_CONFIG_PATH = CONFIG_DIRECTORY + "areasConfig.xml";
|
||||
|
||||
public const string MAINTENANCES_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "maintenancesConfigValidator.xsd";
|
||||
public const string MAINTENANCES_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "maintenancesConfigValidator.xsd";
|
||||
public const string CUSTOMER_CONTACTS_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "customerContactConfigValidator.xsd";
|
||||
public const string MAINTENANCES_CONFIG_PATH = CONFIG_DIRECTORY + "maintenancesConfig.xml";
|
||||
public const string CUSTOMER_CONTACTS = CMS_FOLDER_PATH + "ContactInfo.xml";
|
||||
@@ -188,19 +206,19 @@ namespace Thermo.Active.Model
|
||||
|
||||
public const string USER_SOFTKEYS_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "userSoftKeyConfigValidator.xsd";
|
||||
public const string USER_SOFTKEYS_CONFIG_PATH = CONFIG_DIRECTORY + "userSoftKeyConfig.xml";
|
||||
|
||||
|
||||
public const string ALARMS_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "alarmsConfigValidator.xsd";
|
||||
public const string ALARMS_CONFIG_PATH = CONFIG_DIRECTORY + "alarmsConfig.xml";
|
||||
|
||||
public const string HEADS_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "headsConfigValidator.xsd";
|
||||
public const string HEADS_CONFIG_PATH = CONFIG_DIRECTORY + "headsConfig.xml";
|
||||
|
||||
public const string RECIPE_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "recipeConfigValidator.xsd";
|
||||
public const string RECIPE_CONFIG_PATH = CONFIG_DIRECTORY + "recipeConfig.xml";
|
||||
|
||||
public const string NC_SOFTKEYS_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "ncSoftKeyConfigValidator.xsd";
|
||||
public const string NC_SOFTKEYS_CONFIG_PATH = CONFIG_DIRECTORY + "ncSoftKeyConfig.xml";
|
||||
|
||||
public const string TOOL_MANAGER_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "toolManagerConfigValidator.xsd";
|
||||
public const string TOOL_MANAGER_CONFIG_PATH = CONFIG_DIRECTORY + "toolManagerConfig.xml";
|
||||
|
||||
public const string CMS_CONNECT_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "cmsConnectConfigValidator.xsd";
|
||||
public const string CMS_CONNECT_CONFIG_PATH = CONFIG_DIRECTORY + "cmsConnectConfig.xml";
|
||||
|
||||
@@ -241,14 +259,17 @@ namespace Thermo.Active.Model
|
||||
public const string SEND_NC_SOFTKEYS_DATA = "SEND_NC_SOFTKEYS_DATA";
|
||||
public const string SEND_HEADS_DATA = "SEND_HEADS_DATA";
|
||||
public const string SEND_AXIS_NAMES_DATA = "SEND_AXIS_NAMES_DATA";
|
||||
public const string SEND_MAGAZINES_STATUS = "SEND_MAGAZINES_STATUS";
|
||||
public const string SEND_ACTIVE_PROGRAM_DATA = "SEND_ACTIVE_PROGRAM_DATA";
|
||||
public const string UPDATE_TOOLS_DATA = "UPDATE_TOOLS_DATA";
|
||||
public const string NC_MAGAZINE_IS_ACTIVE = "UPDATE_NC_MAGAZINE_STATUS";
|
||||
public const string SEND_QUEUE_DATA = "SEND_QUEUE_DATA";
|
||||
public const string SEND_M155_DATA = "SEND_M155_DATA";
|
||||
public const string SEND_SCADA_DATA = "SEND_SCADA_DATA";
|
||||
public const string ASSISTED_TOOLING_DATA = "ASSISTED_TOOLING_DATA";
|
||||
|
||||
// MVVM Messages for Thermo active specs
|
||||
public const string SEND_THERMO_RECIPE_FULL = "SEND_THERMO_RECIPE_FULL";
|
||||
public const string SEND_THERMO_RECIPE_OVERWIEW = "SEND_THERMO_RECIPE_OVERWIEW";
|
||||
public const string SEND_THERMO_MODULE_DATA = "SEND_THERMO_MODULE_DATA";
|
||||
public const string SEND_THERMO_WARMERS_DATA = "SEND_THERMO_WARMERS_DATA";
|
||||
public const string SEND_THERMO_GAUGE_DATA = "SEND_THERMO_GAUGE_DATA";
|
||||
|
||||
public const string BROADCAST_DATA = "BROADCAST_DATA";
|
||||
|
||||
@@ -271,38 +292,36 @@ namespace Thermo.Active.Model
|
||||
public const string NC_SOFTKEY = "ncSoftkeys";
|
||||
public const string USER_SOFTKEY = "userSoftkeys";
|
||||
public const string HEADS_CMD = "headsCmd";
|
||||
public const string TOOL_MANAGER = "toolManager";
|
||||
public const string MAINTENANCE = "maintenance";
|
||||
public const string AXES_SELECTION = "axesSoftkeys";
|
||||
public const string THERMO_MANAGER = "thermoManager";
|
||||
public const string RISC_MANAGER = "riscManager";
|
||||
}
|
||||
|
||||
public static class API_ERROR_KEYS
|
||||
{
|
||||
public const string INCORRECT_PARAMETERS = "error_incorrect_parameters";
|
||||
public const string MAGAZINE_POSITION_OCCUPIED = "error_magazine_position_occupied";
|
||||
public const string TOOL_IS_MOUNTED = "error_tool_mounted";
|
||||
public const string OPTION_NOT_ACTIVE = "error_option_not_active";
|
||||
public const string MAG_POS_DISABLED = "error_mag_pos_disabled";
|
||||
public const string ID_ALREADY_EXIST = "error_id_already_exist";
|
||||
public const string PASSWORD_IS_INVALID = "error_password_is_invalid";
|
||||
public const string IMPORT_FILE_NOT_VALID = "error_import_file_not_valid";
|
||||
public const string DUPLICATED_USERNAME = "error_duplicated_username";
|
||||
public const string CUSTOMER_FILE_INVALID = "contactinfo_error_customer_configfile";
|
||||
public const string CUSTOMER_FILE_INVALID = "contactinfo_error_customer_configfile";
|
||||
}
|
||||
|
||||
// File paths
|
||||
public const string CLIENT_EXE_NAME = @"Active_Client.exe";
|
||||
public const string CLIENT_EXE_NAME_NOEXT = @"Active_Client";
|
||||
public const string CLIENT_EXE_NAME_NOEXT = @"Active_Client";
|
||||
public const string MAINTENANCE_ATTACHMENT_PATH = @"C:\CMS\Active\attachment\maintenance\";
|
||||
public const string CMS_FOLDER_PATH = @"C:\CMS\";
|
||||
|
||||
public const string ALARM_ATTACHMENT_PATH = @"C:\CMS\Active\attachment\alarm\";
|
||||
public const string TEMP_FOLDER = @"C:\CMS\Active\TMP\";
|
||||
public const string TEMP_PP_FOLDER = TEMP_FOLDER + @"pp\";
|
||||
public const string JOB_TMP_DIRECTORY = TEMP_PP_FOLDER + @"job\";
|
||||
public const string JOB_TMP_DIRECTORY = TEMP_PP_FOLDER + @"job\";
|
||||
public const string QUEUE_TMP_FOLDER = TEMP_PP_FOLDER + @"queue\";
|
||||
public const string PART_PRG_IMAGES = TEMP_FOLDER + @"pp_img\";
|
||||
|
||||
public const string PART_PRG_IMAGES = TEMP_FOLDER + @"pp_img\";
|
||||
|
||||
public const string SCADA_DIRECTORY = @"C:\CMS\Active\scada\";
|
||||
|
||||
public static readonly string[] VALID_FILE_EXTENSIONS = { "", ".txt", ".cnc", ".ini", ".mpf", ".spf" };
|
||||
@@ -330,7 +349,7 @@ namespace Thermo.Active.Model
|
||||
"dd/MM/yyyy",
|
||||
"MM/dd/yyyy",
|
||||
"dd.MM.yyyy",
|
||||
"MM.dd.yyyy"
|
||||
"MM.dd.yyyy"
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using CMS_CORE_Library.Models;
|
||||
using System.Linq;
|
||||
using static CMS_CORE_Library.Models.DataStructures;
|
||||
using static CMS_CORE_Library.Models.ThermoModels;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels
|
||||
{
|
||||
public class DTOGaugeDataModel : GaugeModel
|
||||
{
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (!(obj is DTOGaugeDataModel item))
|
||||
return false;
|
||||
|
||||
if (TimeAdv != item.TimeAdv)
|
||||
return false;
|
||||
if (Power != item.Power)
|
||||
return false;
|
||||
if (Vacuum != item.Vacuum)
|
||||
return false;
|
||||
if (Air != item.Air)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -57,67 +57,13 @@ namespace Thermo.Active.Model.DTOModels
|
||||
}
|
||||
}
|
||||
|
||||
public class DTOToolInSpindleModel
|
||||
{
|
||||
// Siemens data
|
||||
public string ToolName;
|
||||
public int ChildId;
|
||||
// Fanuc-Osai
|
||||
public int FamilyId;
|
||||
public int ShankId;
|
||||
|
||||
public bool Disabled { get; set; }
|
||||
public bool Broken { get; set; }
|
||||
public bool Measured { get; set; }
|
||||
public int ResidualLife { get; set; }
|
||||
|
||||
public int MaxSpeed { get; set; }
|
||||
public byte MaxLoad { get; set; }
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
// Object is not a DTOSpindleModel
|
||||
if (!(obj is DTOToolInSpindleModel item))
|
||||
return false;
|
||||
|
||||
// Compare the fields
|
||||
if (ToolName != item.ToolName)
|
||||
return false;
|
||||
|
||||
if (ChildId != item.ChildId)
|
||||
return false;
|
||||
|
||||
if (Disabled != item.Disabled)
|
||||
return false;
|
||||
|
||||
if (Broken != item.Broken)
|
||||
return false;
|
||||
|
||||
if (Measured != item.Measured)
|
||||
return false;
|
||||
|
||||
if (ResidualLife != item.ResidualLife)
|
||||
return false;
|
||||
|
||||
if (MaxSpeed != item.MaxSpeed)
|
||||
return false;
|
||||
|
||||
if (MaxLoad != item.MaxLoad)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public class DTOSpindleModel : DTOHeadModel
|
||||
{
|
||||
public int ActualSpeed;
|
||||
public short Load;
|
||||
public ushort MountedTool;
|
||||
public bool Configured;
|
||||
public ROTATION Rotation;
|
||||
public bool FixedHead;
|
||||
public DTOToolInSpindleModel ToolData;
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
@@ -132,18 +78,12 @@ namespace Thermo.Active.Model.DTOModels
|
||||
if (Load != item.Load)
|
||||
return false;
|
||||
|
||||
if (MountedTool != item.MountedTool)
|
||||
return false;
|
||||
|
||||
if (Configured != item.Configured)
|
||||
return false;
|
||||
|
||||
if (Rotation != item.Rotation)
|
||||
return false;
|
||||
|
||||
if (ToolData != null && !ToolData.Equals(item.ToolData))
|
||||
return false;
|
||||
|
||||
// Call Parent equals
|
||||
return base.Equals(item);
|
||||
}
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
declare module server {
|
||||
interface dTOProcessDataModel {
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,6 @@ namespace Thermo.Active.Model.DTOModels
|
||||
public class DTOStartupConfigurationModel
|
||||
{
|
||||
public AreasConfigModel ProductionConfig;
|
||||
public AreasConfigModel ToolingConfig;
|
||||
public AreasConfigModel ReportConfig;
|
||||
public AreasConfigModel AlarmsConfig;
|
||||
public AreasConfigModel MaintenanceConfig;
|
||||
|
||||
@@ -7,12 +7,10 @@ namespace Thermo.Active.Model.DTOModels.JobModels
|
||||
{
|
||||
public string Description;
|
||||
public TimeSpan ExecutionTime;
|
||||
public List<int> Tools;
|
||||
public List<DTOJobCustomParamModel> Customs;
|
||||
|
||||
public DTOMetadataFieldsModel()
|
||||
{
|
||||
Tools = new List<int>();
|
||||
Customs = new List<DTOJobCustomParamModel>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,13 +5,11 @@ namespace Thermo.Active.Model.DTOModels.JobModels
|
||||
public class DTOMetadataModel
|
||||
{
|
||||
public DTOGenericParamModel Generics;
|
||||
public List<int> Tools;
|
||||
public List<DTOJobCustomParamModel> Customs;
|
||||
|
||||
public DTOMetadataModel()
|
||||
{
|
||||
Generics = new DTOGenericParamModel();
|
||||
Tools = new List<int>();
|
||||
Customs = new List<DTOJobCustomParamModel>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
using System.Collections.Generic;
|
||||
using Thermo.Active.Model.ConfigModels;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.Recipe
|
||||
{
|
||||
public class DTORecipeConfigModel
|
||||
{
|
||||
public int Id;
|
||||
public string Category;
|
||||
public string SubCategory_1;
|
||||
public string SubCategory_2;
|
||||
public string Name;
|
||||
public string Description;
|
||||
public string Format;
|
||||
public string Label;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.Recipe
|
||||
{
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum RecipeCatStatus
|
||||
{
|
||||
Unchanged = 0,
|
||||
ChangedOk,
|
||||
HasError
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.Recipe
|
||||
{
|
||||
public class DTORecipeParam
|
||||
{
|
||||
public int Id { get; set; } = 0;
|
||||
public RPRange Range { get; set; }
|
||||
public RPStatus Status { get; set; }
|
||||
public string UnitMeasure { get; set; }
|
||||
public double ValueAct { get; set; }
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (!(obj is DTORecipeParam item))
|
||||
return false;
|
||||
|
||||
if (Id!= item.Id)
|
||||
return false;
|
||||
if (!Range.Equals(item.Range))
|
||||
return false;
|
||||
if (!Status.Equals(item.Status))
|
||||
return false;
|
||||
if (UnitMeasure != item.UnitMeasure)
|
||||
return false;
|
||||
if (ValueAct != item.ValueAct)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
||||
public struct RPRange
|
||||
{
|
||||
public double Min { get; set; }
|
||||
public double Max { get; set; }
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (!(obj is RPRange item))
|
||||
return false;
|
||||
|
||||
if (Min != item.Min)
|
||||
return false;
|
||||
if (Max != item.Max)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
public struct RPStatus
|
||||
{
|
||||
public bool Visible { get; set; }
|
||||
public bool Enabled { get; set; }
|
||||
public bool HasError { get; set; }
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (!(obj is RPStatus item))
|
||||
return false;
|
||||
|
||||
if (Visible != item.Visible)
|
||||
return false;
|
||||
if (Enabled != item.Enabled)
|
||||
return false;
|
||||
if (HasError != item.HasError)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.Recipe
|
||||
{
|
||||
/// <summary>
|
||||
/// Struttura parametri "lenti" (lettura NON frequente)
|
||||
/// </summary>
|
||||
public class RecipeParam
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public double SetpointHMI { get; set; }
|
||||
public double SetpointPLC { get; set; }
|
||||
public double ValueMax { get; set; }
|
||||
public double ValueMin { get; set; }
|
||||
public string UnitMeasure { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.Recipe
|
||||
{
|
||||
/// <summary>
|
||||
/// Struttura parametri "veloci" (RT=RealTime, lettura frequente)
|
||||
/// </summary>
|
||||
public class RecipeParamRT
|
||||
{
|
||||
public short Id { get; set; }
|
||||
public short StatusBit { get; set; }
|
||||
public double ValueAct { get; set; }
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum StatusVal
|
||||
{
|
||||
None = 0x0,
|
||||
Visible = 0x1,
|
||||
Enabled = 0x2,
|
||||
HasError = 0x4
|
||||
}
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
using static CMS_CORE_Library.Models.DataStructures;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ToolModels
|
||||
{
|
||||
public class DTOAssistedToolingModel
|
||||
{
|
||||
public ushort ToolId { get; set; }
|
||||
public ushort MagazineId { get; set; }
|
||||
public ushort PositionId { get; set; }
|
||||
public ASSISTED_TOOLING_ACTION Action { get; set; }
|
||||
}
|
||||
|
||||
public class DTOAssistedToolingEndValueModel : AssistedToolingModel
|
||||
{
|
||||
public DTOAssistedToolingEndValueModel()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public DTOAssistedToolingEndValueModel(AssistedToolingModel data)
|
||||
{
|
||||
Action = data.Action;
|
||||
IsActive = data.IsActive;
|
||||
MagazineId = data.MagazineId;
|
||||
PositionId = data.PositionId;
|
||||
ToolId = data.ToolId;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
|
||||
if (!(obj is DTOAssistedToolingEndValueModel item))
|
||||
return false;
|
||||
|
||||
if (IsActive != item.IsActive)
|
||||
return false;
|
||||
|
||||
if (ToolId != item.ToolId)
|
||||
return false;
|
||||
|
||||
if (MagazineId != item.MagazineId)
|
||||
return false;
|
||||
|
||||
if (PositionId != item.PositionId)
|
||||
return false;
|
||||
|
||||
if (Action != item.Action)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
using CMS_CORE_Library.Models;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ToolModels
|
||||
{
|
||||
public class DTOEdgeModel
|
||||
{
|
||||
public double ResidualLife { get; set; }
|
||||
|
||||
public double NominalLife { get; set; }
|
||||
|
||||
public double PreAlmLife { get; set; }
|
||||
|
||||
[Required]
|
||||
public Dictionary<string, double> EdgeAdditionalParams { get; set; }
|
||||
|
||||
public static explicit operator EdgeModel(DTOEdgeModel obj)
|
||||
{
|
||||
return new EdgeModel()
|
||||
{
|
||||
Id = 0,
|
||||
NominalLife = obj.NominalLife,
|
||||
ResidualLife = obj.ResidualLife,
|
||||
PreAlmLife = obj.PreAlmLife,
|
||||
EdgeAdditionalParams = obj.EdgeAdditionalParams
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
using Thermo.Active.Model.DatabaseModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ToolModels
|
||||
{
|
||||
public class DTOExportToolTableModel
|
||||
{
|
||||
public List<DbNcToolModel> Tools { get; set; }
|
||||
public List<DbNcFamilyModel> Families { get; set; }
|
||||
public List<DbNcShankModel> Shanks { get; set; }
|
||||
}
|
||||
|
||||
public class DTOImportStatusModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Status { get; set; }
|
||||
|
||||
public string Type { get; set; }
|
||||
}
|
||||
|
||||
public enum IMPORT_STATUS
|
||||
{
|
||||
OK = 0,
|
||||
EXIST = 1
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
using CMS_CORE_Library.Models;
|
||||
using static CMS_CORE_Library.Models.DataStructures;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ToolModels
|
||||
{
|
||||
public class DTOMagazineActionModel
|
||||
{
|
||||
public MAGAZINE_ACTIONS action;
|
||||
public int OriginMagazine;
|
||||
public int OriginPosition;
|
||||
public int DestinationMagazine;
|
||||
public int DestinationPosition;
|
||||
public MagazineActionToolModel Tool;
|
||||
|
||||
public static explicit operator DTOMagazineActionModel(MagazineActionModel magazineStatus)
|
||||
{
|
||||
return new DTOMagazineActionModel()
|
||||
{
|
||||
action = magazineStatus.Action,
|
||||
OriginMagazine = magazineStatus.OriginMagazine,
|
||||
OriginPosition = magazineStatus.OriginPosition,
|
||||
DestinationMagazine = magazineStatus.DestinationMagazine,
|
||||
DestinationPosition = magazineStatus.DestinationPosition,
|
||||
Tool = magazineStatus.Tool
|
||||
};
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
|
||||
// Object is not a DTOMagazineStatusModel instance
|
||||
if (!(obj is DTOMagazineActionModel item))
|
||||
return false;
|
||||
|
||||
if (item.action != action)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,242 +0,0 @@
|
||||
using Thermo.Active.Model.DatabaseModels;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ToolModels
|
||||
{
|
||||
public class DTONewNcFamilyModel
|
||||
{
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte ToolType { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte RightSize { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte LeftSize { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte TcpTable { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte Gamma { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte RotationType { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool Cooling { get; set; }
|
||||
[Required]
|
||||
public bool Cooling1 { get; set; }
|
||||
[Required]
|
||||
public bool Cooling2 { get; set; }
|
||||
[Required]
|
||||
public bool Cooling3 { get; set; }
|
||||
[Required]
|
||||
public bool Cooling4 { get; set; }
|
||||
[Required]
|
||||
public bool Cooling5 { get; set; }
|
||||
[Required]
|
||||
public bool Cooling6 { get; set; }
|
||||
[Required]
|
||||
public bool Cooling7 { get; set; }
|
||||
|
||||
[Required]
|
||||
public int MaxSpeed { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte MaxLoad { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte MinLoadPctAutoload { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte MaxLoadPctAutoload { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte DynamicCompensation { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte MinLoadDynamicCompensation { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte MaxLoadDynamicCompensation { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte LifeType { get; set; }
|
||||
|
||||
[Required]
|
||||
public int NominalLife { get; set; }
|
||||
|
||||
[Required]
|
||||
public int ReviveDelta { get; set; }
|
||||
|
||||
public static explicit operator DTONewNcFamilyModel(DbNcFamilyModel obj)
|
||||
{
|
||||
// Get bit values
|
||||
BitArray coolingByte = new BitArray(new byte[] { obj.CoolingByte });
|
||||
bool[] bits = new bool[8];
|
||||
coolingByte.CopyTo(bits, 0);
|
||||
|
||||
return new DTONcFamilyModel()
|
||||
{
|
||||
Id = obj.FamilyId,
|
||||
Name = obj.Name,
|
||||
ToolType = obj.ToolType,
|
||||
RightSize = obj.RightSize,
|
||||
LeftSize = obj.LeftSize,
|
||||
TcpTable = obj.TcpTable,
|
||||
Gamma = obj.Gamma,
|
||||
RotationType = obj.RotationType,
|
||||
Cooling = bits[0],
|
||||
Cooling1 = bits[1],
|
||||
Cooling2 = bits[2],
|
||||
Cooling3 = bits[3],
|
||||
Cooling4 = bits[4],
|
||||
Cooling5 = bits[5],
|
||||
Cooling6 = bits[6],
|
||||
Cooling7 = bits[7],
|
||||
MaxSpeed = obj.MaxSpeed,
|
||||
MaxLoad = obj.MaxLoad,
|
||||
MinLoadDynamicCompensation = obj.MinLoadDynamicCompensation,
|
||||
MaxLoadDynamicCompensation = obj.MaxLoadDynamicCompensation,
|
||||
MaxLoadPctAutoload = obj.MaxLoadPctAutoload,
|
||||
MinLoadPctAutoload = obj.MinLoadPctAutoload,
|
||||
DynamicCompensation = obj.DynamicCompensation,
|
||||
LifeType = obj.LifeType,
|
||||
NominalLife = obj.NominalLife,
|
||||
ReviveDelta = obj.ReviveDelta
|
||||
};
|
||||
}
|
||||
|
||||
public static explicit operator DbNcFamilyModel(DTONewNcFamilyModel obj)
|
||||
{
|
||||
// Prepare status byte
|
||||
bool[] result = new bool[8] { obj.Cooling, obj.Cooling1, obj.Cooling2, obj.Cooling3, obj.Cooling4, obj.Cooling5, obj.Cooling6, obj.Cooling7 };
|
||||
byte coolingByte = ConvertArrayToByte(result);
|
||||
|
||||
return new DbNcFamilyModel()
|
||||
{
|
||||
Name = obj.Name,
|
||||
ToolType = obj.ToolType,
|
||||
RightSize = obj.RightSize,
|
||||
LeftSize = obj.LeftSize,
|
||||
TcpTable = obj.TcpTable,
|
||||
Gamma = obj.Gamma,
|
||||
RotationType = obj.RotationType,
|
||||
CoolingByte = coolingByte,
|
||||
MaxSpeed = obj.MaxSpeed,
|
||||
MaxLoad = obj.MaxLoad,
|
||||
MinLoadDynamicCompensation = obj.MinLoadDynamicCompensation,
|
||||
MaxLoadDynamicCompensation = obj.MaxLoadDynamicCompensation,
|
||||
MaxLoadPctAutoload = obj.MaxLoadPctAutoload,
|
||||
MinLoadPctAutoload = obj.MinLoadPctAutoload,
|
||||
DynamicCompensation = obj.DynamicCompensation,
|
||||
LifeType = obj.LifeType,
|
||||
NominalLife = obj.NominalLife,
|
||||
ReviveDelta = obj.ReviveDelta,
|
||||
};
|
||||
}
|
||||
|
||||
protected static byte ConvertArrayToByte(bool[] bits)
|
||||
{
|
||||
BitArray bitField = new BitArray(bits); //BitArray takes a bool[]
|
||||
byte[] bytes = new byte[1];
|
||||
bitField.CopyTo(bytes, 0);
|
||||
|
||||
return bytes[0];
|
||||
}
|
||||
}
|
||||
|
||||
public class DTONcFamilyModel : DTONewNcFamilyModel
|
||||
{
|
||||
public short Id { get; set; }
|
||||
|
||||
public List<DTONcToolModel> ChildTools { get; set; }
|
||||
|
||||
public static explicit operator DTONcFamilyModel(DbNcFamilyModel obj)
|
||||
{
|
||||
List<DTONcToolModel> tools = new List<DTONcToolModel>();
|
||||
|
||||
if (obj.Tools != null)
|
||||
foreach (DbNcToolModel tool in obj.Tools)
|
||||
{
|
||||
tools.Add((DTONcToolModel)tool);
|
||||
}
|
||||
|
||||
// Get bit values
|
||||
BitArray coolingByte = new BitArray(new byte[] { obj.CoolingByte });
|
||||
bool[] bits = new bool[8];
|
||||
coolingByte.CopyTo(bits, 0);
|
||||
|
||||
return new DTONcFamilyModel()
|
||||
{
|
||||
Id = obj.FamilyId,
|
||||
Name = obj.Name,
|
||||
ToolType = obj.ToolType,
|
||||
RightSize = obj.RightSize,
|
||||
LeftSize = obj.LeftSize,
|
||||
TcpTable = obj.TcpTable,
|
||||
Gamma = obj.Gamma,
|
||||
RotationType = obj.RotationType,
|
||||
Cooling = bits[0],
|
||||
Cooling1 = bits[1],
|
||||
Cooling2 = bits[2],
|
||||
Cooling3 = bits[3],
|
||||
Cooling4 = bits[4],
|
||||
Cooling5 = bits[5],
|
||||
Cooling6 = bits[6],
|
||||
Cooling7 = bits[7],
|
||||
MaxSpeed = obj.MaxSpeed,
|
||||
MaxLoad = obj.MaxLoad,
|
||||
MinLoadDynamicCompensation = obj.MinLoadDynamicCompensation,
|
||||
MaxLoadDynamicCompensation = obj.MaxLoadDynamicCompensation,
|
||||
MaxLoadPctAutoload = obj.MaxLoadPctAutoload,
|
||||
MinLoadPctAutoload = obj.MinLoadPctAutoload,
|
||||
DynamicCompensation = obj.DynamicCompensation,
|
||||
LifeType = obj.LifeType,
|
||||
NominalLife = obj.NominalLife,
|
||||
ReviveDelta = obj.ReviveDelta,
|
||||
ChildTools = tools
|
||||
};
|
||||
}
|
||||
|
||||
public static explicit operator DbNcFamilyModel(DTONcFamilyModel obj)
|
||||
{
|
||||
// Prepare status byte
|
||||
bool[] result = new bool[8] { obj.Cooling, obj.Cooling1, obj.Cooling2, obj.Cooling3, obj.Cooling4, obj.Cooling5, obj.Cooling6, obj.Cooling7 };
|
||||
byte coolingByte = ConvertArrayToByte(result);
|
||||
|
||||
return new DbNcFamilyModel()
|
||||
{
|
||||
FamilyId = obj.Id,
|
||||
Name = obj.Name,
|
||||
ToolType = obj.ToolType,
|
||||
RightSize = obj.RightSize,
|
||||
LeftSize = obj.LeftSize,
|
||||
TcpTable = obj.TcpTable,
|
||||
Gamma = obj.Gamma,
|
||||
RotationType = obj.RotationType,
|
||||
CoolingByte = coolingByte,
|
||||
MaxSpeed = obj.MaxSpeed,
|
||||
MaxLoad = obj.MaxLoad,
|
||||
MinLoadDynamicCompensation = obj.MinLoadDynamicCompensation,
|
||||
MaxLoadDynamicCompensation = obj.MaxLoadDynamicCompensation,
|
||||
MaxLoadPctAutoload = obj.MaxLoadPctAutoload,
|
||||
MinLoadPctAutoload = obj.MinLoadPctAutoload,
|
||||
DynamicCompensation = obj.DynamicCompensation,
|
||||
LifeType = obj.LifeType,
|
||||
NominalLife = obj.NominalLife,
|
||||
ReviveDelta = obj.ReviveDelta,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
using Thermo.Active.Model.DatabaseModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ToolModels
|
||||
{
|
||||
public class DTONcMagazinePositionModel
|
||||
{
|
||||
public byte MagazineId { get; set; }
|
||||
|
||||
public int PositionId { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool Disabled { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte Type { get; set; }
|
||||
|
||||
public int? ShankId { get; set; }
|
||||
|
||||
public static explicit operator DTONcMagazinePositionModel(DbNcMagazinePositionModel obj)
|
||||
{
|
||||
return new DTONcMagazinePositionModel()
|
||||
{
|
||||
MagazineId = obj.MagazineId,
|
||||
PositionId = obj.PositionId,
|
||||
Disabled = obj.Disabled,
|
||||
Type = obj.Type
|
||||
};
|
||||
}
|
||||
|
||||
public static explicit operator DbNcMagazinePositionModel(DTONcMagazinePositionModel obj)
|
||||
{
|
||||
return new DbNcMagazinePositionModel()
|
||||
{
|
||||
MagazineId = obj.MagazineId,
|
||||
PositionId = obj.PositionId,
|
||||
Disabled = obj.Disabled,
|
||||
Type = obj.Type
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ToolModels
|
||||
{
|
||||
public class DTONcMountedShankModel
|
||||
{
|
||||
public byte PositionId;
|
||||
public byte MagazineId;
|
||||
public int ShankId;
|
||||
}
|
||||
}
|
||||
@@ -1,93 +0,0 @@
|
||||
using Thermo.Active.Model.DatabaseModels;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ToolModels
|
||||
{
|
||||
public class DTONewNcShankModel
|
||||
{
|
||||
[Required]
|
||||
public ushort? Balluf { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte MagazinePositionType { get; set; }
|
||||
|
||||
public static explicit operator DTONewNcShankModel(DbNcShankModel obj)
|
||||
{
|
||||
return new DTONewNcShankModel()
|
||||
{
|
||||
Balluf = (ushort)obj.Balluf,
|
||||
MagazinePositionType = obj.MagazinePositionType
|
||||
};
|
||||
}
|
||||
|
||||
public static explicit operator DbNcShankModel(DTONewNcShankModel obj)
|
||||
{
|
||||
return new DbNcShankModel()
|
||||
{
|
||||
Balluf = obj.Balluf,
|
||||
MagazinePositionType = obj.MagazinePositionType
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public class DTONcShankModel : DTONewNcShankModel
|
||||
{
|
||||
public short Id { get; set; }
|
||||
|
||||
[Range(1, byte.MaxValue)]
|
||||
public byte? MagazineId { get; set; }
|
||||
|
||||
[Range(1, ushort.MaxValue)]
|
||||
public int? PositionId { get; set; }
|
||||
|
||||
[Range(1, byte.MaxValue)]
|
||||
public byte? OriginMagazineId { get; set; }
|
||||
|
||||
[Range(1, ushort.MaxValue)]
|
||||
public int? OriginPositionId { get; set; }
|
||||
|
||||
public int MaxLeft { get; set; }
|
||||
|
||||
public int MaxRight { get; set; }
|
||||
|
||||
public List<DTONcToolModel> ChildsTools { get; set; }
|
||||
|
||||
public static explicit operator DTONcShankModel(DbNcShankModel obj)
|
||||
{
|
||||
List<DTONcToolModel> tools = new List<DTONcToolModel>();
|
||||
|
||||
if (obj.Tools != null)
|
||||
foreach (DbNcToolModel tool in obj.Tools)
|
||||
{
|
||||
tools.Add((DTONcToolModel)tool);
|
||||
}
|
||||
|
||||
return new DTONcShankModel()
|
||||
{
|
||||
Id = obj.ShankId,
|
||||
Balluf = (ushort?)obj.Balluf,
|
||||
MagazinePositionType = obj.MagazinePositionType,
|
||||
MagazineId = obj.MagazineId,
|
||||
PositionId = obj.PositionId,
|
||||
OriginMagazineId = obj.OriginMagazineId,
|
||||
OriginPositionId = obj.OriginPositionId,
|
||||
ChildsTools = tools
|
||||
};
|
||||
}
|
||||
|
||||
public static explicit operator DbNcShankModel(DTONcShankModel obj)
|
||||
{
|
||||
return new DbNcShankModel()
|
||||
{
|
||||
ShankId = obj.Id,
|
||||
Balluf = obj.Balluf,
|
||||
MagazinePositionType = obj.MagazinePositionType,
|
||||
MagazineId = obj.MagazineId,
|
||||
PositionId = obj.PositionId,
|
||||
OriginMagazineId = obj.OriginMagazineId,
|
||||
OriginPositionId = obj.OriginPositionId,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,209 +0,0 @@
|
||||
using CMS_CORE_Library.Models;
|
||||
using Thermo.Active.Model.DatabaseModels;
|
||||
using System.Collections;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ToolModels
|
||||
{
|
||||
|
||||
public class DTONcTool
|
||||
{
|
||||
[Required]
|
||||
public short OffsetLength { get; set; }
|
||||
|
||||
[Required]
|
||||
public int ResidualLife { get; set; }
|
||||
|
||||
[Required]
|
||||
public int ResidualRevive { get; set; }
|
||||
|
||||
[Required]
|
||||
// Foreign keys
|
||||
public short FamilyId { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool Disabled { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool Broken { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool Measured { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool IntegrityCheck { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool ClockwiseRotation { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool CounterClockwiseRotation { get; set; }
|
||||
|
||||
public short? ShankId { get; set; } = null;
|
||||
|
||||
public static explicit operator DTONcTool(DbNcToolModel obj)
|
||||
{
|
||||
// Get bit values
|
||||
BitArray statusBits = new BitArray(obj.Status);
|
||||
bool[] bits = new bool[8];
|
||||
statusBits.CopyTo(bits, 0);
|
||||
|
||||
return new DTONcTool()
|
||||
{
|
||||
FamilyId = obj.FamilyId,
|
||||
ShankId = (short)(obj.ShankId == null ? 0 : obj.ShankId.Value),
|
||||
OffsetLength = obj.OffsetLength,
|
||||
ResidualLife = obj.ResidualLife,
|
||||
ResidualRevive = obj.ResidualRevive,
|
||||
Disabled = bits[0],
|
||||
Broken = bits[1],
|
||||
Measured = bits[2],
|
||||
IntegrityCheck = bits[3],
|
||||
ClockwiseRotation = bits[4],
|
||||
CounterClockwiseRotation = bits[5],
|
||||
};
|
||||
}
|
||||
|
||||
public static explicit operator DbNcToolModel(DTONcTool obj)
|
||||
{
|
||||
// Prepare status byte
|
||||
bool[] result = new bool[8] { obj.Disabled, obj.Broken, obj.Measured, obj.IntegrityCheck, obj.ClockwiseRotation, obj.CounterClockwiseRotation, false, false };
|
||||
byte status = ConvertArrayToByte(result);
|
||||
|
||||
return new DbNcToolModel()
|
||||
{
|
||||
FamilyId = obj.FamilyId,
|
||||
ShankId = obj.ShankId,
|
||||
OffsetLength = obj.OffsetLength,
|
||||
ResidualLife = obj.ResidualLife,
|
||||
ResidualRevive = obj.ResidualRevive,
|
||||
Status = status
|
||||
};
|
||||
}
|
||||
|
||||
protected static byte ConvertArrayToByte(bool[] bits)
|
||||
{
|
||||
BitArray bitField = new BitArray(bits); //BitArray takes a bool[]
|
||||
byte[] bytes = new byte[1];
|
||||
bitField.CopyTo(bytes, 0);
|
||||
|
||||
return bytes[0];
|
||||
}
|
||||
}
|
||||
|
||||
public class DTONcToolModel : DTONewNcToolModel
|
||||
{
|
||||
public short Id { get; set; }
|
||||
|
||||
public OffsetModel Offset1 { get; set; }
|
||||
|
||||
public OffsetModel Offset2 { get; set; }
|
||||
|
||||
public OffsetModel Offset3 { get; set; }
|
||||
|
||||
|
||||
public static explicit operator DTONcToolModel(DbNcToolModel obj)
|
||||
{
|
||||
// Get bit values
|
||||
BitArray statusBits = new BitArray(new byte[] { obj.Status });
|
||||
bool[] bits = new bool[8];
|
||||
statusBits.CopyTo(bits, 0);
|
||||
|
||||
return new DTONcToolModel()
|
||||
{
|
||||
Id = obj.ToolId,
|
||||
FamilyId = obj.FamilyId,
|
||||
ShankId = obj.ShankId,
|
||||
OffsetLength = obj.OffsetLength,
|
||||
ResidualLife = obj.ResidualLife,
|
||||
ResidualRevive = obj.ResidualRevive,
|
||||
Disabled = bits[0],
|
||||
Broken = bits[1],
|
||||
Measured = bits[2],
|
||||
IntegrityCheck = bits[3],
|
||||
ClockwiseRotation = bits[4],
|
||||
CounterClockwiseRotation = bits[5],
|
||||
OffsetId1 = obj.OffsetId1,
|
||||
OffsetId2 = obj.OffsetId2,
|
||||
OffsetId3 = obj.OffsetId3
|
||||
};
|
||||
}
|
||||
|
||||
public static explicit operator DbNcToolModel(DTONcToolModel obj)
|
||||
{
|
||||
// Prepare status byte
|
||||
bool[] result = new bool[8] { obj.Disabled, obj.Broken, obj.Measured, obj.IntegrityCheck, obj.ClockwiseRotation, obj.CounterClockwiseRotation, false, false };
|
||||
byte status = ConvertArrayToByte(result);
|
||||
|
||||
return new DbNcToolModel()
|
||||
{
|
||||
ToolId = obj.Id,
|
||||
FamilyId = obj.FamilyId,
|
||||
ShankId = obj.ShankId,
|
||||
OffsetLength = obj.OffsetLength,
|
||||
ResidualLife = obj.ResidualLife,
|
||||
ResidualRevive = obj.ResidualRevive,
|
||||
Status = status,
|
||||
OffsetId1 = obj.OffsetId1,
|
||||
OffsetId2 = obj.OffsetId2,
|
||||
OffsetId3 = obj.OffsetId3
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public class DTONewNcToolModel : DTONcTool
|
||||
{
|
||||
public short? OffsetId1 { get; set; }
|
||||
|
||||
public short? OffsetId2 { get; set; }
|
||||
|
||||
public short? OffsetId3 { get; set; }
|
||||
|
||||
|
||||
public static explicit operator DTONewNcToolModel(DbNcToolModel obj)
|
||||
{
|
||||
// Get bit values
|
||||
BitArray statusBits = new BitArray(obj.Status);
|
||||
bool[] bits = new bool[8];
|
||||
statusBits.CopyTo(bits, 0);
|
||||
|
||||
return new DTONewNcToolModel()
|
||||
{
|
||||
FamilyId = obj.FamilyId,
|
||||
ShankId = (short)(obj.ShankId == null ? 0 : obj.ShankId.Value),
|
||||
OffsetLength = obj.OffsetLength,
|
||||
ResidualLife = obj.ResidualLife,
|
||||
ResidualRevive = obj.ResidualRevive,
|
||||
Disabled = bits[0],
|
||||
Broken = bits[1],
|
||||
Measured = bits[2],
|
||||
IntegrityCheck = bits[3],
|
||||
ClockwiseRotation = bits[4],
|
||||
CounterClockwiseRotation = bits[5],
|
||||
OffsetId1 = obj.OffsetId1,
|
||||
OffsetId2 = obj.OffsetId2,
|
||||
OffsetId3 = obj.OffsetId3
|
||||
};
|
||||
}
|
||||
|
||||
public static explicit operator DbNcToolModel(DTONewNcToolModel obj)
|
||||
{
|
||||
// Prepare status byte
|
||||
bool[] result = new bool[8] { obj.Disabled, obj.Broken, obj.Measured, obj.IntegrityCheck, obj.ClockwiseRotation, obj.CounterClockwiseRotation, false, false};
|
||||
byte status = ConvertArrayToByte(result);
|
||||
|
||||
return new DbNcToolModel()
|
||||
{
|
||||
FamilyId = obj.FamilyId,
|
||||
ShankId = obj.ShankId,
|
||||
OffsetLength = obj.OffsetLength,
|
||||
ResidualLife = obj.ResidualLife,
|
||||
ResidualRevive = obj.ResidualRevive,
|
||||
Status = status,
|
||||
OffsetId1 = obj.OffsetId1,
|
||||
OffsetId2 = obj.OffsetId2,
|
||||
OffsetId3 = obj.OffsetId3
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ToolModels
|
||||
{
|
||||
public class DTONewToolDataModel
|
||||
{
|
||||
public Dictionary<int, byte> UpdatedStatus;
|
||||
public Dictionary<int, uint> UpdatedLives;
|
||||
}
|
||||
}
|
||||
@@ -1,138 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ToolModels
|
||||
{
|
||||
// Tool with family data
|
||||
|
||||
public class DTONewNcToolWithFamilyModel : DTONewNcToolModel
|
||||
{
|
||||
// Family fields
|
||||
public string Name { get; set; }
|
||||
|
||||
public byte ToolType { get; set; }
|
||||
|
||||
public byte RightSize { get; set; }
|
||||
|
||||
public byte LeftSize { get; set; }
|
||||
|
||||
public byte TcpTable { get; set; }
|
||||
|
||||
public byte Gamma { get; set; }
|
||||
|
||||
public byte RotationType { get; set; }
|
||||
|
||||
public bool Cooling { get; set; }
|
||||
|
||||
public bool Cooling1 { get; set; }
|
||||
|
||||
public bool Cooling2 { get; set; }
|
||||
|
||||
public bool Cooling3 { get; set; }
|
||||
|
||||
public bool Cooling4 { get; set; }
|
||||
|
||||
public bool Cooling5 { get; set; }
|
||||
|
||||
public bool Cooling6 { get; set; }
|
||||
|
||||
public bool Cooling7 { get; set; }
|
||||
|
||||
public int MaxSpeed { get; set; }
|
||||
|
||||
public byte MaxLoad { get; set; }
|
||||
|
||||
public byte MinLoadPctAutoload { get; set; }
|
||||
|
||||
public byte MaxLoadPctAutoload { get; set; }
|
||||
|
||||
public byte DynamicCompensation { get; set; }
|
||||
|
||||
public byte MinLoadDynamicCompensation { get; set; }
|
||||
|
||||
public byte MaxLoadDynamicCompensation { get; set; }
|
||||
|
||||
public byte LifeType { get; set; }
|
||||
|
||||
public int NominalLife { get; set; }
|
||||
|
||||
public int ReviveDelta { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class DTONcToolWithFamilyModel : DTONcToolModel
|
||||
{
|
||||
// Family fields
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte ToolType { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte RightSize { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte LeftSize { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte TcpTable { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte Gamma { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte RotationType { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool Cooling { get; set; }
|
||||
[Required]
|
||||
public bool Cooling1 { get; set; }
|
||||
[Required]
|
||||
public bool Cooling2 { get; set; }
|
||||
[Required]
|
||||
public bool Cooling3 { get; set; }
|
||||
[Required]
|
||||
public bool Cooling4 { get; set; }
|
||||
[Required]
|
||||
public bool Cooling5 { get; set; }
|
||||
[Required]
|
||||
public bool Cooling6 { get; set; }
|
||||
[Required]
|
||||
public bool Cooling7 { get; set; }
|
||||
|
||||
[Required]
|
||||
public int MaxSpeed { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte MaxLoad { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte MinLoadPctAutoload { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte MaxLoadPctAutoload { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte DynamicCompensation { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte MinLoadDynamicCompensation { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte MaxLoadDynamicCompensation { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte LifeType { get; set; }
|
||||
|
||||
[Required]
|
||||
public int NominalLife { get; set; }
|
||||
|
||||
[Required]
|
||||
public int ReviveDelta { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
using CMS_CORE_Library.Models;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ToolModels
|
||||
{
|
||||
public class DTOSelfAdaptiveModel
|
||||
{
|
||||
public byte Step { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
using CMS_CORE_Library.Models;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ToolModels
|
||||
{
|
||||
public class DTOShankModel
|
||||
{
|
||||
public int Id;
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
[Required]
|
||||
public bool IsEnabled { get; set; }
|
||||
[Required]
|
||||
public bool IsInhibited { get; set; }
|
||||
[Required]
|
||||
public bool InChangeTool { get; set; }
|
||||
[Required]
|
||||
public bool InFixedPlace { get; set; }
|
||||
[Required]
|
||||
public bool InUse { get; set; }
|
||||
[Required]
|
||||
public int LeftSize { get; set; }
|
||||
[Required]
|
||||
public int RightSize { get; set; }
|
||||
[Required]
|
||||
public int MagazinePositionType { get; set; }
|
||||
|
||||
public List<DTOShankChildModel> ChildsTools { get; set; }
|
||||
|
||||
public static explicit operator ShankModel(DTOShankModel obj)
|
||||
{
|
||||
List<ShankChildModel> childs = obj.ChildsTools?.Select(x => new ShankChildModel
|
||||
{
|
||||
Id = x.Id,
|
||||
FamilyName = x.FamilyName,
|
||||
MultitoolId = x.MultitoolId,
|
||||
ToolType = x.ToolType
|
||||
}).ToList();
|
||||
|
||||
|
||||
return new ShankModel()
|
||||
{
|
||||
Id = 0,
|
||||
Name = obj.Name,
|
||||
IsEnabled = obj.IsEnabled,
|
||||
IsInhibited = obj.IsInhibited,
|
||||
InChangeTool = obj.InChangeTool,
|
||||
InFixedPlace = obj.InFixedPlace,
|
||||
InUse = obj.InUse,
|
||||
LeftSize = obj.LeftSize,
|
||||
RightSize = obj.RightSize,
|
||||
MagazinePositionType = obj.MagazinePositionType,
|
||||
ChildsTools = childs
|
||||
};
|
||||
}
|
||||
}
|
||||
public class DTOShankChildModel
|
||||
{
|
||||
public int Id;
|
||||
[Required]
|
||||
public int MultitoolId;
|
||||
[Required]
|
||||
public string FamilyName;
|
||||
[Required]
|
||||
public int ToolType;
|
||||
}
|
||||
}
|
||||
@@ -1,128 +0,0 @@
|
||||
using CMS_CORE_Library.Models;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using static CMS_CORE_Library.Models.DataStructures;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ToolModels
|
||||
{
|
||||
public class DTOSiemensToolModel
|
||||
{
|
||||
[Required]
|
||||
public string FamilyName { get; set; }
|
||||
|
||||
[Required]
|
||||
public int MagazinePositionType { get; set; }
|
||||
|
||||
[Required]
|
||||
public int ToolType { get; set; }
|
||||
|
||||
public SIEMENS_LIFE_TYPE LifeType { get; set; }
|
||||
|
||||
[Required]
|
||||
public int LeftSize { get; set; }
|
||||
|
||||
[Required]
|
||||
public int RightSize { get; set; }
|
||||
|
||||
[Required]
|
||||
public double MaxSpeed { get; set; }
|
||||
|
||||
[Required]
|
||||
public double MaxAcceleration { get; set; }
|
||||
|
||||
[Required]
|
||||
public ROTATION Rotation { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool Cooling1 { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool Cooling2 { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool IsEnabled { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool IsActive { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool InFixedPlace { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool IsInhibited { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool IsMeasured { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool InChangeTool { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool IsInUse { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool PreAlarm { get; set; }
|
||||
// Custom fields
|
||||
[Required]
|
||||
public int Load { get; set; }
|
||||
|
||||
[Required]
|
||||
public int Gamma { get; set; }
|
||||
|
||||
[Required]
|
||||
public int MaxLoadPctAutoload { get; set; }
|
||||
|
||||
[Required]
|
||||
public int MinLoadPctAutoload { get; set; }
|
||||
|
||||
[Required]
|
||||
public int ToolTypeCode { get; set; }
|
||||
|
||||
public DTONcShankModel Shank { get; set; }
|
||||
|
||||
public static explicit operator SiemensToolModel(DTOSiemensToolModel dtoModel)
|
||||
{
|
||||
return new SiemensToolModel()
|
||||
{
|
||||
MagazinePositionType = dtoModel.MagazinePositionType,
|
||||
ToolType = dtoModel.ToolType,
|
||||
LifeType = dtoModel.LifeType,
|
||||
FamilyName = dtoModel.FamilyName,
|
||||
MaxSpeed = dtoModel.MaxSpeed,
|
||||
//MaxAcceleration = dtoModel.MaxAcceleration,
|
||||
IsEnabled = dtoModel.IsEnabled,
|
||||
IsActive = dtoModel.IsActive,
|
||||
IsInhibited = dtoModel.IsInhibited,
|
||||
IsInUse = dtoModel.IsInUse,
|
||||
IsMeasured = dtoModel.IsMeasured,
|
||||
InChangeTool = dtoModel.InChangeTool,
|
||||
InFixedPlace = dtoModel.InFixedPlace,
|
||||
PreAlarm = dtoModel.PreAlarm,
|
||||
|
||||
Cooling1 = dtoModel.Cooling1,
|
||||
Cooling2 = dtoModel.Cooling2,
|
||||
LeftSize = dtoModel.LeftSize,
|
||||
RightSize = dtoModel.RightSize,
|
||||
Rotation = dtoModel.Rotation,
|
||||
|
||||
Load = dtoModel.Load,
|
||||
Gamma = dtoModel.Gamma,
|
||||
MaxLoadPctAutoload = dtoModel.MaxLoadPctAutoload,
|
||||
MinLoadPctAutoload = dtoModel.MinLoadPctAutoload,
|
||||
ToolTypeCode = dtoModel.ToolTypeCode
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public class DTOMagazinesPositionsModel
|
||||
{
|
||||
[Required]
|
||||
public bool Disabled { get; set; }
|
||||
}
|
||||
|
||||
public class DTOFamilyModel
|
||||
{
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ToolModels
|
||||
{
|
||||
public class DTOSiemensUpdateMagazineModel
|
||||
{
|
||||
[Required]
|
||||
public int ToolId { get; set; }
|
||||
}
|
||||
|
||||
public class DTONcUpdateMagazineModel
|
||||
{
|
||||
[Required]
|
||||
public int ShankId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -18,9 +18,6 @@ namespace Thermo.Active.Model.DatabaseModels
|
||||
[Column("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Column("type")]
|
||||
public byte ToolType { get; set; }
|
||||
|
||||
[Column("right_size")]
|
||||
public byte RightSize { get; set; }
|
||||
|
||||
@@ -69,16 +66,12 @@ namespace Thermo.Active.Model.DatabaseModels
|
||||
[Column("revive_delta")]
|
||||
public int ReviveDelta { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[IgnoreDataMember]
|
||||
public List<DbNcToolModel> Tools { get; set; }
|
||||
|
||||
public static explicit operator NcFamilyModel(DbNcFamilyModel obj)
|
||||
{
|
||||
return new NcFamilyModel()
|
||||
{
|
||||
FamilyId = (ushort)obj.FamilyId,
|
||||
ToolType = obj.ToolType,
|
||||
RightSize = obj.RightSize,
|
||||
LeftSize = obj.LeftSize,
|
||||
TcpTable = obj.TcpTable,
|
||||
@@ -103,7 +96,6 @@ namespace Thermo.Active.Model.DatabaseModels
|
||||
return new DbNcFamilyModel()
|
||||
{
|
||||
FamilyId = (short)obj.FamilyId,
|
||||
ToolType = obj.ToolType,
|
||||
RightSize = obj.RightSize,
|
||||
LeftSize = obj.LeftSize,
|
||||
TcpTable = obj.TcpTable,
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using CMS_CORE_Library.Models;
|
||||
|
||||
namespace Thermo.Active.Model.DatabaseModels
|
||||
{
|
||||
[Table("magazine_position")]
|
||||
public class DbNcMagazinePositionModel
|
||||
{
|
||||
[Key, Column("magazine_id", Order = 0)]
|
||||
public byte MagazineId { get; set; }
|
||||
|
||||
[Key, Column("position_id", Order = 1)]
|
||||
public int PositionId { get; set; }
|
||||
|
||||
[Column("type")]
|
||||
public byte Type { get; set; }
|
||||
|
||||
[Column("disabled")]
|
||||
public bool Disabled { get; set; }
|
||||
|
||||
public static explicit operator NcMagazinePositionModel(DbNcMagazinePositionModel obj)
|
||||
{
|
||||
return new NcMagazinePositionModel()
|
||||
{
|
||||
MagazineId = obj.MagazineId,
|
||||
PositionId = (ushort)obj.PositionId,
|
||||
Type = obj.Type
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Runtime.Serialization;
|
||||
using CMS_CORE_Library.Models;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Thermo.Active.Model.DatabaseModels
|
||||
{
|
||||
[Table("shank")]
|
||||
public class DbNcShankModel
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
[Column("id")]
|
||||
public short ShankId { get; set; }
|
||||
|
||||
[Column("balluf")]
|
||||
public int? Balluf { get; set; }
|
||||
|
||||
[Column("magazine_position_type")]
|
||||
public byte MagazinePositionType { get; set; }
|
||||
|
||||
[ForeignKey("MagazinePosition"), Column("magazine_id", Order = 0)]
|
||||
public byte? MagazineId { get; set; }
|
||||
|
||||
[ForeignKey("MagazinePosition"), Column("position_id", Order = 1)]
|
||||
public int? PositionId { get; set; }
|
||||
|
||||
[Column("origin_magazine_id")]
|
||||
public byte? OriginMagazineId { get; set; }
|
||||
|
||||
[Column("origin_position_id")]
|
||||
public int? OriginPositionId { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
[IgnoreDataMember]
|
||||
public DbNcMagazinePositionModel MagazinePosition { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
[IgnoreDataMember]
|
||||
public List<DbNcToolModel> Tools { get; set; }
|
||||
|
||||
public static explicit operator NcShankModel(DbNcShankModel obj)
|
||||
{
|
||||
return new NcShankModel()
|
||||
{
|
||||
ShankId = (ushort)obj.ShankId,
|
||||
Balluf = obj.Balluf == null ? (ushort)0 : (ushort)obj.Balluf.Value,
|
||||
MagazineId = obj.MagazineId == null ? (byte)0 : obj.MagazineId.Value,
|
||||
PositionId = obj.PositionId == null ? (ushort)0 : (ushort)obj.PositionId.Value,
|
||||
MagazinePositionType = obj.MagazinePositionType,
|
||||
OriginMagazineId = obj.OriginMagazineId == null ? (byte)0 : obj.OriginMagazineId.Value,
|
||||
OriginPositionId = obj.OriginPositionId == null ? (ushort)0 : (ushort)obj.OriginPositionId.Value,
|
||||
};
|
||||
}
|
||||
|
||||
public static explicit operator DbNcShankModel(NcShankModel obj)
|
||||
{
|
||||
return new DbNcShankModel()
|
||||
{
|
||||
ShankId = (short)obj.ShankId,
|
||||
Balluf = obj.Balluf == 0 ? null : (ushort?)obj.Balluf,
|
||||
MagazineId = obj.MagazineId == 0 ? null : (byte?)obj.MagazineId,
|
||||
PositionId = obj.PositionId == 0 ? null : (ushort?)obj.PositionId,
|
||||
MagazinePositionType = obj.MagazinePositionType,
|
||||
OriginMagazineId = obj.OriginMagazineId == 0 ? null : (byte?)obj.OriginMagazineId,
|
||||
OriginPositionId = obj.OriginPositionId == 0 ? null : (ushort?)obj.OriginPositionId,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
using CMS_CORE_Library.Models;
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace Thermo.Active.Model.DatabaseModels
|
||||
{
|
||||
[Table("tool")]
|
||||
public class DbNcToolModel
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
[Column("id")]
|
||||
public short ToolId { get; set; }
|
||||
|
||||
[Column("offset_length")]
|
||||
public short OffsetLength { get; set; }
|
||||
|
||||
[Column("residual_life")]
|
||||
public int ResidualLife { get; set; }
|
||||
|
||||
[Column("residual_revive")]
|
||||
public int ResidualRevive { get; set; }
|
||||
|
||||
[Column("status")]
|
||||
public byte Status { get; set; }
|
||||
|
||||
// Foreign keys
|
||||
[Column("family_id")]
|
||||
[ForeignKey("Family")]
|
||||
public short FamilyId { get; set; }
|
||||
|
||||
[Column("shank_id")]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
|
||||
[ForeignKey("Shank")]
|
||||
public short? ShankId { get; set; }
|
||||
|
||||
[Column("offsetId1")]
|
||||
public short? OffsetId1 { get; set; }
|
||||
|
||||
[Column("offsetId2")]
|
||||
public short? OffsetId2 { get; set; }
|
||||
|
||||
[Column("offsetId3")]
|
||||
public short? OffsetId3 { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[IgnoreDataMember]
|
||||
public virtual DbNcFamilyModel Family { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[IgnoreDataMember]
|
||||
public virtual DbNcShankModel Shank { get; set; }
|
||||
|
||||
public static explicit operator NcToolModel(DbNcToolModel obj)
|
||||
{
|
||||
return new NcToolModel()
|
||||
{
|
||||
ToolId = obj.ToolId,
|
||||
FamilyId = obj.FamilyId,
|
||||
OffsetLength = obj.OffsetLength,
|
||||
ResidualLife = (ushort)obj.ResidualLife,
|
||||
Status = obj.Status,
|
||||
ResidualRevive = (ushort)obj.ResidualRevive,
|
||||
ShankId = (short)(obj.ShankId == null ? 0 : obj.ShankId.Value),
|
||||
OffsetId1 = (ushort)(obj.OffsetId1 == null ? 0 : obj.OffsetId1.Value),
|
||||
OffsetId2 = (ushort)(obj.OffsetId2 == null ? 0 : obj.OffsetId2.Value),
|
||||
OffsetId3 = (ushort)(obj.OffsetId3 == null ? 0 : obj.OffsetId3.Value)
|
||||
};
|
||||
}
|
||||
|
||||
public static explicit operator DbNcToolModel(NcToolModel obj)
|
||||
{
|
||||
return new DbNcToolModel()
|
||||
{
|
||||
ToolId = obj.ToolId,
|
||||
FamilyId = obj.FamilyId,
|
||||
OffsetLength = obj.OffsetLength,
|
||||
ResidualLife = (ushort)obj.ResidualLife,
|
||||
Status = obj.Status,
|
||||
ResidualRevive = (ushort)obj.ResidualRevive,
|
||||
ShankId = obj.ShankId == 0 ? null : (short?)obj.ShankId,
|
||||
OffsetId1 = obj.OffsetId1 == 0 ? null : (short?)obj.OffsetId1,
|
||||
OffsetId2 = obj.OffsetId2 == 0 ? null : (short?)obj.OffsetId2,
|
||||
OffsetId3 = obj.OffsetId3 == 0 ? null : (short?)obj.OffsetId3
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Step.Model")]
|
||||
[assembly: AssemblyTitle("Thermo.Active.Model")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Step.Model")]
|
||||
[assembly: AssemblyProduct("Thermo.Active.Model")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2017")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
@@ -33,9 +33,6 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="CMS_CORE_Library">
|
||||
<HintPath>..\Libs\CMS_CORE_Library.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -66,16 +63,14 @@
|
||||
<Compile Include="ConfigModels\AlarmsConfigModel.cs" />
|
||||
<Compile Include="ConfigModels\CmsConnectConfigModel.cs" />
|
||||
<Compile Include="ConfigModels\ExtSoftwareModel.cs" />
|
||||
<Compile Include="ConfigModels\RecipeConfigModel.cs" />
|
||||
<Compile Include="ConfigModels\HeadsConfigModel.cs" />
|
||||
<Compile Include="ConfigModels\MagazineNamesModel.cs" />
|
||||
<Compile Include="ConfigModels\MaintenanceConfigModel.cs" />
|
||||
<Compile Include="ConfigModels\NcSoftKeysModel.cs" />
|
||||
<Compile Include="ConfigModels\ServerConfigModel.cs" />
|
||||
<Compile Include="ConfigModels\AreasConfigModel.cs" />
|
||||
<Compile Include="ConfigModels\NcConfigModel.cs" />
|
||||
<Compile Include="ConfigModels\SoftwareProdConfigModel.cs" />
|
||||
<Compile Include="ConfigModels\ToolManagerConfigModel.cs" />
|
||||
<Compile Include="ConfigModels\ToolTypeConfigModel.cs" />
|
||||
<Compile Include="ConfigModels\UserSoftKeyConfigModel.cs" />
|
||||
<Compile Include="Constants.cs" />
|
||||
<Compile Include="DatabaseModels\AlarmFileModel.cs" />
|
||||
@@ -91,9 +86,6 @@
|
||||
<Compile Include="DatabaseModels\MaintenanceModel.cs" />
|
||||
<Compile Include="DatabaseModels\NcOffsetModel.cs" />
|
||||
<Compile Include="DatabaseModels\NcFamilyModel.cs" />
|
||||
<Compile Include="DatabaseModels\NcMagazinePositionModel.cs" />
|
||||
<Compile Include="DatabaseModels\NcShankModel.cs" />
|
||||
<Compile Include="DatabaseModels\NcToolModel.cs" />
|
||||
<Compile Include="DatabaseModels\PerformedMaintenanceModel.cs" />
|
||||
<Compile Include="DatabaseModels\QueueItemsModel.cs" />
|
||||
<Compile Include="DatabaseModels\RoleModel.cs">
|
||||
@@ -103,12 +95,15 @@
|
||||
<Compile Include="DatabaseModels\MachineUserModel.cs" />
|
||||
<Compile Include="DatabaseModels\SessionModel.cs" />
|
||||
<Compile Include="DTOModels\AlarmModels\DTONewAlarmNoteModel.cs" />
|
||||
<Compile Include="DTOModels\DTOGaugeDataModel.cs" />
|
||||
<Compile Include="DTOModels\DTOActiveProgramInfoModel.cs" />
|
||||
<Compile Include="DTOModels\AlarmModels\DTOAlarmHistoricModel.cs" />
|
||||
<Compile Include="DTOModels\AlarmModels\DTOAlarmsModel.cs" />
|
||||
<Compile Include="DTOModels\DTOAxesModel.cs" />
|
||||
<Compile Include="DTOModels\DTOAxisNameModel.cs" />
|
||||
<Compile Include="DTOModels\DTOClientConfigurationModel.cs" />
|
||||
<Compile Include="DTOModels\Recipe\DTORecipeParam.cs" />
|
||||
<Compile Include="DTOModels\Recipe\DTORecipeConfigModel .cs" />
|
||||
<Compile Include="DTOModels\DTONetworkMonitor.cs" />
|
||||
<Compile Include="DTOModels\DTOCmsConnectGateway.cs" />
|
||||
<Compile Include="DTOModels\JobModels\DTOGenericParamModel.cs" />
|
||||
@@ -118,12 +113,11 @@
|
||||
<Compile Include="DTOModels\DTOQueueModel.cs" />
|
||||
<Compile Include="DTOModels\JobModels\DTOMetadataFieldsModel.cs" />
|
||||
<Compile Include="DTOModels\JobModels\DTOMetadataModel.cs" />
|
||||
<Compile Include="DTOModels\Recipe\DTORecipeOverview.cs" />
|
||||
<Compile Include="DTOModels\Recipe\RecipeParamRT.cs" />
|
||||
<Compile Include="DTOModels\Recipe\RecipeParam.cs" />
|
||||
<Compile Include="DTOModels\Scada\DTOScadaModel.cs" />
|
||||
<Compile Include="DTOModels\Scada\ScadaSchemaModel.cs" />
|
||||
<Compile Include="DTOModels\ToolModels\DTOAssistedToolingModel.cs" />
|
||||
<Compile Include="DTOModels\ToolModels\DTOSelfAdaptiveModel.cs" />
|
||||
<Compile Include="DTOModels\ToolModels\DTOExportToolTableModel.cs" />
|
||||
<Compile Include="DTOModels\ToolModels\DTONewToolDataModel.cs" />
|
||||
<Compile Include="DTOModels\MaintenanceModels\DTOExpiredMaintenanceModel.cs" />
|
||||
<Compile Include="DTOModels\DTOHeadModel.cs" />
|
||||
<Compile Include="DTOModels\DTOHeadsConfigModel.cs" />
|
||||
@@ -144,17 +138,6 @@
|
||||
<Compile Include="DTOModels\MaintenanceModels\DTOMaintenanceNoteModel.cs" />
|
||||
<Compile Include="DTOModels\MaintenanceModels\DTONewMaintenanceModel.cs" />
|
||||
<Compile Include="DatabaseModels\MaintenanceNoteModel.cs" />
|
||||
<Compile Include="DTOModels\ToolModels\DTOEdgeModel.cs" />
|
||||
<Compile Include="DTOModels\ToolModels\DTOMagazineStatusModel.cs" />
|
||||
<Compile Include="DTOModels\ToolModels\DTONcFamilyModel.cs" />
|
||||
<Compile Include="DTOModels\ToolModels\DTONcMagazinePositionModel.cs" />
|
||||
<Compile Include="DTOModels\ToolModels\DTONcMountedShankModel.cs" />
|
||||
<Compile Include="DTOModels\ToolModels\DTONcShankModel.cs" />
|
||||
<Compile Include="DTOModels\ToolModels\DTONcToolModel.cs" />
|
||||
<Compile Include="DTOModels\ToolModels\DTONewToolWithFamilyModel.cs" />
|
||||
<Compile Include="DTOModels\ToolModels\DTOShankModel.cs" />
|
||||
<Compile Include="DTOModels\ToolModels\DTOSiemensToolModel.cs" />
|
||||
<Compile Include="DTOModels\ToolModels\DTOUpdateMagazineModel.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="DatabaseModels\UserModel.cs">
|
||||
<Generator>DtsGenerator</Generator>
|
||||
@@ -173,6 +156,12 @@
|
||||
<None Include="App.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\cms_core_library\CMS_CORE_Library\CMS_CORE_Library.csproj">
|
||||
<Project>{4abf8eef-2b23-483e-acdc-53214fe28681}</Project>
|
||||
<Name>CMS_CORE_Library</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
|
||||
+318
-68
@@ -4,8 +4,9 @@ using CMS_CORE_Library.Fanuc;
|
||||
using CMS_CORE_Library.Models;
|
||||
using CMS_CORE_Library.Osai;
|
||||
using CMS_CORE_Library.Siemens;
|
||||
using CMS_CORE_Library.S7Net;
|
||||
using Thermo.Active.Database.Controllers;
|
||||
using Thermo.Active.Model.DatabaseModels;
|
||||
using Thermo.Active.Model.DatabaseModels;
|
||||
using Thermo.Active.Model.DTOModels;
|
||||
using Thermo.Active.Model.DTOModels.AlarmModels;
|
||||
using Thermo.Active.Model.DTOModels.MaintenanceModels;
|
||||
@@ -21,12 +22,18 @@ using System.Text.RegularExpressions;
|
||||
using static CMS_CORE_Library.Models.DataStructures;
|
||||
using static Thermo.Active.Config.ServerConfig;
|
||||
using static Thermo.Active.Model.Constants;
|
||||
using Thermo.Active.Model.DTOModels.Recipe;
|
||||
|
||||
namespace Thermo.Active.NC
|
||||
{
|
||||
public class NcAdapter : IDisposable
|
||||
{
|
||||
public Nc numericalControl;
|
||||
/// <summary>
|
||||
/// check e usare dati simulati/reali (in fase implementazione)
|
||||
/// </summary>
|
||||
public bool simData = true;
|
||||
|
||||
public NcThermo numericalControl;
|
||||
|
||||
public NcAdapter() =>
|
||||
// Choose NC
|
||||
@@ -52,22 +59,13 @@ namespace Thermo.Active.NC
|
||||
return null;
|
||||
}
|
||||
|
||||
public Nc SetNumericalControl()
|
||||
public NcThermo SetNumericalControl()
|
||||
{
|
||||
// Return new Numerical control instance choosed from the configuration
|
||||
switch (NcConfig.NcVendor)
|
||||
{
|
||||
case NC_VENDOR.DEMO:
|
||||
return new Nc_Demo(NcConfig.NcIpAddress, NcConfig.NcPort);
|
||||
|
||||
case NC_VENDOR.FANUC:
|
||||
return new Nc_Fanuc(NcConfig.NcIpAddress, NcConfig.NcPort, 2000);
|
||||
|
||||
case NC_VENDOR.SIEMENS:
|
||||
return new Nc_Siemens(2000);
|
||||
|
||||
case NC_VENDOR.OSAI:
|
||||
return new Nc_Osai(NcConfig.NcIpAddress, NcConfig.NcPort, 2000);
|
||||
case NC_VENDOR.S7NET:
|
||||
return new Nc_S7Net(NcConfig.NcIpAddress, NcConfig.NcPort, 2000);
|
||||
}
|
||||
|
||||
return null;
|
||||
@@ -116,7 +114,7 @@ namespace Thermo.Active.NC
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
public CmsError GetAxesPositionsByProcess(ushort processNum, out DTOAxesModel axes)
|
||||
public CmsError GetAxesPositionsByProcess(ushort processNum, out DTOAxesModel axes)
|
||||
{
|
||||
axes = new DTOAxesModel();
|
||||
|
||||
@@ -232,7 +230,7 @@ namespace Thermo.Active.NC
|
||||
// Max process number
|
||||
genericData.ProcessNumber = procNum;
|
||||
// Get Installation Date
|
||||
genericData.InstallationDate = DateTime.ParseExact(NcConfig.InstallationDate, DATE_FORMATS, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal);
|
||||
genericData.InstallationDate = DateTime.ParseExact(NcConfig.InstallationDate, DATE_FORMATS, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal);
|
||||
// Get PLC version
|
||||
genericData.PlcVersion = "1.0.0";
|
||||
// Get PLC version
|
||||
@@ -241,8 +239,8 @@ namespace Thermo.Active.NC
|
||||
return cmsError;
|
||||
genericData.UnitOfMeasurement = tmpInfo;
|
||||
|
||||
// Get Server version
|
||||
genericData.ServerVersion = SupportFunctions.GetSoftwareVersionAndBuildDate();
|
||||
// Get Server version
|
||||
genericData.ServerVersion = SupportFunctions.GetSoftwareVersionAndBuildDate();
|
||||
|
||||
return cmsError;
|
||||
}
|
||||
@@ -539,7 +537,7 @@ namespace Thermo.Active.NC
|
||||
if (performed != null)
|
||||
perfVal = performed.CounterValue;
|
||||
|
||||
counterValue = (uint) Math.Ceiling(SupportFunctions.ConvertInUmeas(counterVal, currMaintenance.UnitOfMeasure.Value));
|
||||
counterValue = (uint)Math.Ceiling(SupportFunctions.ConvertInUmeas(counterVal, currMaintenance.UnitOfMeasure.Value));
|
||||
|
||||
// Calc percentage = PLC - PERFORMED VALUE * 100 / interval
|
||||
percentage = ((counterVal - perfVal) * 100) / SupportFunctions.ConvertInMinutes(currMaintenance.Interval.Value, currMaintenance.UnitOfMeasure.Value);
|
||||
@@ -601,7 +599,7 @@ namespace Thermo.Active.NC
|
||||
}
|
||||
}
|
||||
|
||||
if(performed != null && performed.ControlWord == -2)
|
||||
if (performed != null && performed.ControlWord == -2)
|
||||
{
|
||||
performed = null;
|
||||
}
|
||||
@@ -864,50 +862,36 @@ namespace Thermo.Active.NC
|
||||
Id = head.Id,
|
||||
Process = head.Process,
|
||||
Type = configuredHead.Type.ToString(),
|
||||
FixedHead = configuredHead.FixedHead,
|
||||
FixedHead = configuredHead.FixedHead,
|
||||
inWarning = head.Load_Abrasive >= configuredHead.WarningLimit,
|
||||
inAlarm = head.Load_Abrasive >= configuredHead.AlarmLimit,
|
||||
inAlarm = head.Load_Abrasive >= configuredHead.AlarmLimit,
|
||||
OverrideEditable = head.OverrideEditable,
|
||||
ActualSpeed = head.ActualSpeed_Pressure,
|
||||
Load = head.Load_Abrasive,
|
||||
MountedTool = (ushort)head.MountedTool_Vacum,
|
||||
Load = head.Load_Abrasive,
|
||||
Override = head.Override,
|
||||
IsActive = head.IsActive,
|
||||
IsSelected = head.IsSelected,
|
||||
AbrasiveIsActive = head.AbrasiveIsActive,
|
||||
Configured = head.Configured,
|
||||
Rotation = head.Rotation,
|
||||
WorkedTime = head.WorkedTime,
|
||||
ToolData = head.Tool == null ? null : new DTOToolInSpindleModel()
|
||||
{
|
||||
ChildId = head.Tool.ChildId,
|
||||
ToolName = head.Tool.ToolName,
|
||||
Disabled = head.Tool.Disabled,
|
||||
Measured = head.Tool.Measured,
|
||||
Broken = head.Tool.Broken,
|
||||
MaxSpeed = (int)head.Tool.MaxSpeed,
|
||||
MaxLoad = (byte)head.Tool.MaxLoad,
|
||||
ResidualLife = (int)head.Tool.ResidualLife
|
||||
}
|
||||
WorkedTime = head.WorkedTime
|
||||
});
|
||||
}
|
||||
break;
|
||||
|
||||
case HEAD_TYPE.AWJ:
|
||||
|
||||
case HEAD_TYPE.WJ:
|
||||
{
|
||||
float vacumValue = (float)head.MountedTool_Vacum / 100;
|
||||
heads.Add(new DTOAbrasiveWaterJet()
|
||||
heads.Add(new DTOWaterJet()
|
||||
{
|
||||
Id = head.Id,
|
||||
Process = head.Process,
|
||||
Type = configuredHead.Type.ToString(),
|
||||
FixedHead = configuredHead.FixedHead,
|
||||
inWarning = vacumValue >= configuredHead.WarningLimit,
|
||||
inAlarm = vacumValue >= configuredHead.AlarmLimit,
|
||||
OverrideEditable = head.OverrideEditable,
|
||||
inAlarm = false,
|
||||
inWarning = false,
|
||||
ActualPressure = head.ActualSpeed_Pressure,
|
||||
Abrasive = Convert.ToUInt16(head.Load_Abrasive),
|
||||
Vacum = vacumValue,
|
||||
OverrideEditable = head.OverrideEditable,
|
||||
Override = head.Override,
|
||||
IsActive = head.IsActive,
|
||||
IsSelected = head.IsSelected,
|
||||
@@ -916,6 +900,57 @@ namespace Thermo.Active.NC
|
||||
});
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
// !!!FARE!!! è copia delle heads
|
||||
public CmsError GetRecipeData(out List<DTOHeadModel> heads)
|
||||
{
|
||||
// Returned value
|
||||
heads = new List<DTOHeadModel>();
|
||||
// Number of configured heads
|
||||
int headsNumber = HeadsConfig.Count;
|
||||
|
||||
List<HeadDataModel> plcHeads = new List<HeadDataModel>();
|
||||
// Read value from PLC
|
||||
CmsError cmsError = numericalControl.PLC_RHeadsData(plcHeads, headsNumber);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
foreach (var head in plcHeads)
|
||||
{
|
||||
// Get current head config
|
||||
var configuredHead = HeadsConfig.Find(x => x.Id == head.Id);
|
||||
// Create different model according on type
|
||||
switch (configuredHead.Type)
|
||||
{
|
||||
case HEAD_TYPE.SPINDLE:
|
||||
{
|
||||
heads.Add(new DTOSpindleModel()
|
||||
{
|
||||
Id = head.Id,
|
||||
Process = head.Process,
|
||||
Type = configuredHead.Type.ToString(),
|
||||
FixedHead = configuredHead.FixedHead,
|
||||
inWarning = head.Load_Abrasive >= configuredHead.WarningLimit,
|
||||
inAlarm = head.Load_Abrasive >= configuredHead.AlarmLimit,
|
||||
OverrideEditable = head.OverrideEditable,
|
||||
ActualSpeed = head.ActualSpeed_Pressure,
|
||||
Load = head.Load_Abrasive,
|
||||
Override = head.Override,
|
||||
IsActive = head.IsActive,
|
||||
IsSelected = head.IsSelected,
|
||||
AbrasiveIsActive = head.AbrasiveIsActive,
|
||||
Configured = head.Configured,
|
||||
Rotation = head.Rotation,
|
||||
WorkedTime = head.WorkedTime
|
||||
});
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case HEAD_TYPE.WJ:
|
||||
{
|
||||
@@ -959,7 +994,7 @@ namespace Thermo.Active.NC
|
||||
Process = x.Process,
|
||||
Type = x.Type.ToString(),
|
||||
Value = x.Value
|
||||
}).ToList();
|
||||
}).ToList();
|
||||
|
||||
return NO_ERROR;
|
||||
}
|
||||
@@ -999,9 +1034,9 @@ namespace Thermo.Active.NC
|
||||
scadas.Add(scadaValue);
|
||||
// Add id to read scada
|
||||
alreadyReadScada.Add(schema.Id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
@@ -1025,6 +1060,78 @@ namespace Thermo.Active.NC
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
public CmsError ReadGaugeData(out ThermoModels.GaugeModel gaugeData)
|
||||
{
|
||||
gaugeData = new ThermoModels.GaugeModel();
|
||||
CmsError cmsError = numericalControl.PLC_RGaugeData(ref gaugeData);
|
||||
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
public CmsError ReadRecipeData(bool refreshOnlyRT, out Dictionary<string, DTORecipeParam> currentRecipe)
|
||||
{
|
||||
// init obj
|
||||
currentRecipe = new Dictionary<string, DTORecipeParam>();
|
||||
RPRange currRange = new RPRange();
|
||||
RPStatus currStatus = new RPStatus();
|
||||
// solo x S7...
|
||||
if (NcConfig.NcVendor == NC_VENDOR.S7NET)
|
||||
{
|
||||
Dictionary<int, DataStructures.RecipeParam> currPlcRecipe = new Dictionary<int, DataStructures.RecipeParam>();
|
||||
CmsError cmsError = numericalControl.PLC_RRecipeParamList(refreshOnlyRT, ref currPlcRecipe);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
DTORecipeParam currParam = new DTORecipeParam();
|
||||
// leggo l'intero array delle DB... QUI FAKE sulle DB configurate...
|
||||
List<DTORecipeConfigModel> recipeConfig = RecipeConfig.Select(x => new DTORecipeConfigModel()
|
||||
{
|
||||
Id = x.Id,
|
||||
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()
|
||||
}).ToList();
|
||||
|
||||
foreach (var item in recipeConfig)
|
||||
{
|
||||
if (currPlcRecipe.ContainsKey(item.Id))
|
||||
{
|
||||
// recupero da mem PLC
|
||||
var paramPLC = currPlcRecipe[item.Id];
|
||||
currRange = new RPRange()
|
||||
{
|
||||
Min = paramPLC.ValMin,
|
||||
Max = paramPLC.ValMax,
|
||||
};
|
||||
currStatus = new RPStatus()
|
||||
{
|
||||
Visible = paramPLC.Visible,
|
||||
Enabled = paramPLC.Enabled,
|
||||
HasError = paramPLC.HasError
|
||||
};
|
||||
// calcolo intero oggetto
|
||||
currParam = new DTORecipeParam()
|
||||
{
|
||||
Range = currRange,
|
||||
Status = currStatus,
|
||||
UnitMeasure = "",
|
||||
ValueAct = paramPLC.ValueAct
|
||||
};
|
||||
}
|
||||
currentRecipe.Add(item.Label, currParam);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
currentRecipe = new Dictionary<string, DTORecipeParam>();
|
||||
}
|
||||
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
public CmsError ReadNcScada(ScadaSchemaModel scadaSchema, out DTOScadaModel scadaValue)
|
||||
{
|
||||
//ReadScadaDataSiemens(scadaSchema, out scadaValue);
|
||||
@@ -1049,7 +1156,7 @@ namespace Thermo.Active.NC
|
||||
{
|
||||
if (layer.Labels.ElementAtOrDefault(i) != null)
|
||||
{
|
||||
if(layer.Labels[i].MemEnabledIndex != null)
|
||||
if (layer.Labels[i].MemEnabledIndex != null)
|
||||
{
|
||||
// Read enabled from PLC
|
||||
cmsError = numericalControl.PLC_RScadaValue(layer.Labels[i].MemEnabledIndex, SCADA_MEM_TYPE.BOOL, ref val);
|
||||
@@ -1079,7 +1186,7 @@ namespace Thermo.Active.NC
|
||||
return cmsError;
|
||||
|
||||
// Populate & add new object into scada model
|
||||
scadaValue.Buttons.Add(new DTOScadaButtonModel()
|
||||
scadaValue.Buttons.Add(new DTOScadaButtonModel()
|
||||
{
|
||||
Id = layer.Buttons[i].Id,
|
||||
IsEnabled = Convert.ToBoolean(val)
|
||||
@@ -1100,7 +1207,7 @@ namespace Thermo.Active.NC
|
||||
Id = layer.Images[i].Id,
|
||||
IsVisible = negate ? !Convert.ToBoolean(val) : Convert.ToBoolean(val)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (layer.ProgressBars.ElementAtOrDefault(i) != null)
|
||||
{
|
||||
@@ -1141,7 +1248,7 @@ namespace Thermo.Active.NC
|
||||
{
|
||||
IsEnabled = false, //Convert.ToBoolean(val),
|
||||
Value = val2
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
@@ -1169,7 +1276,7 @@ namespace Thermo.Active.NC
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1325,7 +1432,8 @@ namespace Thermo.Active.NC
|
||||
Id = enabled.Id,
|
||||
IsEnabled = Convert.ToBoolean(enabled.Value)
|
||||
});
|
||||
} break;
|
||||
}
|
||||
break;
|
||||
case (int)SCADA_ELEMENT_TYPE.IMAGE:
|
||||
case (int)SCADA_ELEMENT_TYPE.NEGATE_IMAGE:
|
||||
{
|
||||
@@ -1333,9 +1441,10 @@ namespace Thermo.Active.NC
|
||||
scadaValue.Images.Add(new DTOScadaImageModel()
|
||||
{
|
||||
Id = enabled.Id,
|
||||
IsVisible = enabled.ObjectType == (int)SCADA_ELEMENT_TYPE.NEGATE_IMAGE? !Convert.ToBoolean(enabled.Value) : Convert.ToBoolean(enabled.Value)
|
||||
IsVisible = enabled.ObjectType == (int)SCADA_ELEMENT_TYPE.NEGATE_IMAGE ? !Convert.ToBoolean(enabled.Value) : Convert.ToBoolean(enabled.Value)
|
||||
});
|
||||
} break;
|
||||
}
|
||||
break;
|
||||
case (int)SCADA_ELEMENT_TYPE.LABEL:
|
||||
{
|
||||
// Populate & add new object into scada model
|
||||
@@ -1344,23 +1453,24 @@ namespace Thermo.Active.NC
|
||||
Id = enabled.Id,
|
||||
IsVisible = Convert.ToBoolean(enabled.Value)
|
||||
});
|
||||
} break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < inputData.Count() - 1; i += 2)
|
||||
{
|
||||
var obj = inputData[i];
|
||||
var enabled = inputData[i + 1];
|
||||
|
||||
|
||||
// Populate & add new object into scada model
|
||||
scadaValue.Inputs.Add(new DTOScadaInputModel()
|
||||
{
|
||||
Id = obj.Id,
|
||||
Value = new DTOScadaValueModel()
|
||||
{
|
||||
IsEnabled = obj.Action.ToLower() == SCADA_ACTION.READ ? false : Convert.ToBoolean(enabled.Value),
|
||||
Value = obj.Value
|
||||
IsEnabled = obj.Action.ToLower() == SCADA_ACTION.READ ? false : Convert.ToBoolean(enabled.Value),
|
||||
Value = obj.Value
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1371,6 +1481,146 @@ namespace Thermo.Active.NC
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Legge tutti i parametri della ricetta
|
||||
/// </summary>
|
||||
/// <param name="currRecipe">Oggetto ricetta corrente HMI</param>
|
||||
/// <returns></returns>
|
||||
public CmsError ReadFullRecipe(out Dictionary<string, DTORecipeParam> currRecipe)
|
||||
{
|
||||
CmsError cmsError = NO_ERROR;
|
||||
currRecipe = new Dictionary<string, DTORecipeParam>();
|
||||
|
||||
DTORecipeParam currParam = new DTORecipeParam();
|
||||
RPRange currRange = new RPRange();
|
||||
RPStatus currStatus = new RPStatus();
|
||||
|
||||
if (simData)
|
||||
{
|
||||
// leggo l'intero array delle DB... QUI FAKE sulle DB configurate...
|
||||
List<DTORecipeConfigModel> recipeConfig = RecipeConfig.Select(x => new DTORecipeConfigModel()
|
||||
{
|
||||
Id = x.Id,
|
||||
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()
|
||||
}).ToList();
|
||||
|
||||
int minVal, maxVal, actVal;
|
||||
Random rnd = new Random();
|
||||
foreach (var item in recipeConfig)
|
||||
{
|
||||
// randomizzo valori...
|
||||
minVal = rnd.Next(0, 10);
|
||||
maxVal = rnd.Next(100, 200);
|
||||
actVal = rnd.Next(minVal - 5, maxVal + 5);
|
||||
currRange = new RPRange()
|
||||
{
|
||||
Min = minVal,
|
||||
Max = maxVal,
|
||||
};
|
||||
currStatus = new RPStatus()
|
||||
{
|
||||
Visible = true,
|
||||
Enabled = true,
|
||||
HasError = (actVal < minVal || actVal > maxVal)
|
||||
};
|
||||
currParam = new DTORecipeParam()
|
||||
{
|
||||
Range = currRange,
|
||||
Status = currStatus,
|
||||
UnitMeasure = "",
|
||||
ValueAct = actVal
|
||||
};
|
||||
currRecipe.Add(item.Label, currParam);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// gestione errore
|
||||
cmsError = ReadRecipeData(false, out currRecipe);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
// restituisco cod errore se trovato
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Legge tutti i parametri della ricetta e calcolo la overview dei vari steps
|
||||
/// </summary>
|
||||
/// <param name="currOverview">Oggetto overview ricetta corrente HMI</param>
|
||||
/// <returns></returns>
|
||||
public CmsError GetRecipeOverview(out Dictionary<string, RecipeCatStatus> currOverview)
|
||||
{
|
||||
CmsError cmsError = NO_ERROR;
|
||||
currOverview = new Dictionary<string, RecipeCatStatus>();
|
||||
|
||||
// !!!FARE davvero!!!
|
||||
#if false
|
||||
// gestione errore
|
||||
cmsError = ReadScadaData(schema, out currParam);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
#endif
|
||||
|
||||
// calcolo!
|
||||
|
||||
// leggo l'intero array delle DB... QUI FAKE sulle DB configurate...
|
||||
List<DTORecipeConfigModel> recipeConfig = RecipeConfig.Select(x => new DTORecipeConfigModel()
|
||||
{
|
||||
Id = x.Id,
|
||||
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()
|
||||
}).ToList();
|
||||
|
||||
RecipeCatStatus currStatus = RecipeCatStatus.Unchanged;
|
||||
int countCat = 0;
|
||||
foreach (var item in recipeConfig)
|
||||
{
|
||||
// ogni 20 incremento...
|
||||
if (countCat < 20)
|
||||
{
|
||||
currStatus = RecipeCatStatus.Unchanged;
|
||||
}
|
||||
else if (countCat < 40)
|
||||
{
|
||||
currStatus = RecipeCatStatus.ChangedOk;
|
||||
}
|
||||
else
|
||||
{
|
||||
currStatus = RecipeCatStatus.HasError;
|
||||
}
|
||||
// se non c'è aggiungo
|
||||
if (!currOverview.ContainsKey(item.Category))
|
||||
{
|
||||
currOverview.Add(item.Category, currStatus);
|
||||
countCat = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// se il valore è maggiore --> aggiorno
|
||||
currOverview[item.Category] = (int)currStatus > (int)currOverview[item.Category] ? currStatus : currOverview[item.Category];
|
||||
}
|
||||
countCat++;
|
||||
}
|
||||
|
||||
// restituisco cod errore se trovato
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
|
||||
#endregion Read Data
|
||||
|
||||
#region Write data
|
||||
@@ -1443,7 +1693,7 @@ namespace Thermo.Active.NC
|
||||
public CmsError SetActiveScreen(short screen)
|
||||
{
|
||||
// Set to true power on data by id
|
||||
return numericalControl.NC_SetScreenVisible((Nc.SCREEN_PAGE)screen);
|
||||
return numericalControl.NC_SetScreenVisible((NcThermo.SCREEN_PAGE)screen);
|
||||
}
|
||||
|
||||
public CmsError WriteM155Data(int process, double responseValue)
|
||||
@@ -1462,7 +1712,7 @@ namespace Thermo.Active.NC
|
||||
{
|
||||
// Choose which list contains the maximum number of elements
|
||||
int max = layer.Buttons.Count();
|
||||
|
||||
|
||||
if (layer.Labels.Count() > max)
|
||||
max = layer.Labels.Count();
|
||||
|
||||
@@ -1493,11 +1743,11 @@ namespace Thermo.Active.NC
|
||||
SupportFunctions.ConvertStringMachineNumberIntoNumber(strMachNumber, out bool containsLetters, out int machNumber);
|
||||
|
||||
// Read Data from NC & elaborate it
|
||||
long NcCandy = 0;
|
||||
long NcCandy = 0;
|
||||
cmsError = numericalControl.PLC_RCandy(ref NcCandy);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
|
||||
bool bNC_OK = CandiesController.GetDataFromLincense(NcCandy, containsLetters, out long NCLic, out int NCMatr, out long NCParam);
|
||||
bool bNC_VALID = machNumber == NCMatr && bNC_OK;
|
||||
|
||||
@@ -1517,7 +1767,7 @@ namespace Thermo.Active.NC
|
||||
return cmsError;
|
||||
|
||||
// Manage Expired Lincense Bit
|
||||
if(CandiesController.ElaborateExpiredBit(newDate, bNcCandy, out bool bNewCandy))
|
||||
if (CandiesController.ElaborateExpiredBit(newDate, bNcCandy, out bool bNewCandy))
|
||||
{
|
||||
//Write Expired Lincense Bit on NC
|
||||
cmsError = numericalControl.PLC_WExpiredCandy(bNewCandy);
|
||||
@@ -1528,14 +1778,14 @@ namespace Thermo.Active.NC
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
public void WriteCandy(DateTime value,int machNumber)
|
||||
public void WriteCandy(DateTime value, int machNumber)
|
||||
{
|
||||
long nDays;
|
||||
long Lic=0;
|
||||
long Lic = 0;
|
||||
nDays = (value.Ticks / TimeSpan.TicksPerDay);
|
||||
|
||||
//Imposto nel registro
|
||||
CandiesController.SetPCLincense(machNumber,nDays);
|
||||
CandiesController.SetPCLincense(machNumber, nDays);
|
||||
|
||||
//Imposto nel CN
|
||||
Lic = long.Parse(CandiesController.SetLincenseFromData(machNumber, nDays));
|
||||
|
||||
@@ -1,911 +0,0 @@
|
||||
using CMS_CORE_Library.Models;
|
||||
using Thermo.Active.Database.Controllers;
|
||||
using Thermo.Active.Model.DatabaseModels;
|
||||
using Thermo.Active.Model.DTOModels.ToolModels;
|
||||
using Thermo.Active.Utils;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.Entity;
|
||||
using System.Linq;
|
||||
using static CMS_CORE_Library.Models.DataStructures;
|
||||
using static Thermo.Active.Config.ServerConfig;
|
||||
using static Thermo.Active.Model.Constants;
|
||||
|
||||
namespace Thermo.Active.NC
|
||||
{
|
||||
public class NcToolTableAdapter : NcAdapter
|
||||
{
|
||||
public CmsError GetToolsData(out List<DTONcToolModel> dtoTools)
|
||||
{
|
||||
dtoTools = new List<DTONcToolModel>();
|
||||
|
||||
CmsError cmsError = NO_ERROR;
|
||||
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
List<DbNcToolModel> tools = toolsManager.FindToolsWithDependencies();
|
||||
|
||||
foreach (DbNcToolModel tool in tools)
|
||||
{
|
||||
DTONcToolModel dtoTool = (DTONcToolModel)tool;
|
||||
|
||||
cmsError = GetToolData(tool, ref dtoTool);
|
||||
|
||||
dtoTools.Add(dtoTool);
|
||||
}
|
||||
|
||||
return cmsError;
|
||||
}
|
||||
}
|
||||
|
||||
public CmsError GetToolData(DbNcToolModel tool, ref DTONcToolModel dtoTool)
|
||||
{
|
||||
dtoTool = (DTONcToolModel)tool;
|
||||
|
||||
OffsetModel offset = new OffsetModel();
|
||||
CmsError cmsError = NO_ERROR;
|
||||
|
||||
if (tool.OffsetId1 != null && tool.OffsetId1 != 0)
|
||||
{
|
||||
// Read first offset data
|
||||
cmsError = numericalControl.TOOLS_ROffset((short)tool.OffsetId1, ref offset);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
dtoTool.Offset1 = offset;
|
||||
}
|
||||
if (tool.OffsetId2 != null && tool.OffsetId2 != 0)
|
||||
{
|
||||
// Read second offset data
|
||||
cmsError = numericalControl.TOOLS_ROffset((short)tool.OffsetId2, ref offset);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
dtoTool.Offset2 = offset;
|
||||
}
|
||||
if (tool.OffsetId3 != null && tool.OffsetId3 != 0)
|
||||
{
|
||||
// Read third offset data
|
||||
cmsError = numericalControl.TOOLS_ROffset((short)tool.OffsetId3, ref offset);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
dtoTool.Offset3 = offset;
|
||||
}
|
||||
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
public CmsError AddTool(DTONewNcToolModel tool, out DTONcToolModel dtoTool, short toolId)
|
||||
{
|
||||
dtoTool = new DTONcToolModel();
|
||||
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
DbNcToolModel ncTool = toolsManager.AddTool(tool, toolId);
|
||||
|
||||
if (!ToolManagerConfig.OffsetOpt)
|
||||
{
|
||||
CmsError cmsError = UpdateToolOffsetId(ncTool.ToolId, 1, ncTool.ToolId, out DTONcToolModel toolWithOffset);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
ncTool.OffsetId1 = ncTool.ToolId;
|
||||
}
|
||||
|
||||
GetToolData(ncTool, ref dtoTool);
|
||||
|
||||
return NO_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
public CmsError UpdateTool(int toolId, DTONewNcToolModel newTool, out DTONcToolModel toolWithOffsets, DTONewNcToolWithFamilyModel dtoToolWithFamily)
|
||||
{
|
||||
toolWithOffsets = new DTONcToolModel();
|
||||
CmsError cmsError = NO_ERROR;
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
using (var dbContextTransaction = toolsManager.dbCtx.Database.BeginTransaction())
|
||||
{
|
||||
// If family option is not active, update family data
|
||||
if (!ToolManagerConfig.FamilyOpt)
|
||||
{
|
||||
// Copy only family
|
||||
DTONewNcFamilyModel newFamily = new DTONewNcFamilyModel();
|
||||
SupportFunctions.CopyProperties(dtoToolWithFamily, newFamily);
|
||||
// Update only family data
|
||||
newFamily = (DTONcFamilyModel)toolsManager.UpdateFamily(dtoToolWithFamily.FamilyId, newFamily);
|
||||
}
|
||||
|
||||
// Update database tool Tool
|
||||
DbNcToolModel dbTool = toolsManager.UpdateTool(toolId, newTool);
|
||||
|
||||
// Populate updated tool with offset data
|
||||
cmsError = GetToolData(dbTool, ref toolWithOffsets);
|
||||
if (cmsError.IsError())
|
||||
{
|
||||
dbContextTransaction.Rollback();
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
bool startIsActive = false;
|
||||
|
||||
// Check if tool is loaded into a shank
|
||||
if (dbTool.ShankId != null)
|
||||
{
|
||||
// Check if shank is loaded into magazine
|
||||
DbNcShankModel shank = toolsManager.FindShankWithTools(dbTool.ShankId.Value);
|
||||
if (shank.MagazineId != null)
|
||||
{
|
||||
startIsActive = true;
|
||||
// Create backup of data stored on the NC and block memory/files accesses
|
||||
cmsError = numericalControl.TOOLS_WStartEditData();
|
||||
if (cmsError.IsError())
|
||||
{
|
||||
ManageErrorAndTransaction(cmsError, dbContextTransaction, startIsActive);
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
// If family option is not active, update NC data
|
||||
//if (!ToolManagerConfig.FamilyOpt)
|
||||
//{
|
||||
// Update Nc families
|
||||
cmsError = UpdateNcFamily(toolsManager);
|
||||
if (cmsError.IsError())
|
||||
ManageErrorAndTransaction(cmsError, dbContextTransaction, true);
|
||||
//}
|
||||
|
||||
// Update tool
|
||||
cmsError = UpdateNcTools(toolsManager);
|
||||
}
|
||||
}
|
||||
|
||||
ManageErrorAndTransaction(cmsError, dbContextTransaction, startIsActive);
|
||||
|
||||
return NO_ERROR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public CmsError UpdateNcTools(NcToolManagerController toolsManager = null)
|
||||
{
|
||||
if (toolsManager == null)
|
||||
toolsManager = new NcToolManagerController();
|
||||
|
||||
List<NcShankModel> shanks = toolsManager
|
||||
.FindShanks()
|
||||
.Where(x => x.MagazineId != null)
|
||||
.Select(x => (NcShankModel)x)
|
||||
.ToList();
|
||||
|
||||
// Get tools
|
||||
List<NcToolModel> tools = toolsManager
|
||||
.FindTools()
|
||||
.Select(x => (NcToolModel)x)
|
||||
.Where(x => shanks.Any(y => y.ShankId == x.ShankId)) // Find only mounted tools
|
||||
.ToList();
|
||||
|
||||
// Update tools
|
||||
return numericalControl.TOOLS_WUpdateTools(tools);
|
||||
}
|
||||
|
||||
public CmsError UpdateOffset(short offsetId, OffsetModel offsetData)
|
||||
{
|
||||
return numericalControl.TOOLS_WOffset(offsetId, ref offsetData);
|
||||
}
|
||||
|
||||
public CmsError UpdateToolOffsetId(int toolId, int positionId, short offsetId, out DTONcToolModel toolWithOffsets)
|
||||
{
|
||||
toolWithOffsets = new DTONcToolModel();
|
||||
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
using (var dbContextTransaction = toolsManager.dbCtx.Database.BeginTransaction())
|
||||
{
|
||||
// Update database tool Tool
|
||||
DbNcToolModel dbTool = toolsManager.UpdateToolOffset(toolId, positionId, offsetId);
|
||||
|
||||
// Populate updated tool with offset data
|
||||
CmsError cmsError = GetToolData(dbTool, ref toolWithOffsets);
|
||||
if (cmsError.IsError())
|
||||
{
|
||||
dbContextTransaction.Rollback();
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
bool startIsActive = false;
|
||||
|
||||
// Check if tool is loaded into a shank
|
||||
if (dbTool.ShankId != null)
|
||||
{
|
||||
// Check if shank is loaded into magazine
|
||||
DbNcShankModel shank = toolsManager.FindShankWithTools(dbTool.ShankId.Value);
|
||||
if (shank.MagazineId != null)
|
||||
{
|
||||
startIsActive = true;
|
||||
// Create backup of data stored on the NC and block file accesses
|
||||
cmsError = numericalControl.TOOLS_WStartEditData();
|
||||
if (cmsError.IsError())
|
||||
{
|
||||
ManageErrorAndTransaction(cmsError, dbContextTransaction, startIsActive);
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
// R tool
|
||||
cmsError = UpdateNcTools(toolsManager);
|
||||
}
|
||||
}
|
||||
|
||||
ManageErrorAndTransaction(cmsError, dbContextTransaction, startIsActive);
|
||||
|
||||
return NO_ERROR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public CmsError DeleteNcTool(DbNcToolModel tool)
|
||||
{
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
using (var dbContextTransaction = toolsManager.dbCtx.Database.BeginTransaction())
|
||||
{
|
||||
if (!ToolManagerConfig.FamilyOpt)
|
||||
{
|
||||
DbNcFamilyModel fam = toolsManager.FindFamily(tool.FamilyId);
|
||||
// Check if family is connected to other tools
|
||||
if (fam != null && fam.Tools.Count() == 1)
|
||||
{
|
||||
toolsManager.DeleteFamily(fam.FamilyId);
|
||||
}
|
||||
}
|
||||
|
||||
DbNcShankModel shank = null;
|
||||
if (!ToolManagerConfig.ShankOpt && tool.ShankId != null)
|
||||
{
|
||||
// If option is active find & delete tool shank
|
||||
shank = toolsManager.FindShankWithTools(tool.ShankId.Value);
|
||||
|
||||
toolsManager.DeleteNcShank(shank.ShankId);
|
||||
}
|
||||
|
||||
// Delete db tool
|
||||
toolsManager.DeleteTool(tool.ToolId);
|
||||
|
||||
bool startIsActive = false;
|
||||
CmsError cmsError = NO_ERROR;
|
||||
|
||||
if (tool.ShankId != null && shank != null)
|
||||
{
|
||||
if (shank.MagazineId != null)
|
||||
{
|
||||
startIsActive = true;
|
||||
// Create backup of data stored on the NC and block file accesses
|
||||
cmsError = numericalControl.TOOLS_WStartEditData();
|
||||
if (cmsError.IsError())
|
||||
{
|
||||
ManageErrorAndTransaction(cmsError, dbContextTransaction, startIsActive);
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
// Update Nc data
|
||||
cmsError = UpdateNcTools(toolsManager);
|
||||
}
|
||||
}
|
||||
|
||||
ManageErrorAndTransaction(cmsError, dbContextTransaction, startIsActive);
|
||||
|
||||
return cmsError;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public CmsError UpdateShank(int shankId, DTONewNcShankModel dtoShank, out DTONcShankModel shank)
|
||||
{
|
||||
shank = new DTONcShankModel();
|
||||
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
using (var dbContextTransaction = toolsManager.dbCtx.Database.BeginTransaction())
|
||||
{
|
||||
bool startIsActive = false;
|
||||
CmsError cmsError = NO_ERROR;
|
||||
|
||||
// Update db data
|
||||
shank = (DTONcShankModel)toolsManager.UpdateShank(shankId, dtoShank);
|
||||
if (shank.MagazineId != null)
|
||||
{
|
||||
startIsActive = true;
|
||||
// Create backup of data stored on the NC and block file accesses
|
||||
cmsError = numericalControl.TOOLS_WStartEditData();
|
||||
if (cmsError.IsError())
|
||||
{
|
||||
ManageErrorAndTransaction(cmsError, dbContextTransaction, startIsActive);
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
// Update nc data
|
||||
cmsError = UpdateNcShanks(toolsManager);
|
||||
}
|
||||
|
||||
ManageErrorAndTransaction(cmsError, dbContextTransaction, startIsActive);
|
||||
|
||||
return cmsError;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public CmsError DeleteNcShank(int shankId)
|
||||
{
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
CmsError cmsError = NO_ERROR;
|
||||
using (var dbContextTransaction = toolsManager.dbCtx.Database.BeginTransaction())
|
||||
{
|
||||
// Delete database shank
|
||||
DbNcShankModel deletedShank = toolsManager.DeleteNcShank(shankId);
|
||||
bool startIsActive = false;
|
||||
if (deletedShank.MagazineId != null)
|
||||
{
|
||||
startIsActive = true;
|
||||
// Create backup of data stored on the NC and block file accesses
|
||||
cmsError = numericalControl.TOOLS_WStartEditData();
|
||||
if (cmsError.IsError())
|
||||
{
|
||||
ManageErrorAndTransaction(cmsError, dbContextTransaction, startIsActive);
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
// Update nc data
|
||||
cmsError = UpdateNcShanks(toolsManager);
|
||||
}
|
||||
|
||||
ManageErrorAndTransaction(cmsError, dbContextTransaction, startIsActive);
|
||||
|
||||
return cmsError;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private CmsError UpdateNcShanks(NcToolManagerController toolsManager)
|
||||
{
|
||||
// Get mounted shanks
|
||||
List<NcShankModel> shanks = toolsManager
|
||||
.FindShanks()
|
||||
.Where(x => x.MagazineId != null)
|
||||
.Select(x => (NcShankModel)x)
|
||||
.ToList();
|
||||
|
||||
// Update nc data
|
||||
return numericalControl.TOOLS_WUpdateShanks(shanks);
|
||||
}
|
||||
|
||||
public DTONcFamilyModel AddFamily(DTONcFamilyModel family)
|
||||
{
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
return (DTONcFamilyModel)toolsManager.AddFamily(family);
|
||||
}
|
||||
}
|
||||
|
||||
public CmsError UpdateFamily(int familyId, DTONewNcFamilyModel family, out DTONcFamilyModel newFamily)
|
||||
{
|
||||
newFamily = new DTONcFamilyModel();
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
using (var dbContextTransaction = toolsManager.dbCtx.Database.BeginTransaction())
|
||||
{
|
||||
// Update db family
|
||||
newFamily = (DTONcFamilyModel)toolsManager.UpdateFamily(familyId, family);
|
||||
|
||||
// Create backup of data stored on the NC and block file accesses
|
||||
CmsError cmsError = numericalControl.TOOLS_WStartEditData();
|
||||
if (cmsError.IsError())
|
||||
{
|
||||
ManageErrorAndTransaction(cmsError, dbContextTransaction, true);
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
// Update Nc families
|
||||
cmsError = UpdateNcFamily(toolsManager);
|
||||
|
||||
ManageErrorAndTransaction(cmsError, dbContextTransaction, true);
|
||||
|
||||
return cmsError;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public CmsError DeleteNcFamily(int famId)
|
||||
{
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
using (var dbContextTransaction = toolsManager.dbCtx.Database.BeginTransaction())
|
||||
{
|
||||
// Create backup of data stored on the NC and block file accesses
|
||||
CmsError cmsError = numericalControl.TOOLS_WStartEditData();
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
// Check if shank opt is disabled
|
||||
if (!ToolManagerConfig.ShankOpt)
|
||||
{
|
||||
// If the relationship is 1:1 (tool:shank) i have to remove shanks manually
|
||||
// Tools are deleted thanks to foreign keys constraint
|
||||
List<DbNcShankModel> shanks = toolsManager.FindShanksByFamilyId(famId);
|
||||
foreach (var shank in shanks)
|
||||
{
|
||||
if (shank != null)
|
||||
toolsManager.DeleteNcShank(shank.ShankId);
|
||||
}
|
||||
}
|
||||
|
||||
toolsManager.DeleteFamily(famId);
|
||||
|
||||
// Update Nc families
|
||||
cmsError = UpdateNcFamily(toolsManager);
|
||||
|
||||
ManageErrorAndTransaction(cmsError, dbContextTransaction, true);
|
||||
|
||||
return cmsError;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private CmsError UpdateNcFamily(NcToolManagerController toolsManager)
|
||||
{
|
||||
// Get mounted shanks
|
||||
List<NcShankModel> shanks = toolsManager
|
||||
.FindShanks()
|
||||
.Where(x => x.MagazineId != null)
|
||||
.Select(x => (NcShankModel)x)
|
||||
.ToList();
|
||||
|
||||
// Get tools
|
||||
List<NcToolModel> tools = toolsManager
|
||||
.FindTools()
|
||||
.Select(x => (NcToolModel)x)
|
||||
.Where(x => shanks.Any(y => y.ShankId == x.ShankId)) // Find only mounted tools
|
||||
.ToList();
|
||||
|
||||
List<NcFamilyModel> families = toolsManager
|
||||
.FindFamilies()
|
||||
.Select(x => (NcFamilyModel)x)
|
||||
.Where(x => tools.Any(y => y.FamilyId == x.FamilyId)) // Find only families of mounted tools
|
||||
.ToList();
|
||||
|
||||
// Update nc families
|
||||
return numericalControl.TOOLS_WUpdateFamilies(families);
|
||||
}
|
||||
|
||||
public CmsError UpdateMagazinePosition(DbNcMagazinePositionModel dbPos, DTONcMagazinePositionModel dtoPos, out DTONcMagazinePositionModel magPos)
|
||||
{
|
||||
magPos = new DTONcMagazinePositionModel();
|
||||
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
using (DbContextTransaction dbContextTransaction = toolsManager.dbCtx.Database.BeginTransaction())
|
||||
{
|
||||
// Create backup of data stored on the NC and block file accesses
|
||||
CmsError cmsError = StartEditData();
|
||||
if (cmsError.IsError())
|
||||
{
|
||||
ManageErrorAndTransaction(cmsError, dbContextTransaction, true);
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
// Update database data
|
||||
magPos = (DTONcMagazinePositionModel)toolsManager.UpdatePosition(dbPos, dtoPos);
|
||||
|
||||
// Get magazines positions
|
||||
List<NcMagazinePositionModel> positions = toolsManager.FindMagazinesPositions()
|
||||
.Select(x => (NcMagazinePositionModel)x)
|
||||
.ToList();
|
||||
// Update Nc data
|
||||
cmsError = numericalControl.TOOLS_WUpdateMagazinePositions(positions);
|
||||
|
||||
ManageErrorAndTransaction(cmsError, dbContextTransaction, true);
|
||||
|
||||
return cmsError;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ManageErrorAndTransaction(CmsError cmsError, DbContextTransaction dbContextTransaction, bool ncStartIsActive)
|
||||
{
|
||||
// Check cmsError, manage transaction and if startIsActive = true manage Nc backup created with TOOLS_WStartEditData()
|
||||
if (cmsError.IsError())
|
||||
{
|
||||
// Close transaction
|
||||
dbContextTransaction.Rollback();
|
||||
// Restore backup
|
||||
if (ncStartIsActive)
|
||||
numericalControl.TOOLS_WRestoreBackup();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Close transaction
|
||||
dbContextTransaction.Commit();
|
||||
// Stop editing ncData
|
||||
if (ncStartIsActive)
|
||||
numericalControl.TOOLS_WStopEditData();
|
||||
}
|
||||
}
|
||||
|
||||
public DTONcShankModel LoadIntoShank(DbNcToolModel tool, short shankId)
|
||||
{
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
return toolsManager.LoadToolIntoShank(tool, shankId);
|
||||
}
|
||||
}
|
||||
|
||||
public DTONcShankModel UnloadFromShank(DbNcToolModel tool)
|
||||
{
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
return toolsManager.UnloadToolFromShank(tool);
|
||||
}
|
||||
}
|
||||
|
||||
public CmsError SetupNcToolManager()
|
||||
{
|
||||
CmsError cmsError = UpdateMagazinePositionConf(out bool newDb);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
cmsError = WriteOption();
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
using (NcToolManagerController toolManager = new NcToolManagerController())
|
||||
{
|
||||
// If database was empty read data from NC and update database
|
||||
if (newDb)
|
||||
{
|
||||
List<NcToolModel> tools = new List<NcToolModel>();
|
||||
List<NcFamilyModel> families = new List<NcFamilyModel>();
|
||||
List<NcShankModel> shanks = new List<NcShankModel>();
|
||||
|
||||
// Read data from Nc memory
|
||||
cmsError = numericalControl.TOOLS_RStoredData(ref tools, ref families, ref shanks);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
// Check if there are data
|
||||
if (tools.Count() > 0 || families.Count() > 0 || shanks.Count() > 0)
|
||||
{
|
||||
// Populate import object
|
||||
DTOExportToolTableModel exp = new DTOExportToolTableModel()
|
||||
{
|
||||
Tools = tools.Select(x => (DbNcToolModel)x).ToList(),
|
||||
Families = families.Select(x =>
|
||||
{
|
||||
var fam = (DbNcFamilyModel)x;
|
||||
fam.Name = "Fam" + fam.FamilyId.ToString();
|
||||
return fam;
|
||||
}).ToList(),
|
||||
Shanks = shanks.Select(x => (DbNcShankModel)x).ToList()
|
||||
};
|
||||
|
||||
// Import
|
||||
toolManager.ImportData(exp);
|
||||
}
|
||||
}
|
||||
|
||||
List<DTONcToolModel> databaseTool = toolManager.GetTools();
|
||||
bool exist = false;
|
||||
if (databaseTool != null && databaseTool.Count() > 0)
|
||||
// Check options consistency with database data
|
||||
exist = databaseTool.Exists(x =>
|
||||
(!ToolManagerConfig.FamilyOpt && x.FamilyId != x.Id) || // Check family
|
||||
(!ToolManagerConfig.ShankOpt && x.ShankId != x.Id) || // Check shanks
|
||||
(!ToolManagerConfig.OffsetOpt && x.OffsetId1 != x.Id && x.OffsetId2 != null && x.OffsetId3 != null) // Check offsets
|
||||
);
|
||||
|
||||
if (exist)
|
||||
return OPTION_NOT_CONSISTENT_ERROR;
|
||||
|
||||
// Check if there are blocked magazines, and release them
|
||||
cmsError = RestoreTableLock();
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
}
|
||||
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
public CmsError UpdateMagazinePositionConf(out bool newDb)
|
||||
{
|
||||
newDb = false;
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
// Get database configured positions
|
||||
List<DbNcMagazinePositionModel> dbPositions = toolsManager.FindMagazinesPositions();
|
||||
if (dbPositions.Count <= 0)
|
||||
{
|
||||
// THe software is using a new database
|
||||
newDb = true;
|
||||
|
||||
CmsError cmsError = GetMagazineConfiguration(out List<NcMagazineConfigModel> config);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
// Setup new positions list in order to be saved in the database
|
||||
List<DbNcMagazinePositionModel> fromConfigPosition = new List<DbNcMagazinePositionModel>();
|
||||
foreach (var conf in config)
|
||||
{
|
||||
for (byte i = 1; i <= conf.MaxPositions; i++)
|
||||
{
|
||||
// Create new position
|
||||
fromConfigPosition.Add(new DbNcMagazinePositionModel()
|
||||
{
|
||||
MagazineId = conf.Id,
|
||||
PositionId = i,
|
||||
Disabled = false,
|
||||
Type = 0
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Update database
|
||||
toolsManager.SetupMagazinePositions(fromConfigPosition);
|
||||
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
return NO_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
public CmsError WriteOption()
|
||||
{
|
||||
ToolManagerOptionsModel options = new ToolManagerOptionsModel();
|
||||
SupportFunctions.CopyProperties(ToolManagerConfig, options);
|
||||
|
||||
return numericalControl.TOOLS_WOptions(options);
|
||||
}
|
||||
|
||||
public CmsError GetMagazineConfiguration(out List<NcMagazineConfigModel> config)
|
||||
{
|
||||
config = new List<NcMagazineConfigModel>();
|
||||
// Read configuration
|
||||
return numericalControl.TOOLS_RMagazineConfig(ref config);
|
||||
}
|
||||
|
||||
public CmsError StartEditData()
|
||||
{
|
||||
return numericalControl.TOOLS_WStartEditData();
|
||||
}
|
||||
|
||||
public CmsError StopEditData()
|
||||
{
|
||||
return numericalControl.TOOLS_WStopEditData();
|
||||
}
|
||||
|
||||
public CmsError StartEditTooling(int magazineId)
|
||||
{
|
||||
return numericalControl.TOOLS_WStartEditTooling(magazineId);
|
||||
}
|
||||
|
||||
public CmsError StopEditTooling(int magazineId)
|
||||
{
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
// Get mounted shanks
|
||||
List<NcShankModel> shanks = toolsManager
|
||||
.FindShanks()
|
||||
.Where(x => x.MagazineId != null)
|
||||
.Select(x => (NcShankModel)x)
|
||||
.ToList();
|
||||
// Update shanks
|
||||
CmsError cmsError = numericalControl.TOOLS_WUpdateShanks(shanks);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
// Get magazine positions
|
||||
List<NcMagazinePositionModel> positions = toolsManager.FindMagazinesPositions()
|
||||
.Select(x => (NcMagazinePositionModel)x)
|
||||
.ToList();
|
||||
// Update positions
|
||||
cmsError = numericalControl.TOOLS_WUpdateMagazinePositions(positions);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
// Get tools
|
||||
List<NcToolModel> tools = toolsManager
|
||||
.FindTools()
|
||||
.Select(x => (NcToolModel)x)
|
||||
.Where(x => shanks.Any(y => y.ShankId == x.ShankId)) // Find only mounted tools
|
||||
.ToList();
|
||||
|
||||
// Update tools
|
||||
cmsError = numericalControl.TOOLS_WUpdateTools(tools);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
// Get families
|
||||
List<NcFamilyModel> families = toolsManager
|
||||
.FindFamilies()
|
||||
.Select(x => (NcFamilyModel)x)
|
||||
.Where(x => tools.Any(y => y.FamilyId == x.FamilyId)) // Find only families of mounted tools
|
||||
.ToList();
|
||||
|
||||
// Update families
|
||||
cmsError = numericalControl.TOOLS_WUpdateFamilies(families);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
return numericalControl.TOOLS_WStopEditTooling(magazineId);
|
||||
}
|
||||
|
||||
public CmsError GetUpdatedToolsData(out Dictionary<int, byte> updatedStatus, out Dictionary<int, uint> updatedLives)
|
||||
{
|
||||
updatedStatus = new Dictionary<int, byte>();
|
||||
updatedLives = new Dictionary<int, uint>();
|
||||
return numericalControl.TOOLS_RUpdatedToolsData(ref updatedStatus, ref updatedLives);
|
||||
}
|
||||
|
||||
public CmsError CheckIfShankCanFit(int magazineId, int positionId, DbNcShankModel shankToBeLoaded)
|
||||
{
|
||||
CmsError cmsError = GetMagazineConfiguration(out List<NcMagazineConfigModel> magazinesConfig);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
NcMagazineConfigModel magConfig = magazinesConfig.FirstOrDefault(x => x.Id == magazineId);// Get only current magazine config
|
||||
if (magConfig == null)
|
||||
return INCORRECT_PARAMETERS_ERROR;
|
||||
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
List<DbNcToolModel> magazineMountedTools = toolsManager.GetMountedTools();
|
||||
|
||||
// Check if there is a tool already mounted the selected position (magazineId, positionId)
|
||||
var toolAlreadyMounted = magazineMountedTools.FirstOrDefault(x => x.Shank.MagazineId == magazineId && x.Shank.PositionId == positionId);
|
||||
if (toolAlreadyMounted != null)
|
||||
return MAGAZINE_POSITION_OCCUPIED_ERROR;
|
||||
|
||||
// Get shank occupied space
|
||||
toolsManager.GetShankMaxSpaceOccupied(shankToBeLoaded.ShankId, out int maxRight, out int maxLeft);
|
||||
|
||||
// Check if tool can fit in the position considering other tools
|
||||
foreach (var mountedTool in magazineMountedTools)
|
||||
{
|
||||
// Check if is not the same position && if is different check if the position is on the same magazine
|
||||
if (mountedTool.Shank.PositionId != positionId && mountedTool.Shank.MagazineId == magazineId)
|
||||
{
|
||||
int decPosition, incPosition;
|
||||
decPosition = incPosition = mountedTool.Shank.PositionId.Value;
|
||||
// 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 != NC_MAGAZINE_TYPE.BOX_MAGAZINE)
|
||||
{
|
||||
decPosition = decPosition < positionId ? decPosition + magConfig.MaxPositions : decPosition;
|
||||
incPosition = incPosition > positionId ? incPosition - magConfig.MaxPositions : incPosition;
|
||||
}
|
||||
|
||||
// Right check
|
||||
if (positionId < decPosition)
|
||||
{
|
||||
if (!(magConfig.Type == NC_MAGAZINE_TYPE.BOX_MAGAZINE && mountedTool.Shank.PositionId == 1))
|
||||
{
|
||||
// Calculate left space occupied (with mounted shank)
|
||||
double leftMounted = decPosition - (mountedTool.Family.LeftSize / 2.0);
|
||||
// Calculate right space needed (with shank to be loaded)
|
||||
double rightToBeMount = positionId + (maxRight / 2.0);
|
||||
if (leftMounted < rightToBeMount)
|
||||
return MAGAZINE_POSITION_OCCUPIED_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
// Left check
|
||||
if (positionId > incPosition)
|
||||
{
|
||||
if (!(magConfig.Type == NC_MAGAZINE_TYPE.BOX_MAGAZINE && mountedTool.Shank.PositionId == magConfig.MaxPositions))
|
||||
{
|
||||
// Calculate right space occupied (with mounted shank)
|
||||
double rightMounted = incPosition + (mountedTool.Family.RightSize / 2.0);
|
||||
// Calculate left space needed (with shank to be loaded)
|
||||
double leftToBeMounted = positionId - (maxLeft / 2.0);
|
||||
if (rightMounted > leftToBeMounted)
|
||||
return MAGAZINE_POSITION_OCCUPIED_ERROR;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
public CmsError GetNcMagazineStatus(out Dictionary<int, bool> status)
|
||||
{
|
||||
status = new Dictionary<int, bool>();
|
||||
return numericalControl.TOOLS_RMagazineStatus(ref status);
|
||||
}
|
||||
|
||||
public CmsError StartAssistedToolingProcedure(ushort toolId, ushort familyId, ushort shankId, ushort magazineId, ushort positionId, ASSISTED_TOOLING_ACTION action)
|
||||
{
|
||||
return numericalControl.PLC_WAssistedToolingCmd(toolId, familyId, shankId, magazineId, positionId, action);
|
||||
}
|
||||
|
||||
public CmsError ReadAssistedToolingProcedure(out DTOAssistedToolingEndValueModel data)
|
||||
{
|
||||
data = new DTOAssistedToolingEndValueModel();
|
||||
AssistedToolingModel tmpData = new AssistedToolingModel();
|
||||
CmsError cmsError = numericalControl.PLC_RAssistedToolingData(ref tmpData);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
data = new DTOAssistedToolingEndValueModel(tmpData);
|
||||
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
public CmsError TerminateAssistedProcedure(int magazineId, bool writeData)
|
||||
{
|
||||
if (writeData)
|
||||
{
|
||||
CmsError cmsError = StartEditTooling(magazineId);
|
||||
if (!cmsError.IsError())
|
||||
{
|
||||
// Write tool table new data
|
||||
cmsError = StopEditTooling(magazineId);
|
||||
if (!cmsError.IsError())
|
||||
{
|
||||
// Close procedure
|
||||
return numericalControl.PLC_WTerminateAssistedToolingProcedure();
|
||||
}
|
||||
}
|
||||
return cmsError;
|
||||
}
|
||||
else
|
||||
{
|
||||
return numericalControl.PLC_WTerminateAssistedToolingProcedure();
|
||||
}
|
||||
}
|
||||
|
||||
public CmsError GetSelfAdaptiveStep(out DTOSelfAdaptiveModel step)
|
||||
{
|
||||
step = new DTOSelfAdaptiveModel();
|
||||
byte intStep = 0;
|
||||
|
||||
//Get the value
|
||||
CmsError cmsError = numericalControl.TOOLS_RAdatpivePathStep(ref intStep);
|
||||
step.Step = intStep;
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
public CmsError SetSelfAdaptiveStep(DTOSelfAdaptiveModel step)
|
||||
{
|
||||
//Limit Value
|
||||
if (step.Step > 100)
|
||||
step.Step = 100;
|
||||
if (step.Step < 0)
|
||||
step.Step = 0;
|
||||
|
||||
//Set the value
|
||||
return numericalControl.TOOLS_WAdatpivePathStep(step.Step);
|
||||
}
|
||||
|
||||
public CmsError RestoreTableLock()
|
||||
{
|
||||
List<int> ids = new List<int>();
|
||||
// check if there are magazines blocked by Active previously
|
||||
CmsError cmsError = numericalControl.TOOLS_RMagazineBlock(ref ids);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
if (ids.Count() > 0)
|
||||
{
|
||||
// Update tables
|
||||
cmsError = StopEditTooling(ids.FirstOrDefault());
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
// Free magazines
|
||||
return numericalControl.TOOLS_WFreeMagazines();
|
||||
}
|
||||
|
||||
return NO_ERROR;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
|
||||
// Le informazioni generali relative a un assembly sono controllate dal seguente
|
||||
// set di attributi. Modificare i valori di questi attributi per modificare le informazioni
|
||||
// associate a un assembly.
|
||||
[assembly: AssemblyTitle("Step.NC")]
|
||||
[assembly: AssemblyTitle("Thermo.Active.NC")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Step.NC")]
|
||||
[assembly: AssemblyProduct("Thermo.Active.NC")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2017")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
@@ -1,272 +0,0 @@
|
||||
using CMS_CORE_Library.Models;
|
||||
using Thermo.Active.Model.DTOModels.ToolModels;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using static Thermo.Active.Config.ServerConfig;
|
||||
using static Thermo.Active.Model.Constants;
|
||||
|
||||
namespace Thermo.Active.NC
|
||||
{
|
||||
public class SiemensToolTableAdapter : NcAdapter
|
||||
{
|
||||
public CmsError GetToolTableConfiguration(out ToolTableConfiguration config)
|
||||
{
|
||||
config = new ToolTableConfiguration();
|
||||
CmsError cmsError = numericalControl.TOOLS_RConfiguration(ref config);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
// Set magazine assisted tooling from config
|
||||
foreach (var magConfig in ToolManagerConfig.MagazineNames)
|
||||
{
|
||||
var mag = config.Magazines.FirstOrDefault(x => magConfig.MagazineId == x.Id);
|
||||
if (mag != null)
|
||||
mag.AssistedToolingIsActive = magConfig.AssistedTooling;
|
||||
}
|
||||
|
||||
config.RadiusMetricType = (ToolManagerConfig.ToolMetricType == RADIUS_METRIC);
|
||||
|
||||
config.SelfAdaptivePathOptionActive = true;
|
||||
if (!ToolManagerConfig.SelfAdaptivePathOpt)
|
||||
config.SelfAdaptivePathOptionActive = false;
|
||||
|
||||
if (NcConfig.NcVendor != NC_VENDOR.SIEMENS && NcConfig.NcVendor != NC_VENDOR.DEMO)
|
||||
{
|
||||
// Setup options
|
||||
config.FamilyOptionActive = true;
|
||||
config.MultitoolOptionActive = true;
|
||||
config.OffsetOptionActive = true;
|
||||
config.LifeOption = true;
|
||||
|
||||
// Add categories to be removed
|
||||
List<string> categories = new List<string>();
|
||||
if (!ToolManagerConfig.ShankOpt)
|
||||
{
|
||||
config.MultitoolOptionActive = false;
|
||||
categories.Add("shankType");
|
||||
config.ToolsConfiguration = config.ToolsConfiguration.Where(x => !(x.Name == "shankId")).ToList();
|
||||
}
|
||||
|
||||
if (!ToolManagerConfig.FamilyOpt)
|
||||
{
|
||||
config.FamilyOptionActive = false;
|
||||
categories.Add("family");
|
||||
config.ToolsConfiguration = config.ToolsConfiguration.Where(x => !(x.Name == "familyId")).ToList();
|
||||
config.ToolsConfiguration = config.FamiliesConfiguration.FamilyConfiguration.Concat(config.ToolsConfiguration).ToList();
|
||||
}
|
||||
|
||||
if (!ToolManagerConfig.OffsetOpt)
|
||||
config.OffsetOptionActive = false;
|
||||
|
||||
categories.Add("offset");
|
||||
|
||||
if (!ToolManagerConfig.TcpOpt)
|
||||
categories.Add("tcp");
|
||||
|
||||
if (!ToolManagerConfig.CoolingOpt)
|
||||
categories.Add("cooling");
|
||||
|
||||
if (!ToolManagerConfig.DynamicCompensationOpt)
|
||||
categories.Add("dynamicCompensation");
|
||||
|
||||
if (!ToolManagerConfig.GammaOpt)
|
||||
categories.Add("gamma");
|
||||
|
||||
if (!ToolManagerConfig.LifeOpt)
|
||||
{
|
||||
categories.Add("life");
|
||||
config.LifeOption = false;
|
||||
}
|
||||
|
||||
if (!ToolManagerConfig.MagPosTypeOpt)
|
||||
categories.Add("magPos");
|
||||
|
||||
if (!ToolManagerConfig.MultidimensionalShankOpt)
|
||||
categories.Add("shankOpt");
|
||||
|
||||
if (!ToolManagerConfig.SelfAdaptivePathOpt)
|
||||
categories.Add("selfAdaptive");
|
||||
|
||||
if (!ToolManagerConfig.BallufOpt)
|
||||
categories.Add("balluf");
|
||||
|
||||
if (!ToolManagerConfig.ReviveOpt)
|
||||
categories.Add("revive");
|
||||
|
||||
if (!ToolManagerConfig.IntegrityCheckOpt)
|
||||
categories.Add("integrityCheck");
|
||||
|
||||
// Remove category from configurations
|
||||
config.ToolsConfiguration = config.ToolsConfiguration.Where(x => !categories.Contains(x.Category) && !categories.Contains(x.SubCategory)).ToList();
|
||||
|
||||
// Remove categories from familyConfig
|
||||
config.FamiliesConfiguration.FamilyConfiguration = config.FamiliesConfiguration.FamilyConfiguration.Where(x => !categories.Contains(x.Category)).ToList();
|
||||
// Remove also SUBCATEGORIES because "ReadOnlyFamily" configuration has category field not populated
|
||||
config.FamiliesConfiguration.FamilyReadOnlyConfiguration = config.FamiliesConfiguration.FamilyReadOnlyConfiguration.Where(x => !categories.Contains(x.SubCategory)).ToList();
|
||||
|
||||
config.ShanksConfiguration.ShankConfiguration = config.ShanksConfiguration.ShankConfiguration.Where(x => !categories.Contains(x.Category)).ToList();
|
||||
config.MagazinePosConfiguration = config.MagazinePosConfiguration.Where(x => !categories.Contains(x.Category)).ToList();
|
||||
|
||||
// Update tool types list
|
||||
config.FamiliesConfiguration.FamilyConfiguration.Where(x => x.Name == "toolType").FirstOrDefault().SelectValues = GetToolTypeList();
|
||||
}
|
||||
else if (NcConfig.NcVendor == NC_VENDOR.SIEMENS) // IF == SIEMENS
|
||||
{
|
||||
// Update Tool types list
|
||||
config.ToolsConfiguration.Where(x => x.Name == "toolTypeCode").FirstOrDefault().SelectValues = GetToolTypeList();
|
||||
}
|
||||
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
private Dictionary<int, string> GetToolTypeList()
|
||||
{
|
||||
return ToolManagerConfig
|
||||
.ToolTypes.Where(x => !x.Disabled)
|
||||
.ToDictionary(x => x.Id, x => x.Id.ToString());
|
||||
}
|
||||
|
||||
public CmsError GetToolTableData(out List<SiemensToolModel> config)
|
||||
{
|
||||
config = new List<SiemensToolModel>();
|
||||
return numericalControl.TOOLS_RToolsData(ref config);
|
||||
}
|
||||
|
||||
public CmsError GetShanksData(out List<ShankModel> shanks)
|
||||
{
|
||||
shanks = new List<ShankModel>();
|
||||
return numericalControl.TOOLS_RShanksData(ref shanks);
|
||||
}
|
||||
|
||||
public CmsError GetFamiliesData(out List<FamilyModel> families)
|
||||
{
|
||||
families = new List<FamilyModel>();
|
||||
return numericalControl.TOOLS_RFamilyData(ref families);
|
||||
}
|
||||
|
||||
public CmsError GetMagazinesPositionsData(out List<PositionModel> magazinesPositions)
|
||||
{
|
||||
magazinesPositions = new List<PositionModel>();
|
||||
return numericalControl.TOOLS_RMagazinePositions(ref magazinesPositions);
|
||||
}
|
||||
|
||||
public CmsError GetMagazineStatus(out DTOMagazineActionModel magazineStatus)
|
||||
{
|
||||
// Set up models
|
||||
magazineStatus = new DTOMagazineActionModel();
|
||||
MagazineActionModel libModel = new MagazineActionModel();
|
||||
// Read status from NC
|
||||
CmsError cmsError = numericalControl.TOOLS_RMagazineAction(ref libModel);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
magazineStatus = (DTOMagazineActionModel)libModel;
|
||||
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
public CmsError AddTool(ref SiemensToolModel tool)
|
||||
{
|
||||
return numericalControl.TOOLS_WAddTool(ref tool);
|
||||
}
|
||||
|
||||
public CmsError UpdateTool(ref SiemensToolModel tool)
|
||||
{
|
||||
return numericalControl.TOOLS_WUpdateTool(ref tool);
|
||||
}
|
||||
|
||||
public CmsError AddFamily(string name, out FamilyModel family)
|
||||
{
|
||||
family = new FamilyModel()
|
||||
{
|
||||
Name = name
|
||||
};
|
||||
|
||||
return numericalControl.TOOLS_WAddFamily(ref family);
|
||||
}
|
||||
|
||||
public CmsError AddShank(ref ShankModel shank)
|
||||
{
|
||||
return numericalControl.TOOLS_WAddShank(ref shank);
|
||||
}
|
||||
|
||||
public CmsError UpdateShank(ref ShankModel shank)
|
||||
{
|
||||
return numericalControl.TOOLS_WUpdateShank(ref shank);
|
||||
}
|
||||
|
||||
public CmsError UpdateFamilyName(string oldName, string newName)
|
||||
{
|
||||
return numericalControl.TOOLS_WUpdateFamilyData(oldName, newName);
|
||||
}
|
||||
|
||||
public CmsError UpdateMagazinePosition(PositionModel magazinePosition)
|
||||
{
|
||||
return numericalControl.TOOLS_WUpdatePosition(magazinePosition);
|
||||
}
|
||||
|
||||
public CmsError DeleteTool(int id)
|
||||
{
|
||||
return numericalControl.TOOLS_WDeleteTool(id);
|
||||
}
|
||||
|
||||
public CmsError DeleteShank(int id)
|
||||
{
|
||||
return numericalControl.TOOLS_WDeleteShank(id);
|
||||
}
|
||||
|
||||
public CmsError DeleteFamily(string name)
|
||||
{
|
||||
return numericalControl.TOOLS_WDeleteFamily(name);
|
||||
}
|
||||
|
||||
public CmsError AddEdge(int toolId, ref EdgeModel edge)
|
||||
{
|
||||
return numericalControl.TOOLS_WAddEdge(toolId, ref edge);
|
||||
}
|
||||
|
||||
public CmsError UpdateEdge(int toolId, ref EdgeModel edge)
|
||||
{
|
||||
return numericalControl.TOOLS_WUpdateEdge(toolId, ref edge);
|
||||
}
|
||||
|
||||
public CmsError DeleteEdge(int toolId, int edgeId)
|
||||
{
|
||||
return numericalControl.TOOLS_WDeleteEdge(toolId, edgeId);
|
||||
}
|
||||
|
||||
public CmsError GetMagazinePositionsAndTools(int magazineId, out List<MountedToolModel> magazinePos)
|
||||
{
|
||||
magazinePos = new List<MountedToolModel>();
|
||||
return numericalControl.TOOLS_RMountedTools(magazineId, ref magazinePos);
|
||||
}
|
||||
|
||||
public CmsError GetNotInMagazinesTools(out List<ShankModel> multiTools, out List<SiemensToolModel> tools)
|
||||
{
|
||||
multiTools = new List<ShankModel>();
|
||||
tools = new List<SiemensToolModel>();
|
||||
return numericalControl.TOOLS_RAvailableTools(ref multiTools, ref tools);
|
||||
}
|
||||
|
||||
public CmsError LoadToolInMagazine(int magazineId, NewToolInMagazineModel newMag, out MountedToolModel mounted)
|
||||
{
|
||||
mounted = new MountedToolModel();
|
||||
return numericalControl.TOOLS_WLoadToolInMagazine(magazineId, newMag, ref mounted);
|
||||
}
|
||||
|
||||
public CmsError UnloadToolInMagazine(int magazineId, int positionId)
|
||||
{
|
||||
return numericalControl.TOOLS_WUnloadToolFromMagazine(magazineId, positionId);
|
||||
}
|
||||
|
||||
public CmsError LoadTooolIntoShank(int shankId, int positionId, int toolId)
|
||||
{
|
||||
return numericalControl.TOOLS_WLoadToolIntoShank(shankId, positionId, toolId);
|
||||
}
|
||||
|
||||
public CmsError UnloadTooolFromShank(int shankId, int positionId)
|
||||
{
|
||||
return numericalControl.TOOLS_WUnloadToolFromShank(shankId, positionId);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,10 +32,6 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="CMS_CORE_Library, Version=1.1.0.0, Culture=neutral, processorArchitecture=x86">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\Libs\CMS_CORE_Library.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
@@ -49,9 +45,7 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="NcFileAdapter.cs" />
|
||||
<Compile Include="NcAdapter.cs" />
|
||||
<Compile Include="NcToolTableAdapter.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="SiemensToolTableAdapter.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
@@ -72,6 +66,10 @@
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\cms_core_library\CMS_CORE_Library\CMS_CORE_Library.csproj">
|
||||
<Project>{4abf8eef-2b23-483e-acdc-53214fe28681}</Project>
|
||||
<Name>CMS_CORE_Library</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Thermo.Active.Config\Thermo.Active.Config.csproj">
|
||||
<Project>{3f5c2483-fc87-43ef-92a8-66ff7d0e440f}</Project>
|
||||
<Name>Thermo.Active.Config</Name>
|
||||
|
||||
@@ -34,10 +34,6 @@
|
||||
<ApplicationIcon>Resources\CMS_Icon.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="CMS_CORE_Library, Version=1.1.0.0, Culture=neutral, processorArchitecture=x86">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\Libs\CMS_CORE_Library.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
@@ -139,6 +135,10 @@
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\cms_core_library\CMS_CORE_Library\CMS_CORE_Library.csproj">
|
||||
<Project>{4abf8eef-2b23-483e-acdc-53214fe28681}</Project>
|
||||
<Name>CMS_CORE_Library</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Thermo.Active.Config\Thermo.Active.Config.csproj">
|
||||
<Project>{3f5c2483-fc87-43ef-92a8-66ff7d0e440f}</Project>
|
||||
<Name>Thermo.Active.Config</Name>
|
||||
|
||||
@@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
|
||||
// Le informazioni generali relative a un assembly sono controllate dal seguente
|
||||
// set di attributi. Modificare i valori di questi attributi per modificare le informazioni
|
||||
// associate a un assembly.
|
||||
[assembly: AssemblyTitle("Step.Utils")]
|
||||
[assembly: AssemblyTitle("Thermo.Active.Utils")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Step.Utils")]
|
||||
[assembly: AssemblyProduct("Thermo.Active.Utils")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2017")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
@@ -32,10 +32,6 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="CMS_CORE_Library, Version=1.1.0.0, Culture=neutral, processorArchitecture=x86">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\Libs\CMS_CORE_Library.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MySql.Data, Version=6.10.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MySql.Data.6.10.4\lib\net452\MySql.Data.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -146,6 +142,10 @@
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\cms_core_library\CMS_CORE_Library\CMS_CORE_Library.csproj">
|
||||
<Project>{4abf8eef-2b23-483e-acdc-53214fe28681}</Project>
|
||||
<Name>CMS_CORE_Library</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Thermo.Active.Model\Thermo.Active.Model.csproj">
|
||||
<Project>{631375DD-06D3-49BB-8130-D9DDB34C429D}</Project>
|
||||
<Name>Thermo.Active.Model</Name>
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Thermo.Active.Utils
|
||||
{
|
||||
private static readonly string CMSCONNECT_TOKEN = "59f1qik5PYfiJLiXZ4xZ05pjzx5E9FscQWtj4lmfLKXaF1OAxkvu7ziBzXFBuuVQ";
|
||||
|
||||
public static SOFTKEY_TYPE GetSoftKeyType(string type)
|
||||
public static SOFTKEY_TYPE GetSoftKeyType(string type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -40,6 +40,17 @@ namespace Thermo.Active.Utils
|
||||
}
|
||||
}
|
||||
|
||||
public static TACT_PARAM_TYPE GetTActCategory(string strCategory)
|
||||
{
|
||||
TACT_PARAM_TYPE answ = TACT_PARAM_TYPE.ND;
|
||||
try
|
||||
{
|
||||
answ = (TACT_PARAM_TYPE)Enum.Parse(typeof(TACT_PARAM_TYPE), strCategory);
|
||||
}
|
||||
catch { }
|
||||
return answ;
|
||||
}
|
||||
|
||||
public static int GetPlcIdFromNcSoftKey(string softKey)
|
||||
{
|
||||
switch (softKey)
|
||||
@@ -72,7 +83,7 @@ namespace Thermo.Active.Utils
|
||||
case "xTen": return 26;
|
||||
case "xHundred": return 27;
|
||||
case "xThousand": return 28;
|
||||
case "overstroke": return 30;
|
||||
case "overstroke": return 30;
|
||||
case "feedByPass": return 31;
|
||||
default: return -1;
|
||||
}
|
||||
@@ -153,7 +164,7 @@ namespace Thermo.Active.Utils
|
||||
|
||||
List<short> listOfPossibleIds = Enumerable.Range(1, objIds.Max() + 1).Select(x => (short)x).ToList();
|
||||
|
||||
IEnumerable<short> res = listOfPossibleIds.Except(objIds).ToList();
|
||||
IEnumerable<short> res = listOfPossibleIds.Except(objIds).ToList();
|
||||
|
||||
if (res.Count() > 0)
|
||||
return res.First();
|
||||
@@ -162,7 +173,7 @@ namespace Thermo.Active.Utils
|
||||
}
|
||||
|
||||
public static string GetImageBase64String(string directoryPath, string imageName)
|
||||
{
|
||||
{
|
||||
string fileName = Path.GetFileNameWithoutExtension(imageName);
|
||||
foreach (string ext in VALID_IMAGE_EXTENSIONS)
|
||||
{
|
||||
@@ -199,7 +210,7 @@ namespace Thermo.Active.Utils
|
||||
return null;
|
||||
|
||||
EmptyFolder(jobFolderPath);
|
||||
|
||||
|
||||
using (ZipArchive zipExtractor = ZipFile.OpenRead(filePath))
|
||||
{
|
||||
// Setup main job fields
|
||||
@@ -249,7 +260,6 @@ namespace Thermo.Active.Utils
|
||||
{
|
||||
job.Metadata.Generics.Description = metasFromFile.Description;
|
||||
job.Metadata.Generics.ExecutionTime = metasFromFile.ExecutionTime;
|
||||
job.Metadata.Tools = metasFromFile.Tools;
|
||||
job.Metadata.Customs = metasFromFile.Customs;
|
||||
}
|
||||
}
|
||||
@@ -308,7 +318,7 @@ namespace Thermo.Active.Utils
|
||||
string filePath = JOB_TMP_DIRECTORY + "\\" + processId + "\\";
|
||||
if (!Directory.Exists(filePath))
|
||||
return null;
|
||||
|
||||
|
||||
// Setup main Fields
|
||||
DTOJobModel jobData = new DTOJobModel()
|
||||
{
|
||||
@@ -349,7 +359,6 @@ namespace Thermo.Active.Utils
|
||||
{
|
||||
jobData.Metadata.Generics.Description = metasFromFile.Description;
|
||||
jobData.Metadata.Generics.ExecutionTime = metasFromFile.ExecutionTime;
|
||||
jobData.Metadata.Tools = metasFromFile.Tools;
|
||||
jobData.Metadata.Customs = metasFromFile.Customs;
|
||||
}
|
||||
}
|
||||
@@ -374,7 +383,7 @@ namespace Thermo.Active.Utils
|
||||
return SCADA_MEM_TYPE.WORD;
|
||||
|
||||
case "INT":
|
||||
return SCADA_MEM_TYPE.INT;
|
||||
return SCADA_MEM_TYPE.INT;
|
||||
|
||||
case "REAL":
|
||||
return SCADA_MEM_TYPE.REAL;
|
||||
@@ -409,7 +418,7 @@ namespace Thermo.Active.Utils
|
||||
|
||||
public static string GetSoftwareVersionAndBuildDate()
|
||||
{
|
||||
Version v = Assembly.GetEntryAssembly()?.GetName().Version;
|
||||
Version v = Assembly.GetEntryAssembly()?.GetName().Version;
|
||||
if (v != null)
|
||||
{
|
||||
// Get first 2 number of the version
|
||||
@@ -426,7 +435,7 @@ namespace Thermo.Active.Utils
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static Boolean DecodeCMSConnectGatewayLogin(string encryptedString, out string login, out string password)
|
||||
{
|
||||
@@ -498,7 +507,10 @@ namespace Thermo.Active.Utils
|
||||
{
|
||||
intMachineVal = 0;
|
||||
containsLetters = Regex.IsMatch(machineNumber, @".*?[a-zA-Z].*?");
|
||||
|
||||
if (string.IsNullOrEmpty(machineNumber))
|
||||
{
|
||||
machineNumber = "0000";
|
||||
}
|
||||
if (containsLetters)
|
||||
// Convert ASCII string to a single INT
|
||||
intMachineVal = SupportFunctions.ConvertAsciiStringToInt(machineNumber);
|
||||
|
||||
@@ -39,11 +39,16 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Client.Chromium", "Client.C
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Thermo.Active.CmsConnectGateway", "Thermo.Active.CmsConnectGateway\Thermo.Active.CmsConnectGateway.csproj", "{49B04D99-0ECD-4900-86D3-7098D61314D7}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CMS_CORE_Library", "..\cms_core_library\CMS_CORE_Library\CMS_CORE_Library.csproj", "{4ABF8EEF-2B23-483E-ACDC-53214FE28681}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Debug2|Any CPU = Debug2|Any CPU
|
||||
Debug2|x64 = Debug2|x64
|
||||
Debug2|x86 = Debug2|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
@@ -55,6 +60,12 @@ Global
|
||||
{AFED34E1-77DB-4D81-830A-A8D0A190573D}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{AFED34E1-77DB-4D81-830A-A8D0A190573D}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{AFED34E1-77DB-4D81-830A-A8D0A190573D}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{AFED34E1-77DB-4D81-830A-A8D0A190573D}.Debug2|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AFED34E1-77DB-4D81-830A-A8D0A190573D}.Debug2|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AFED34E1-77DB-4D81-830A-A8D0A190573D}.Debug2|x64.ActiveCfg = Debug|Any CPU
|
||||
{AFED34E1-77DB-4D81-830A-A8D0A190573D}.Debug2|x64.Build.0 = Debug|Any CPU
|
||||
{AFED34E1-77DB-4D81-830A-A8D0A190573D}.Debug2|x86.ActiveCfg = Debug|Any CPU
|
||||
{AFED34E1-77DB-4D81-830A-A8D0A190573D}.Debug2|x86.Build.0 = Debug|Any CPU
|
||||
{AFED34E1-77DB-4D81-830A-A8D0A190573D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AFED34E1-77DB-4D81-830A-A8D0A190573D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{AFED34E1-77DB-4D81-830A-A8D0A190573D}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
@@ -67,6 +78,12 @@ Global
|
||||
{631375DD-06D3-49BB-8130-D9DDB34C429D}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{631375DD-06D3-49BB-8130-D9DDB34C429D}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{631375DD-06D3-49BB-8130-D9DDB34C429D}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{631375DD-06D3-49BB-8130-D9DDB34C429D}.Debug2|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{631375DD-06D3-49BB-8130-D9DDB34C429D}.Debug2|Any CPU.Build.0 = Debug|Any CPU
|
||||
{631375DD-06D3-49BB-8130-D9DDB34C429D}.Debug2|x64.ActiveCfg = Debug|Any CPU
|
||||
{631375DD-06D3-49BB-8130-D9DDB34C429D}.Debug2|x64.Build.0 = Debug|Any CPU
|
||||
{631375DD-06D3-49BB-8130-D9DDB34C429D}.Debug2|x86.ActiveCfg = Debug|Any CPU
|
||||
{631375DD-06D3-49BB-8130-D9DDB34C429D}.Debug2|x86.Build.0 = Debug|Any CPU
|
||||
{631375DD-06D3-49BB-8130-D9DDB34C429D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{631375DD-06D3-49BB-8130-D9DDB34C429D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{631375DD-06D3-49BB-8130-D9DDB34C429D}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
@@ -79,6 +96,12 @@ Global
|
||||
{20FC0937-E7CA-4693-95F9-7A948EFD173B}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{20FC0937-E7CA-4693-95F9-7A948EFD173B}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{20FC0937-E7CA-4693-95F9-7A948EFD173B}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{20FC0937-E7CA-4693-95F9-7A948EFD173B}.Debug2|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{20FC0937-E7CA-4693-95F9-7A948EFD173B}.Debug2|Any CPU.Build.0 = Debug|Any CPU
|
||||
{20FC0937-E7CA-4693-95F9-7A948EFD173B}.Debug2|x64.ActiveCfg = Debug|Any CPU
|
||||
{20FC0937-E7CA-4693-95F9-7A948EFD173B}.Debug2|x64.Build.0 = Debug|Any CPU
|
||||
{20FC0937-E7CA-4693-95F9-7A948EFD173B}.Debug2|x86.ActiveCfg = Debug|Any CPU
|
||||
{20FC0937-E7CA-4693-95F9-7A948EFD173B}.Debug2|x86.Build.0 = Debug|Any CPU
|
||||
{20FC0937-E7CA-4693-95F9-7A948EFD173B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{20FC0937-E7CA-4693-95F9-7A948EFD173B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{20FC0937-E7CA-4693-95F9-7A948EFD173B}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
@@ -91,6 +114,12 @@ Global
|
||||
{357D5EE1-FFC8-489B-9232-22CF474D9A6F}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{357D5EE1-FFC8-489B-9232-22CF474D9A6F}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{357D5EE1-FFC8-489B-9232-22CF474D9A6F}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{357D5EE1-FFC8-489B-9232-22CF474D9A6F}.Debug2|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{357D5EE1-FFC8-489B-9232-22CF474D9A6F}.Debug2|Any CPU.Build.0 = Debug|Any CPU
|
||||
{357D5EE1-FFC8-489B-9232-22CF474D9A6F}.Debug2|x64.ActiveCfg = Debug|Any CPU
|
||||
{357D5EE1-FFC8-489B-9232-22CF474D9A6F}.Debug2|x64.Build.0 = Debug|Any CPU
|
||||
{357D5EE1-FFC8-489B-9232-22CF474D9A6F}.Debug2|x86.ActiveCfg = Debug|Any CPU
|
||||
{357D5EE1-FFC8-489B-9232-22CF474D9A6F}.Debug2|x86.Build.0 = Debug|Any CPU
|
||||
{357D5EE1-FFC8-489B-9232-22CF474D9A6F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{357D5EE1-FFC8-489B-9232-22CF474D9A6F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{357D5EE1-FFC8-489B-9232-22CF474D9A6F}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
@@ -103,6 +132,12 @@ Global
|
||||
{3F5C2483-FC87-43EF-92A8-66FF7D0E440F}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{3F5C2483-FC87-43EF-92A8-66FF7D0E440F}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{3F5C2483-FC87-43EF-92A8-66FF7D0E440F}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{3F5C2483-FC87-43EF-92A8-66FF7D0E440F}.Debug2|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3F5C2483-FC87-43EF-92A8-66FF7D0E440F}.Debug2|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3F5C2483-FC87-43EF-92A8-66FF7D0E440F}.Debug2|x64.ActiveCfg = Debug|Any CPU
|
||||
{3F5C2483-FC87-43EF-92A8-66FF7D0E440F}.Debug2|x64.Build.0 = Debug|Any CPU
|
||||
{3F5C2483-FC87-43EF-92A8-66FF7D0E440F}.Debug2|x86.ActiveCfg = Debug|Any CPU
|
||||
{3F5C2483-FC87-43EF-92A8-66FF7D0E440F}.Debug2|x86.Build.0 = Debug|Any CPU
|
||||
{3F5C2483-FC87-43EF-92A8-66FF7D0E440F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3F5C2483-FC87-43EF-92A8-66FF7D0E440F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{3F5C2483-FC87-43EF-92A8-66FF7D0E440F}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
@@ -115,6 +150,12 @@ Global
|
||||
{66FA29DB-925A-402B-A4C7-D3D780FB1BC3}.Debug|x64.Build.0 = Debug|x64
|
||||
{66FA29DB-925A-402B-A4C7-D3D780FB1BC3}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{66FA29DB-925A-402B-A4C7-D3D780FB1BC3}.Debug|x86.Build.0 = Debug|x86
|
||||
{66FA29DB-925A-402B-A4C7-D3D780FB1BC3}.Debug2|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{66FA29DB-925A-402B-A4C7-D3D780FB1BC3}.Debug2|Any CPU.Build.0 = Debug|Any CPU
|
||||
{66FA29DB-925A-402B-A4C7-D3D780FB1BC3}.Debug2|x64.ActiveCfg = Debug|x64
|
||||
{66FA29DB-925A-402B-A4C7-D3D780FB1BC3}.Debug2|x64.Build.0 = Debug|x64
|
||||
{66FA29DB-925A-402B-A4C7-D3D780FB1BC3}.Debug2|x86.ActiveCfg = Debug|x86
|
||||
{66FA29DB-925A-402B-A4C7-D3D780FB1BC3}.Debug2|x86.Build.0 = Debug|x86
|
||||
{66FA29DB-925A-402B-A4C7-D3D780FB1BC3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{66FA29DB-925A-402B-A4C7-D3D780FB1BC3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{66FA29DB-925A-402B-A4C7-D3D780FB1BC3}.Release|x64.ActiveCfg = Release|x64
|
||||
@@ -127,6 +168,12 @@ Global
|
||||
{CBEB631B-ABFA-4042-9779-C0060B0DFEFE}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{CBEB631B-ABFA-4042-9779-C0060B0DFEFE}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{CBEB631B-ABFA-4042-9779-C0060B0DFEFE}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{CBEB631B-ABFA-4042-9779-C0060B0DFEFE}.Debug2|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CBEB631B-ABFA-4042-9779-C0060B0DFEFE}.Debug2|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CBEB631B-ABFA-4042-9779-C0060B0DFEFE}.Debug2|x64.ActiveCfg = Debug|Any CPU
|
||||
{CBEB631B-ABFA-4042-9779-C0060B0DFEFE}.Debug2|x64.Build.0 = Debug|Any CPU
|
||||
{CBEB631B-ABFA-4042-9779-C0060B0DFEFE}.Debug2|x86.ActiveCfg = Debug|Any CPU
|
||||
{CBEB631B-ABFA-4042-9779-C0060B0DFEFE}.Debug2|x86.Build.0 = Debug|Any CPU
|
||||
{CBEB631B-ABFA-4042-9779-C0060B0DFEFE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CBEB631B-ABFA-4042-9779-C0060B0DFEFE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CBEB631B-ABFA-4042-9779-C0060B0DFEFE}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
@@ -139,6 +186,12 @@ Global
|
||||
{205A6ADE-FB5A-45CB-9C51-9817E7BB8939}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{205A6ADE-FB5A-45CB-9C51-9817E7BB8939}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{205A6ADE-FB5A-45CB-9C51-9817E7BB8939}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{205A6ADE-FB5A-45CB-9C51-9817E7BB8939}.Debug2|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{205A6ADE-FB5A-45CB-9C51-9817E7BB8939}.Debug2|Any CPU.Build.0 = Debug|Any CPU
|
||||
{205A6ADE-FB5A-45CB-9C51-9817E7BB8939}.Debug2|x64.ActiveCfg = Debug|Any CPU
|
||||
{205A6ADE-FB5A-45CB-9C51-9817E7BB8939}.Debug2|x64.Build.0 = Debug|Any CPU
|
||||
{205A6ADE-FB5A-45CB-9C51-9817E7BB8939}.Debug2|x86.ActiveCfg = Debug|Any CPU
|
||||
{205A6ADE-FB5A-45CB-9C51-9817E7BB8939}.Debug2|x86.Build.0 = Debug|Any CPU
|
||||
{205A6ADE-FB5A-45CB-9C51-9817E7BB8939}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{205A6ADE-FB5A-45CB-9C51-9817E7BB8939}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{205A6ADE-FB5A-45CB-9C51-9817E7BB8939}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
@@ -151,6 +204,12 @@ Global
|
||||
{34434B22-D546-4A5C-B575-49720C77643A}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{34434B22-D546-4A5C-B575-49720C77643A}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{34434B22-D546-4A5C-B575-49720C77643A}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{34434B22-D546-4A5C-B575-49720C77643A}.Debug2|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{34434B22-D546-4A5C-B575-49720C77643A}.Debug2|Any CPU.Build.0 = Debug|Any CPU
|
||||
{34434B22-D546-4A5C-B575-49720C77643A}.Debug2|x64.ActiveCfg = Debug|Any CPU
|
||||
{34434B22-D546-4A5C-B575-49720C77643A}.Debug2|x64.Build.0 = Debug|Any CPU
|
||||
{34434B22-D546-4A5C-B575-49720C77643A}.Debug2|x86.ActiveCfg = Debug|Any CPU
|
||||
{34434B22-D546-4A5C-B575-49720C77643A}.Debug2|x86.Build.0 = Debug|Any CPU
|
||||
{34434B22-D546-4A5C-B575-49720C77643A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{34434B22-D546-4A5C-B575-49720C77643A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{34434B22-D546-4A5C-B575-49720C77643A}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
@@ -163,6 +222,12 @@ Global
|
||||
{DE54FF4C-8390-4489-882A-1BC7D99EF185}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{DE54FF4C-8390-4489-882A-1BC7D99EF185}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{DE54FF4C-8390-4489-882A-1BC7D99EF185}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{DE54FF4C-8390-4489-882A-1BC7D99EF185}.Debug2|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DE54FF4C-8390-4489-882A-1BC7D99EF185}.Debug2|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DE54FF4C-8390-4489-882A-1BC7D99EF185}.Debug2|x64.ActiveCfg = Debug|Any CPU
|
||||
{DE54FF4C-8390-4489-882A-1BC7D99EF185}.Debug2|x64.Build.0 = Debug|Any CPU
|
||||
{DE54FF4C-8390-4489-882A-1BC7D99EF185}.Debug2|x86.ActiveCfg = Debug|Any CPU
|
||||
{DE54FF4C-8390-4489-882A-1BC7D99EF185}.Debug2|x86.Build.0 = Debug|Any CPU
|
||||
{DE54FF4C-8390-4489-882A-1BC7D99EF185}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DE54FF4C-8390-4489-882A-1BC7D99EF185}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DE54FF4C-8390-4489-882A-1BC7D99EF185}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
@@ -175,6 +240,12 @@ Global
|
||||
{B2366B08-96BD-4F6B-B748-B45089B87A14}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{B2366B08-96BD-4F6B-B748-B45089B87A14}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{B2366B08-96BD-4F6B-B748-B45089B87A14}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{B2366B08-96BD-4F6B-B748-B45089B87A14}.Debug2|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B2366B08-96BD-4F6B-B748-B45089B87A14}.Debug2|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B2366B08-96BD-4F6B-B748-B45089B87A14}.Debug2|x64.ActiveCfg = Debug|Any CPU
|
||||
{B2366B08-96BD-4F6B-B748-B45089B87A14}.Debug2|x64.Build.0 = Debug|Any CPU
|
||||
{B2366B08-96BD-4F6B-B748-B45089B87A14}.Debug2|x86.ActiveCfg = Debug|Any CPU
|
||||
{B2366B08-96BD-4F6B-B748-B45089B87A14}.Debug2|x86.Build.0 = Debug|Any CPU
|
||||
{B2366B08-96BD-4F6B-B748-B45089B87A14}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B2366B08-96BD-4F6B-B748-B45089B87A14}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B2366B08-96BD-4F6B-B748-B45089B87A14}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
@@ -187,6 +258,12 @@ Global
|
||||
{F9F17F23-660E-488C-A7FA-6A5B35D64313}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{F9F17F23-660E-488C-A7FA-6A5B35D64313}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{F9F17F23-660E-488C-A7FA-6A5B35D64313}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{F9F17F23-660E-488C-A7FA-6A5B35D64313}.Debug2|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F9F17F23-660E-488C-A7FA-6A5B35D64313}.Debug2|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F9F17F23-660E-488C-A7FA-6A5B35D64313}.Debug2|x64.ActiveCfg = Debug|Any CPU
|
||||
{F9F17F23-660E-488C-A7FA-6A5B35D64313}.Debug2|x64.Build.0 = Debug|Any CPU
|
||||
{F9F17F23-660E-488C-A7FA-6A5B35D64313}.Debug2|x86.ActiveCfg = Debug|Any CPU
|
||||
{F9F17F23-660E-488C-A7FA-6A5B35D64313}.Debug2|x86.Build.0 = Debug|Any CPU
|
||||
{F9F17F23-660E-488C-A7FA-6A5B35D64313}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F9F17F23-660E-488C-A7FA-6A5B35D64313}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F9F17F23-660E-488C-A7FA-6A5B35D64313}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
@@ -199,12 +276,36 @@ Global
|
||||
{49B04D99-0ECD-4900-86D3-7098D61314D7}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{49B04D99-0ECD-4900-86D3-7098D61314D7}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{49B04D99-0ECD-4900-86D3-7098D61314D7}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{49B04D99-0ECD-4900-86D3-7098D61314D7}.Debug2|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{49B04D99-0ECD-4900-86D3-7098D61314D7}.Debug2|Any CPU.Build.0 = Debug|Any CPU
|
||||
{49B04D99-0ECD-4900-86D3-7098D61314D7}.Debug2|x64.ActiveCfg = Debug|Any CPU
|
||||
{49B04D99-0ECD-4900-86D3-7098D61314D7}.Debug2|x64.Build.0 = Debug|Any CPU
|
||||
{49B04D99-0ECD-4900-86D3-7098D61314D7}.Debug2|x86.ActiveCfg = Debug|Any CPU
|
||||
{49B04D99-0ECD-4900-86D3-7098D61314D7}.Debug2|x86.Build.0 = Debug|Any CPU
|
||||
{49B04D99-0ECD-4900-86D3-7098D61314D7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{49B04D99-0ECD-4900-86D3-7098D61314D7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{49B04D99-0ECD-4900-86D3-7098D61314D7}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{49B04D99-0ECD-4900-86D3-7098D61314D7}.Release|x64.Build.0 = Release|Any CPU
|
||||
{49B04D99-0ECD-4900-86D3-7098D61314D7}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{49B04D99-0ECD-4900-86D3-7098D61314D7}.Release|x86.Build.0 = Release|Any CPU
|
||||
{4ABF8EEF-2B23-483E-ACDC-53214FE28681}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4ABF8EEF-2B23-483E-ACDC-53214FE28681}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4ABF8EEF-2B23-483E-ACDC-53214FE28681}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{4ABF8EEF-2B23-483E-ACDC-53214FE28681}.Debug|x64.Build.0 = Debug|x64
|
||||
{4ABF8EEF-2B23-483E-ACDC-53214FE28681}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{4ABF8EEF-2B23-483E-ACDC-53214FE28681}.Debug|x86.Build.0 = Debug|x86
|
||||
{4ABF8EEF-2B23-483E-ACDC-53214FE28681}.Debug2|Any CPU.ActiveCfg = Debug2|Any CPU
|
||||
{4ABF8EEF-2B23-483E-ACDC-53214FE28681}.Debug2|Any CPU.Build.0 = Debug2|Any CPU
|
||||
{4ABF8EEF-2B23-483E-ACDC-53214FE28681}.Debug2|x64.ActiveCfg = Debug2|x64
|
||||
{4ABF8EEF-2B23-483E-ACDC-53214FE28681}.Debug2|x64.Build.0 = Debug2|x64
|
||||
{4ABF8EEF-2B23-483E-ACDC-53214FE28681}.Debug2|x86.ActiveCfg = Debug2|x86
|
||||
{4ABF8EEF-2B23-483E-ACDC-53214FE28681}.Debug2|x86.Build.0 = Debug2|x86
|
||||
{4ABF8EEF-2B23-483E-ACDC-53214FE28681}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4ABF8EEF-2B23-483E-ACDC-53214FE28681}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4ABF8EEF-2B23-483E-ACDC-53214FE28681}.Release|x64.ActiveCfg = Release|x64
|
||||
{4ABF8EEF-2B23-483E-ACDC-53214FE28681}.Release|x64.Build.0 = Release|x64
|
||||
{4ABF8EEF-2B23-483E-ACDC-53214FE28681}.Release|x86.ActiveCfg = Release|x86
|
||||
{4ABF8EEF-2B23-483E-ACDC-53214FE28681}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
+149
-77
@@ -4,81 +4,153 @@
|
||||
https://go.microsoft.com/fwlink/?LinkId=301879
|
||||
-->
|
||||
<configuration>
|
||||
<configSections>
|
||||
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||
</configSections>
|
||||
<startup useLegacyV2RuntimeActivationPolicy="true">
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
|
||||
</startup>
|
||||
<appSettings>
|
||||
<add key="enableDirectoryBrowsing" value="true" />
|
||||
<add key="ClientSettingsProvider.ServiceUri" value="" />
|
||||
<add key="ServerServiceName" value="MariaDB"/>
|
||||
</appSettings>
|
||||
<system.web>
|
||||
<compilation debug="true" targetFramework="4.6.2" />
|
||||
<httpRuntime targetFramework="4.6.2" />
|
||||
<httpModules>
|
||||
</httpModules>
|
||||
<membership defaultProvider="ClientAuthenticationMembershipProvider">
|
||||
<providers>
|
||||
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
|
||||
</providers>
|
||||
</membership>
|
||||
<roleManager defaultProvider="ClientRoleProvider" enabled="true">
|
||||
<providers>
|
||||
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
|
||||
</providers>
|
||||
</roleManager>
|
||||
</system.web>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-6.10.4.0" newVersion="6.10.4.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Cors" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<connectionStrings>
|
||||
<add name="mySQLDatabaseConnection" providerName="MySql.Data.MySqlClient" connectionString="Server=localhost;Database=step;Uid=root;Pwd=root;" />
|
||||
</connectionStrings>
|
||||
<entityFramework>
|
||||
<defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6" />
|
||||
<providers>
|
||||
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.10.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d">
|
||||
</provider>
|
||||
</providers>
|
||||
</entityFramework>
|
||||
<configSections>
|
||||
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||
</configSections>
|
||||
<startup useLegacyV2RuntimeActivationPolicy="true">
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
|
||||
</startup>
|
||||
<appSettings>
|
||||
<add key="enableDirectoryBrowsing" value="true" />
|
||||
<add key="ClientSettingsProvider.ServiceUri" value="" />
|
||||
<add key="ServerServiceName" value="MariaDB" />
|
||||
</appSettings>
|
||||
<system.web>
|
||||
<compilation debug="true" targetFramework="4.6.2" />
|
||||
<httpRuntime targetFramework="4.6.2" />
|
||||
<httpModules>
|
||||
</httpModules>
|
||||
<membership defaultProvider="ClientAuthenticationMembershipProvider">
|
||||
<providers>
|
||||
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
|
||||
</providers>
|
||||
</membership>
|
||||
<roleManager defaultProvider="ClientRoleProvider" enabled="true">
|
||||
<providers>
|
||||
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
|
||||
</providers>
|
||||
</roleManager>
|
||||
</system.web>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-6.10.4.0" newVersion="6.10.4.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Cors" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Windows.Interactivity" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.5.0.0" newVersion="4.5.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<connectionStrings>
|
||||
<add name="mySQLDatabaseConnection" providerName="MySql.Data.MySqlClient" connectionString="Server=localhost;Database=step;Uid=root;Pwd=root;" />
|
||||
</connectionStrings>
|
||||
<entityFramework>
|
||||
<defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6" />
|
||||
<providers>
|
||||
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.10.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d">
|
||||
</provider>
|
||||
</providers>
|
||||
</entityFramework>
|
||||
<system.diagnostics>
|
||||
<sources>
|
||||
<source name="SignalR.SqlMessageBus">
|
||||
<listeners>
|
||||
<add name="SignalR-Bus" />
|
||||
</listeners>
|
||||
</source>
|
||||
<source name="SignalR.ServiceBusMessageBus">
|
||||
<listeners>
|
||||
<add name="SignalR-Bus" />
|
||||
</listeners>
|
||||
</source>
|
||||
<source name="SignalR.RedisMessageBus">
|
||||
<listeners>
|
||||
<add name="SignalR-Bus" />
|
||||
</listeners>
|
||||
</source>
|
||||
<source name="SignalR.ScaleoutMessageBus">
|
||||
<listeners>
|
||||
<add name="SignalR-Bus" />
|
||||
</listeners>
|
||||
</source>
|
||||
<source name="SignalR.Transports.WebSocketTransport">
|
||||
<listeners>
|
||||
<add name="SignalR-Transports" />
|
||||
</listeners>
|
||||
</source>
|
||||
<source name="SignalR.Transports.ServerSentEventsTransport">
|
||||
<listeners>
|
||||
<add name="SignalR-Transports" />
|
||||
</listeners>
|
||||
</source>
|
||||
<source name="SignalR.Transports.ForeverFrameTransport">
|
||||
<listeners>
|
||||
<add name="SignalR-Transports" />
|
||||
</listeners>
|
||||
</source>
|
||||
<source name="SignalR.Transports.LongPollingTransport">
|
||||
<listeners>
|
||||
<add name="SignalR-Transports" />
|
||||
</listeners>
|
||||
</source>
|
||||
<source name="SignalR.Transports.TransportHeartBeat">
|
||||
<listeners>
|
||||
<add name="SignalR-Transports" />
|
||||
</listeners>
|
||||
</source>
|
||||
<source name="SignalR.ReflectedHubDescriptorProvider">
|
||||
<listeners>
|
||||
<add name="SignalR-Init" />
|
||||
</listeners>
|
||||
</source>
|
||||
</sources>
|
||||
<!-- Sets the trace verbosity level -->
|
||||
<switches>
|
||||
<add name="SignalRSwitch" value="Verbose" />
|
||||
</switches>
|
||||
<!-- Specifies the trace writer for output -->
|
||||
<sharedListeners>
|
||||
<!-- Listener for transport events -->
|
||||
<add name="SignalR-Transports" type="System.Diagnostics.TextWriterTraceListener" initializeData="logs/transports.log" />
|
||||
<!-- Listener for scaleout provider events -->
|
||||
<add name="SignalR-Bus" type="System.Diagnostics.TextWriterTraceListener" initializeData="logs/bus.log" />
|
||||
<!-- Listener for hub discovery events -->
|
||||
<add name="SignalR-Init" type="System.Diagnostics.TextWriterTraceListener" initializeData="logs/init.log" />
|
||||
</sharedListeners>
|
||||
<trace autoflush="true" />
|
||||
</system.diagnostics>
|
||||
</configuration>
|
||||
@@ -64,7 +64,7 @@ namespace Thermo.Active.App_Start
|
||||
RequestPath = PathString.Empty,
|
||||
FileSystem = new PhysicalFileSystem(WEBSITE_DIRECTORY)
|
||||
};
|
||||
|
||||
|
||||
app.UseFileServer(options);
|
||||
if (!ServerPortIsAvailable(ServerStartupConfig.ServerPort))
|
||||
{
|
||||
@@ -106,7 +106,7 @@ namespace Thermo.Active.App_Start
|
||||
app.Map("/signalr", map =>
|
||||
{
|
||||
map.UseCors(CorsOptions.AllowAll);
|
||||
|
||||
|
||||
map.UseOAuthBearerAuthentication(new OAuthBearerAuthenticationOptions()
|
||||
{
|
||||
Provider = new SignalROAuthBearerProvider(),
|
||||
|
||||
@@ -8,6 +8,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Http;
|
||||
using static Thermo.Active.Config.ServerConfig;
|
||||
using Thermo.Active.Model.DTOModels.Recipe;
|
||||
|
||||
namespace Thermo.Active.Controllers.WebApi
|
||||
{
|
||||
@@ -24,7 +25,6 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
ScadaConfig = ScadaConfig,
|
||||
MaintenanceConfig = MaintenanceConfig,
|
||||
ReportConfig = ReportConfig,
|
||||
ToolingConfig = ToolingConfig,
|
||||
UtilitiesConfig = UtilitiesConfig,
|
||||
JobEditorConfig = JobEditorConfig,
|
||||
UsersConfig = UsersConfig
|
||||
@@ -103,6 +103,49 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
return Ok(heads);
|
||||
}
|
||||
|
||||
[Route("recipe"), HttpGet]
|
||||
public IHttpActionResult GetRecipeConfig()
|
||||
{
|
||||
List<DTORecipeConfigModel> recipeConfig = RecipeConfig.Select(x => new DTORecipeConfigModel()
|
||||
{
|
||||
Id = x.Id,
|
||||
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()
|
||||
}).ToList();
|
||||
|
||||
return Ok(recipeConfig);
|
||||
}
|
||||
|
||||
#if false
|
||||
[Route("ThermoParams"), HttpGet]
|
||||
public IHttpActionResult GetThermoParamsConfig()
|
||||
{
|
||||
// TODO FIXME
|
||||
|
||||
// passa i parametri di configurazione es min/max dei gauge...
|
||||
|
||||
|
||||
List<DTORecipeConfigModel> recipeConfig = RecipeConfig.Select(x => new DTORecipeConfigModel()
|
||||
{
|
||||
Id = x.Id,
|
||||
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()
|
||||
}).ToList();
|
||||
|
||||
return Ok(recipeConfig);
|
||||
}
|
||||
#endif
|
||||
|
||||
[Route("alarms"), HttpGet]
|
||||
public IHttpActionResult GetAlarmsConfig()
|
||||
{
|
||||
@@ -127,20 +170,6 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
return Ok(alarmsConfig);
|
||||
}
|
||||
|
||||
[Route("tool_manager"), HttpGet]
|
||||
public IHttpActionResult GetToolTableConfiguration()
|
||||
{
|
||||
using (SiemensToolTableAdapter ncAdapter = new SiemensToolTableAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
CmsError libraryError = ncAdapter.GetToolTableConfiguration(out ToolTableConfiguration toolTableConfiguration);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(toolTableConfiguration);
|
||||
}
|
||||
}
|
||||
|
||||
[Route("cmscontact"), HttpGet]
|
||||
public IHttpActionResult GetCmsContact()
|
||||
{
|
||||
|
||||
@@ -54,20 +54,9 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
Dictionary<string, string> alarmsNames = GetPlcAlarmsTranslations(language);
|
||||
Dictionary<string, string> headsNames = GetLocalizedHeadsNames(language);
|
||||
|
||||
Dictionary<string, string> magazinesNames = GetToolManagerTranslations(language);
|
||||
|
||||
Dictionary<string, string> scadaTranslations = GetScadaTranslations(language);
|
||||
|
||||
// Cooling
|
||||
if (NcConfig.NcVendor != NC_VENDOR.SIEMENS)
|
||||
{
|
||||
Dictionary<string, string> coolingNames = GetCoolingTranslations(language);
|
||||
foreach (var coolingItem in coolingNames)
|
||||
{
|
||||
translations[coolingItem.Key] = coolingItem.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Concat maintenances dictionary with translations dictionary
|
||||
translations = translations.Concat(maintenanceNames).ToDictionary(x => x.Key, x => x.Value);
|
||||
// Softkeys
|
||||
@@ -76,8 +65,6 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
translations = translations.Concat(alarmsNames).ToDictionary(x => x.Key, x => x.Value);
|
||||
// Heads
|
||||
translations = translations.Concat(headsNames).ToDictionary(x => x.Key, x => x.Value);
|
||||
// Magazines
|
||||
translations = translations.Concat(magazinesNames).ToDictionary(x => x.Key, x => x.Value);
|
||||
// Scada
|
||||
translations = translations.Concat(scadaTranslations).ToDictionary(x => x.Key, x => x.Value);
|
||||
|
||||
@@ -127,6 +114,7 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
private static string GetValueFromLocalizationList(Dictionary<string, string> localizedNames, string language, string defaultString)
|
||||
{
|
||||
// Find text from names by language id
|
||||
@@ -173,86 +161,6 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
}
|
||||
}
|
||||
|
||||
private static Dictionary<string, string> GetCoolingTranslations(string language)
|
||||
{
|
||||
Dictionary<string, string> dictionary = new Dictionary<string, string>();
|
||||
|
||||
// Find translated key
|
||||
var key = ToolManagerConfig.CooligsTranslations.Cooling.Where(x => x.Key == language).FirstOrDefault();
|
||||
if (key.Value != null)
|
||||
{
|
||||
// Add translated value \
|
||||
dictionary.Add("tooling_family_param_cooling", key.Value);
|
||||
dictionary.Add("tooling_equipment_param_cooling", key.Value);
|
||||
}
|
||||
key = ToolManagerConfig.CooligsTranslations.Cooling1.Where(x => x.Key == language).FirstOrDefault();
|
||||
if (key.Value != null)
|
||||
{
|
||||
dictionary.Add("tooling_family_param_cooling1", key.Value);
|
||||
dictionary.Add("tooling_equipment_param_cooling1", key.Value);
|
||||
}
|
||||
key = ToolManagerConfig.CooligsTranslations.Cooling2.Where(x => x.Key == language).FirstOrDefault();
|
||||
if (key.Value != null)
|
||||
{
|
||||
dictionary.Add("tooling_family_param_cooling2", key.Value);
|
||||
dictionary.Add("tooling_equipment_param_cooling2", key.Value);
|
||||
}
|
||||
key = ToolManagerConfig.CooligsTranslations.Cooling3.Where(x => x.Key == language).FirstOrDefault();
|
||||
if (key.Value != null)
|
||||
{
|
||||
dictionary.Add("tooling_family_param_cooling3", key.Value);
|
||||
dictionary.Add("tooling_equipment_param_cooling3", key.Value);
|
||||
}
|
||||
key = ToolManagerConfig.CooligsTranslations.Cooling4.Where(x => x.Key == language).FirstOrDefault();
|
||||
if (key.Value != null)
|
||||
{
|
||||
dictionary.Add("tooling_family_param_cooling4", key.Value);
|
||||
dictionary.Add("tooling_equipment_param_cooling4", key.Value);
|
||||
}
|
||||
key = ToolManagerConfig.CooligsTranslations.Cooling5.Where(x => x.Key == language).FirstOrDefault();
|
||||
if (key.Value != null)
|
||||
{
|
||||
dictionary.Add("tooling_family_param_cooling5", key.Value);
|
||||
dictionary.Add("tooling_equipment_param_cooling5", key.Value);
|
||||
}
|
||||
key = ToolManagerConfig.CooligsTranslations.Cooling6.Where(x => x.Key == language).FirstOrDefault();
|
||||
if (key.Value != null)
|
||||
{
|
||||
dictionary.Add("tooling_family_param_cooling6", key.Value);
|
||||
dictionary.Add("tooling_equipment_param_cooling6", key.Value);
|
||||
}
|
||||
key = ToolManagerConfig.CooligsTranslations.Cooling7.Where(x => x.Key == language).FirstOrDefault();
|
||||
if (key.Value != null)
|
||||
{
|
||||
dictionary.Add("tooling_family_param_cooling7", key.Value);
|
||||
dictionary.Add("tooling_equipment_param_cooling7", key.Value);
|
||||
}
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
private static Dictionary<string, string> GetToolManagerTranslations(string language)
|
||||
{
|
||||
Dictionary<string, string> translatedNames = new Dictionary<string, string>();
|
||||
|
||||
foreach (var mag in ToolManagerConfig.MagazineNames)
|
||||
{
|
||||
translatedNames.Add(
|
||||
"magazine_name_" + mag.MagazineId,
|
||||
GetValueFromLocalizationList(mag.LocalizedNames, language, "Magazine_" + mag.MagazineId)
|
||||
);
|
||||
}
|
||||
|
||||
foreach(var toolType in ToolManagerConfig.ToolTypes)
|
||||
{
|
||||
translatedNames.Add(
|
||||
"tooling_equipment_list_select_" + toolType.Id,
|
||||
GetValueFromLocalizationList(toolType.LocalizedNames, language, "Magazine_" + toolType.Id)
|
||||
);
|
||||
}
|
||||
|
||||
return translatedNames;
|
||||
}
|
||||
|
||||
private static Dictionary<string, string> GetScadaTranslations(string language)
|
||||
{
|
||||
Dictionary<string, string> translatedNames = new Dictionary<string, string>();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user