Compare commits
98 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4bae07e9f8 | |||
| c23586f2c9 | |||
| dba9bc113e | |||
| ff38224afd | |||
| 43d51c56b1 | |||
| 5af4531a2e | |||
| aae07244ed | |||
| 6fe3bb8b07 | |||
| 9b41ae4944 | |||
| 07197d9e1d | |||
| a1f5b58640 | |||
| 772cab4575 | |||
| 2df6c3ce72 | |||
| 4e4b89944f | |||
| 4dc7d6307f | |||
| fab347ace0 | |||
| be04238508 | |||
| dbfea33e98 | |||
| d4606fa6f6 | |||
| 6dffd29e65 | |||
| 5662be2850 | |||
| 57629f9806 | |||
| 4f460d3e40 | |||
| af427dd25a | |||
| 93f982fcd1 | |||
| 6c59b60c9b | |||
| 53a8d9a371 | |||
| 6893925221 | |||
| 0e530a5349 | |||
| 6205f7a7c1 | |||
| d0ab5f773c | |||
| 30f1a14292 | |||
| bb74aaff1c | |||
| 35c61192ed | |||
| 7454de6c5d | |||
| 356a4fc127 | |||
| b26f205476 | |||
| 3f951365cb | |||
| 8fd0f336b5 | |||
| e06a140e11 | |||
| b37d6d0d2b | |||
| 8c41b4aff5 | |||
| 1571877677 | |||
| 6ec9b69068 | |||
| 58c0e3b165 | |||
| 1029149af2 | |||
| 691a8bc694 | |||
| a85208e492 | |||
| c34e4c488e | |||
| 1a93357180 | |||
| 400d7442d8 | |||
| c4313a0ff1 | |||
| a262898d36 | |||
| 8956671b39 | |||
| bbf9f0bd17 | |||
| 67f8d20560 | |||
| c59b8fd6d7 | |||
| 22f872b503 | |||
| b3c196081a | |||
| 649d7ffee0 | |||
| b7e9f52367 | |||
| c43681a965 | |||
| f3747c2cdd | |||
| c517f548c8 | |||
| a5e666d623 | |||
| 3c365c7a57 | |||
| 638c98a642 | |||
| ec29b4a3c6 | |||
| d389fb3632 | |||
| 8529d19134 | |||
| c74da3d4e0 | |||
| 8cee60292c | |||
| 94326ec852 | |||
| e3492d49bf | |||
| 1ce1b0a903 | |||
| 57b7938e8a | |||
| 5c940681b3 | |||
| a56380923c | |||
| 326395dcc6 | |||
| 4f325d4d1b | |||
| 52f67f53f9 | |||
| 9aa57eb5ba | |||
| b5e237af8e | |||
| 13c75d38d8 | |||
| 53fffe9065 | |||
| f88eef7f67 | |||
| 27d23fe29f | |||
| ee6c32c1dc | |||
| a091654897 | |||
| 5736c8e5b3 | |||
| 9ba3b9f36d | |||
| 3a8b51641e | |||
| 1674f9c980 | |||
| 808b7c81ea | |||
| 52219a8255 | |||
| b908a7daa6 | |||
| 1abf7b16cf | |||
| 76315c4ecb |
@@ -269,6 +269,23 @@ EgwProxy.OsaiCncLib:build:
|
|||||||
script:
|
script:
|
||||||
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.vbproj" -target:Build /p:Configuration=Release /p:Platform="x86" /p:OutputPath=bin/ /nodeReuse:false /verbosity:minimal /m'
|
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.vbproj" -target:Build /p:Configuration=Release /p:Platform="x86" /p:OutputPath=bin/ /nodeReuse:false /verbosity:minimal /m'
|
||||||
|
|
||||||
|
EgwProxy.SqlDb:build:
|
||||||
|
stage: build
|
||||||
|
tags:
|
||||||
|
- win
|
||||||
|
variables:
|
||||||
|
APP_NAME: EgwProxy.SqlDb
|
||||||
|
only:
|
||||||
|
refs:
|
||||||
|
- develop
|
||||||
|
- SDK/SqlDb
|
||||||
|
before_script:
|
||||||
|
- *nuget-fix
|
||||||
|
- '& "$env:NUGET_PATH" restore "$env:APP_NAME.sln" -verbosity quiet'
|
||||||
|
- *version-fix
|
||||||
|
script:
|
||||||
|
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=Release /p:Platform="x86" /p:OutputPath=bin/ /nodeReuse:false /verbosity:minimal /m'
|
||||||
|
|
||||||
|
|
||||||
# --------------------------------
|
# --------------------------------
|
||||||
# STAGING: (nuget beta)
|
# STAGING: (nuget beta)
|
||||||
@@ -367,6 +384,29 @@ EgwProxy.OsaiCncLib:build:staging:
|
|||||||
- '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted'
|
- '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted'
|
||||||
- '& "$env:NUGET_PATH" push *$env:NUM_DEB.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted'
|
- '& "$env:NUGET_PATH" push *$env:NUM_DEB.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted'
|
||||||
|
|
||||||
|
EgwProxy.SqlDb:build:staging:
|
||||||
|
stage: staging
|
||||||
|
needs: ["EgwProxy.SqlDb:build"]
|
||||||
|
tags:
|
||||||
|
- win
|
||||||
|
variables:
|
||||||
|
CONFIG: Debug
|
||||||
|
APP_NAME: EgwProxy.SqlDb
|
||||||
|
only:
|
||||||
|
refs:
|
||||||
|
- develop
|
||||||
|
before_script:
|
||||||
|
- *nuget-fix
|
||||||
|
- '& "$env:NUGET_PATH" restore "$env:APP_NAME.sln" -verbosity quiet'
|
||||||
|
- *version-fix
|
||||||
|
- *nuspec-fix
|
||||||
|
script:
|
||||||
|
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/$env:CONFIG /verbosity:minimal /m'
|
||||||
|
- '& Remove-Item *.nupkg'
|
||||||
|
- '& $env:NUGET_PATH pack "$env:APP_NAME.Debug.nuspec"'
|
||||||
|
- '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted'
|
||||||
|
- '& "$env:NUGET_PATH" push *$env:NUM_DEB.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted'
|
||||||
|
|
||||||
# --------------------------------
|
# --------------------------------
|
||||||
# RELEASE
|
# RELEASE
|
||||||
# --------------------------------
|
# --------------------------------
|
||||||
@@ -534,6 +574,30 @@ EgwProxy.OsaiCncLib:build:release:
|
|||||||
- '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted'
|
- '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted'
|
||||||
- '& "$env:NUGET_PATH" push *$env:NUM_REL.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted'
|
- '& "$env:NUGET_PATH" push *$env:NUM_REL.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted'
|
||||||
|
|
||||||
|
EgwProxy.SqlDb:build:release:
|
||||||
|
stage: release
|
||||||
|
needs: ["EgwProxy.SqlDb:build"]
|
||||||
|
tags:
|
||||||
|
- win
|
||||||
|
variables:
|
||||||
|
CONFIG: Release
|
||||||
|
APP_NAME: EgwProxy.SqlDb
|
||||||
|
only:
|
||||||
|
refs:
|
||||||
|
- SDK/SqlDb
|
||||||
|
before_script:
|
||||||
|
- *nuget-fix
|
||||||
|
- '& "$env:NUGET_PATH" restore "$env:APP_NAME.sln" -verbosity quiet'
|
||||||
|
- *version-fix
|
||||||
|
- *nuspec-fix
|
||||||
|
script:
|
||||||
|
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=$env:CONFIG /p:Platform="Any CPU" /p:OutputPath=bin/$env:CONFIG /verbosity:minimal /m'
|
||||||
|
- '& Remove-Item *.nupkg'
|
||||||
|
- '& $env:NUGET_PATH pack "$env:APP_NAME.Release.nuspec"'
|
||||||
|
# - '& "$env:NUGET_PATH" pack "$env:APP_NAME\$env:APP_NAME.csproj" -properties Configuration=$env:CONFIG -Version $env:NUM_REL'
|
||||||
|
- '& "$env:NUGET_PATH" setapikey fe387daa-d07c-3207-877e-96c8be1be91b -source http://nexus.steamware.net/repository/nuget-hosted'
|
||||||
|
- '& "$env:NUGET_PATH" push *$env:NUM_REL.nupkg -Source http://nexus.steamware.net/repository/nuget-hosted'
|
||||||
|
|
||||||
# --------------------------------
|
# --------------------------------
|
||||||
# DocFx
|
# DocFx
|
||||||
# --------------------------------
|
# --------------------------------
|
||||||
@@ -593,6 +657,20 @@ EgwProxy.OsaiCncLib:docfx:
|
|||||||
- mv $env:APP_NAME/_site "docfx"
|
- mv $env:APP_NAME/_site "docfx"
|
||||||
- *DocReplica
|
- *DocReplica
|
||||||
|
|
||||||
|
EgwProxy.SqlDb:docfx:
|
||||||
|
stage: docfx
|
||||||
|
needs: ["EgwProxy.Icoel:build"]
|
||||||
|
tags:
|
||||||
|
- win
|
||||||
|
variables:
|
||||||
|
APP_NAME: EgwProxy.Icoel
|
||||||
|
only:
|
||||||
|
- SDK/Icoel
|
||||||
|
script:
|
||||||
|
- docfx $env:APP_NAME/docfx.json
|
||||||
|
- mv $env:APP_NAME/_site "docfx"
|
||||||
|
- *DocReplica
|
||||||
|
|
||||||
IOB-WIN-NEXT:docfx:
|
IOB-WIN-NEXT:docfx:
|
||||||
stage: docfx
|
stage: docfx
|
||||||
needs: ["IOB-WIN-NEXT:build"]
|
needs: ["IOB-WIN-NEXT:build"]
|
||||||
|
|||||||
@@ -1,25 +1,25 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<configSections>
|
<configSections>
|
||||||
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
|
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
|
||||||
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||||
</configSections>
|
</configSections>
|
||||||
<startup>
|
<startup>
|
||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
|
||||||
</startup>
|
</startup>
|
||||||
<entityFramework>
|
<entityFramework>
|
||||||
<providers>
|
<providers>
|
||||||
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
|
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
|
||||||
</providers>
|
</providers>
|
||||||
</entityFramework>
|
</entityFramework>
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<add key="IndirizzoIpSizer" value="192.168.137.50" />
|
<add key="IndirizzoIpSizer" value="192.168.137.50" />
|
||||||
<add key="SizerTcpPort" value="8001" />
|
<add key="SizerTcpPort" value="8001" />
|
||||||
<add key="EntrataFrontiera" value="data source=192.168.137.10\sqlexpress;initial catalog=frontiera;persist security info=True;user id=egalware;password=egalware2022;MultipleActiveResultSets=True;App=IOB-WIN-NEXT" />
|
<add key="EntrataFrontiera" value="data source=192.168.137.10\sqlexpress;initial catalog=frontiera;persist security info=True;user id=egalware;password=egalware2022;MultipleActiveResultSets=True;App=IOB-WIN-NEXT" />
|
||||||
<add key="ExportIcoel" value="data source=192.168.137.10\sqlexpress;initial catalog=IcoelExport;persist security info=True;user id=egalware;password=egalware2022;MultipleActiveResultSets=True;App=IOB-WIN-NEXT" />
|
<add key="ExportIcoel" value="data source=192.168.137.10\sqlexpress;initial catalog=IcoelExport;persist security info=True;user id=egalware;password=egalware2022;MultipleActiveResultSets=True;App=IOB-WIN-NEXT" />
|
||||||
<add key="TrackerLotti" value="data source=192.168.250.250\sqlexpress;initial catalog=TrackerLotti3;persist security info=True;user id=egalware;password=egalware2022;MultipleActiveResultSets=True;App=IOB-WIN-NEXT" />
|
<add key="TrackerLotti" value="data source=192.168.250.250\sqlexpress;initial catalog=TrackerLotti3;persist security info=True;user id=egalware;password=egalware2022;MultipleActiveResultSets=True;App=IOB-WIN-NEXT" />
|
||||||
<add key="SyncState" value="data source=localhost\sqlexpress;initial catalog=MoonPro_ISF;persist security info=True;user id=egalware;password=egalware2022;MultipleActiveResultSets=True;App=IOB-WIN-NEXT" />
|
<add key="SyncState" value="data source=localhost\sqlexpress;initial catalog=MoonPro_ISF;persist security info=True;user id=egalware;password=egalware2022;MultipleActiveResultSets=True;App=IOB-WIN-NEXT" />
|
||||||
</appSettings>
|
</appSettings>
|
||||||
<system.serviceModel>
|
<system.serviceModel>
|
||||||
<bindings>
|
<bindings>
|
||||||
<netNamedPipeBinding>
|
<netNamedPipeBinding>
|
||||||
@@ -38,14 +38,14 @@
|
|||||||
<endpoint address="net.pipe://localhost/Compac/8001/SizerService" binding="netNamedPipeBinding" bindingConfiguration="NetNamedPipeBinding_ISizerService" contract="SizerService.ISizerService" name="NetNamedPipeBinding_ISizerService" />
|
<endpoint address="net.pipe://localhost/Compac/8001/SizerService" binding="netNamedPipeBinding" bindingConfiguration="NetNamedPipeBinding_ISizerService" contract="SizerService.ISizerService" name="NetNamedPipeBinding_ISizerService" />
|
||||||
</client>
|
</client>
|
||||||
</system.serviceModel>
|
</system.serviceModel>
|
||||||
<!--
|
<!--
|
||||||
<connectionStrings>
|
<connectionStrings>
|
||||||
<add name="EntrataFrontiera" connectionString="data source=192.168.137.10\sqlexpress;initial catalog=frontiera;persist security info=True;user id=egalware;password=egalware2022;MultipleActiveResultSets=True;App=IOB-WIN-NEXT" providerName="System.Data.SqlClient" />
|
<add name="EntrataFrontiera" connectionString="data source=192.168.137.10\sqlexpress;initial catalog=frontiera;persist security info=True;user id=egalware;password=egalware2022;MultipleActiveResultSets=True;App=IOB-WIN-NEXT" providerName="System.Data.SqlClient" />
|
||||||
<add name="ExportIcoel" connectionString="data source=192.168.137.10\sqlexpress;initial catalog=IcoelExport;persist security info=True;user id=egalware;password=egalware2022;MultipleActiveResultSets=True;App=IOB-WIN-NEXT" providerName="System.Data.SqlClient" />
|
<add name="ExportIcoel" connectionString="data source=192.168.137.10\sqlexpress;initial catalog=IcoelExport;persist security info=True;user id=egalware;password=egalware2022;MultipleActiveResultSets=True;App=IOB-WIN-NEXT" providerName="System.Data.SqlClient" />
|
||||||
<add name="TrackerLotti" connectionString="data source=192.168.250.250\sqlexpress;initial catalog=TrackerLotti3;persist security info=True;user id=egalware;password=egalware2022;MultipleActiveResultSets=True;App=IOB-WIN-NEXT" providerName="System.Data.SqlClient" />
|
<add name="TrackerLotti" connectionString="data source=192.168.250.250\sqlexpress;initial catalog=TrackerLotti3;persist security info=True;user id=egalware;password=egalware2022;MultipleActiveResultSets=True;App=IOB-WIN-NEXT" providerName="System.Data.SqlClient" />
|
||||||
<add name="SyncState" connectionString="data source=localhost\sqlexpress;initial catalog=MoonPro_ISF;persist security info=True;user id=egalware;password=egalware2022;MultipleActiveResultSets=True;App=IOB-WIN-NEXT" providerName="System.Data.SqlClient" />
|
<add name="SyncState" connectionString="data source=localhost\sqlexpress;initial catalog=MoonPro_ISF;persist security info=True;user id=egalware;password=egalware2022;MultipleActiveResultSets=True;App=IOB-WIN-NEXT" providerName="System.Data.SqlClient" />
|
||||||
</connectionStrings>
|
</connectionStrings>
|
||||||
-->
|
-->
|
||||||
<runtime>
|
<runtime>
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<package >
|
||||||
|
<metadata>
|
||||||
|
<id>EgwProxy.SqlDb</id>
|
||||||
|
<version>#version#</version>
|
||||||
|
<title>EgwProxy.SqlDb</title>
|
||||||
|
<authors>Samuele E. Locatelli, EgalWare</authors>
|
||||||
|
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||||
|
<license type="expression">MIT</license>
|
||||||
|
<description>Libreria per comunicazione con generico DB SqlDb di frontiera x scambio dati (IOB-WIN-NEXT) - beta/unstable</description>
|
||||||
|
<releaseNotes>#releaseNotes#</releaseNotes>
|
||||||
|
<copyright>#copyright#</copyright>
|
||||||
|
<tags>EgwProxy.SqlDb EgwProxy SqlDb</tags>
|
||||||
|
<dependencies>
|
||||||
|
<dependency id="NLog" version="5.1.2" />
|
||||||
|
<dependency id="EntityFramework" version="6.4.4" />
|
||||||
|
</dependencies>
|
||||||
|
</metadata>
|
||||||
|
<files>
|
||||||
|
<file src="EgwProxy.SqlDb\bin\Debug\EgwProxy*.dll" target="lib" />
|
||||||
|
<file src="EgwProxy.SqlDb\bin\Debug\EgwProxy*.config" target="lib" />
|
||||||
|
<file src="EgwProxy.SqlDb\bin\Debug\EgwProxy*.pdb" target="lib" />
|
||||||
|
</files>
|
||||||
|
</package>
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<package >
|
||||||
|
<metadata>
|
||||||
|
<id>EgwProxy.SqlDb</id>
|
||||||
|
<version>#version#</version>
|
||||||
|
<title>EgwProxy.SqlDb</title>
|
||||||
|
<authors>Samuele E. Locatelli, EgalWare</authors>
|
||||||
|
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||||
|
<license type="expression">MIT</license>
|
||||||
|
<description>Libreria per comunicazione con generico DB SqlDb di frontiera x scambio dati (IOB-WIN-NEXT)</description>
|
||||||
|
<releaseNotes>#releaseNotes#</releaseNotes>
|
||||||
|
<copyright>#copyright#</copyright>
|
||||||
|
<tags>EgwProxy.SqlDb EgwProxy SqlDb</tags>
|
||||||
|
<dependencies>
|
||||||
|
<dependency id="NLog" version="5.1.2" />
|
||||||
|
<dependency id="EntityFramework" version="6.4.4" />
|
||||||
|
</dependencies>
|
||||||
|
</metadata>
|
||||||
|
<files>
|
||||||
|
<file src="EgwProxy.SqlDb\bin\Release\EgwProxy*.dll" target="lib" />
|
||||||
|
<file src="EgwProxy.SqlDb\bin\Release\EgwProxy*.config" target="lib" />
|
||||||
|
</files>
|
||||||
|
</package>
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<configSections>
|
||||||
|
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
|
||||||
|
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
|
||||||
|
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||||
|
</configSections>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
|
||||||
|
</startup>
|
||||||
|
<entityFramework>
|
||||||
|
<providers>
|
||||||
|
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
|
||||||
|
</providers>
|
||||||
|
</entityFramework>
|
||||||
|
<appSettings>
|
||||||
|
<add key="testFile" value="conf/testSetup.json" />
|
||||||
|
<add key="server" value="SQL2016DEV" />
|
||||||
|
<add key="userName" value="sa" />
|
||||||
|
<add key="passwd" value="keyhammer16" />
|
||||||
|
<add key="ClientSettingsProvider.ServiceUri" value="" />
|
||||||
|
</appSettings>
|
||||||
|
<runtime>
|
||||||
|
</runtime>
|
||||||
|
</configuration>
|
||||||
@@ -0,0 +1,105 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.props" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" />
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{A11CA446-AE97-413D-A567-45A081F003DB}</ProjectGuid>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<RootNamespace>EgwProxy.SqlDb.Test</RootNamespace>
|
||||||
|
<AssemblyName>EgwProxy.SqlDb.Test</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
|
<Deterministic>true</Deterministic>
|
||||||
|
<NuGetPackageImportStamp>
|
||||||
|
</NuGetPackageImportStamp>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Remote_DEBUG|AnyCPU'">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<OutputPath>bin\Remote_DEBUG\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<LangVersion>7.3</LangVersion>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<Prefer32Bit>true</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.SqlServer.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
|
<Reference Include="System.Configuration" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Program.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="TestSetup.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="App.config" />
|
||||||
|
<None Include="conf\.placeholder" />
|
||||||
|
<None Include="conf\testSetup.json">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Include="packages.config" />
|
||||||
|
<None Include="postBuildTgt.bat" />
|
||||||
|
<None Include="setupTgt.bat" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\EgwProxy.SqlDb\EgwProxy.SqlDb.csproj">
|
||||||
|
<Project>{a5f9e2c8-b866-4470-923c-11ba35270963}</Project>
|
||||||
|
<Name>EgwProxy.SqlDb</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.props'))" />
|
||||||
|
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.targets'))" />
|
||||||
|
</Target>
|
||||||
|
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<PreBuildEvent>"$(ProjectDir)setupTgt.bat" "$(ConfigurationName)" "$(ProjectDir)"</PreBuildEvent>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<PostBuildEvent>"$(ProjectDir)postBuildTgt.bat" "$(ConfigurationName)" "$(TargetDir)"</PostBuildEvent>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,296 @@
|
|||||||
|
using EgwProxy.SqlDb.Controllers;
|
||||||
|
using EgwProxy.SqlDb.DbModels;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Configuration;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using static System.Net.Mime.MediaTypeNames;
|
||||||
|
|
||||||
|
namespace EgwProxy.SqlDb.Test
|
||||||
|
{
|
||||||
|
internal class Program
|
||||||
|
{
|
||||||
|
#region Protected Methods
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// legge conf in formato stringa
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="key"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
protected static string ReadSetting(string key)
|
||||||
|
{
|
||||||
|
string answ = "";
|
||||||
|
try
|
||||||
|
{
|
||||||
|
answ = $"{ConfigurationManager.AppSettings[key]}" ?? "";
|
||||||
|
}
|
||||||
|
catch (Exception exc)
|
||||||
|
{
|
||||||
|
Console.Write("Eccezione in ReadSettings");
|
||||||
|
Console.Write(exc.Message);
|
||||||
|
}
|
||||||
|
return answ;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion Protected Methods
|
||||||
|
|
||||||
|
#region Private Fields
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Helper separatore dash
|
||||||
|
/// </summary>
|
||||||
|
private const string separator = "------------------------";
|
||||||
|
|
||||||
|
#endregion Private Fields
|
||||||
|
|
||||||
|
#region Private Methods
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Programma principale
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="args"></param>
|
||||||
|
private static void Main(string[] args)
|
||||||
|
{
|
||||||
|
Console.WriteLine(separator);
|
||||||
|
Console.WriteLine("Test DB Client");
|
||||||
|
Console.WriteLine(separator);
|
||||||
|
Console.WriteLine();
|
||||||
|
string exePath = System.Reflection.Assembly.GetExecutingAssembly().Location;
|
||||||
|
string BaseDirectory = Path.GetDirectoryName(exePath);
|
||||||
|
string testFile = Path.Combine(BaseDirectory, ReadSetting("testFile"));
|
||||||
|
string connStr = "";
|
||||||
|
DbController dbClient = new DbController(connStr);
|
||||||
|
if (!string.IsNullOrEmpty(testFile))
|
||||||
|
{
|
||||||
|
Console.WriteLine(separator);
|
||||||
|
Console.WriteLine($"Mode json ({testFile})");
|
||||||
|
Console.WriteLine(separator);
|
||||||
|
Console.WriteLine();
|
||||||
|
if (File.Exists(testFile))
|
||||||
|
{
|
||||||
|
var rawData = File.ReadAllText(testFile);
|
||||||
|
if (!string.IsNullOrEmpty(rawData))
|
||||||
|
{
|
||||||
|
TestSetup testConf = new TestSetup();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
testConf = JsonConvert.DeserializeObject<TestSetup>(rawData);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{ }
|
||||||
|
// setup server
|
||||||
|
connStr = $"data source={testConf.server};initial catalog={testConf.dbName};persist security info=True;user id={testConf.user};password={testConf.password};MultipleActiveResultSets=True;App={testConf.app}";
|
||||||
|
dbClient = new DbController(connStr);
|
||||||
|
serverTest(dbClient);
|
||||||
|
|
||||||
|
// eseguo per ogni step
|
||||||
|
foreach (var item in testConf.steps)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"------ Step {item.id} | {item.description} ------");
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.AppendLine(separator);
|
||||||
|
switch (item.action)
|
||||||
|
{
|
||||||
|
case stepType.GetSyncState:
|
||||||
|
var currTab = dbClient.SyncStateGetAll();
|
||||||
|
if (currTab != null && currTab.Count > 0)
|
||||||
|
{
|
||||||
|
foreach (var syncRec in currTab)
|
||||||
|
{
|
||||||
|
sb.AppendLine($"{syncRec.TableName} | {syncRec.LastIdx} | {syncRec.Note} | {syncRec.LastUpdate}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sb.AppendLine("Error: Table empty/missing!");
|
||||||
|
}
|
||||||
|
sb.AppendLine(separator);
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
case stepType.ResetPodl:
|
||||||
|
sb.AppendLine("Inizio reset PODL");
|
||||||
|
|
||||||
|
var dbRes = dbClient.ResetPODLMes();
|
||||||
|
if (dbRes.Count == 0)
|
||||||
|
{
|
||||||
|
sb.AppendLine("Pulizia eseguita!");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sb.AppendLine("Problemi con svuotamento tab PODL");
|
||||||
|
}
|
||||||
|
|
||||||
|
sb.AppendLine(separator);
|
||||||
|
|
||||||
|
break;
|
||||||
|
case stepType.SetNewPodl:
|
||||||
|
sb.AppendLine($"Inizio inserimento {item.paramList.Count} rec");
|
||||||
|
// creo una lista di PODL da processare...
|
||||||
|
List<MesPODLReqModel> CurrPodlReq = new List<MesPODLReqModel>();
|
||||||
|
foreach (var podl in item.paramList)
|
||||||
|
{
|
||||||
|
int idxPodl = 0;
|
||||||
|
int.TryParse(podl, out idxPodl);
|
||||||
|
MesPODLReqModel newRec = new MesPODLReqModel()
|
||||||
|
{
|
||||||
|
Attivabile = true,
|
||||||
|
CodArticolo = "ART000000",
|
||||||
|
IdxMacchina = "SIMUL_01",
|
||||||
|
IdxODL = 0,
|
||||||
|
IdxPromessa = idxPodl,
|
||||||
|
NumPezzi = 1
|
||||||
|
};
|
||||||
|
CurrPodlReq.Add(newRec);
|
||||||
|
sb.AppendLine($"Aggiunto PODL{podl:0000000}");
|
||||||
|
}
|
||||||
|
// chiamo procedura insert PODL
|
||||||
|
bool fatto = dbClient.MesPodlWriteReq(CurrPodlReq);
|
||||||
|
sb.AppendLine($"Records Aggiunti!");
|
||||||
|
sb.AppendLine(separator);
|
||||||
|
break;
|
||||||
|
case stepType.DbMigrateAndSync:
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var esitoMigrate = dbClient.DbForceMigrate();
|
||||||
|
sb.Append($"Migration: {esitoMigrate}");
|
||||||
|
}
|
||||||
|
catch (Exception exc)
|
||||||
|
{
|
||||||
|
sb.AppendLine($"eccezione in migrate:{Environment.NewLine}{exc}");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case stepType.ExecExportAll:
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var esitoExport = dbClient.SyncStateDoExportAll();
|
||||||
|
sb.Append($"ExportAll: {esitoExport}");
|
||||||
|
}
|
||||||
|
catch (Exception exc)
|
||||||
|
{
|
||||||
|
sb.AppendLine($"eccezione in ExportAll:{Environment.NewLine}{exc}");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case stepType.ExecImportAll:
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var esitoImport = dbClient.SyncStateDoImportAll();
|
||||||
|
sb.Append($"ImportAll: {esitoImport}");
|
||||||
|
}
|
||||||
|
catch (Exception exc)
|
||||||
|
{
|
||||||
|
sb.AppendLine($"eccezione in ImportAll:{Environment.NewLine}{exc}");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case stepType.GetMachFluxLog:
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var currFL = dbClient.MachFluxLogGetNew(0);
|
||||||
|
// mostro le righe
|
||||||
|
foreach (var fluxRow in currFL)
|
||||||
|
{
|
||||||
|
// aggiungo riga in out
|
||||||
|
sb.Append($"{fluxRow.Id:000} | {fluxRow.DtEvento} | {fluxRow.CodFlux} | {fluxRow.Valore}");
|
||||||
|
}
|
||||||
|
// aggiorno syncstate...
|
||||||
|
int lastIdx = currFL.Max(x => x.Id);
|
||||||
|
SyncStateModel currSync = new SyncStateModel()
|
||||||
|
{
|
||||||
|
LastIdx = lastIdx,
|
||||||
|
LastUpdate = DateTime.Now,
|
||||||
|
Note = "Test update",
|
||||||
|
TableName = "FluxLog"
|
||||||
|
};
|
||||||
|
dbClient.SyncStateUpsert(currSync);
|
||||||
|
}
|
||||||
|
catch (Exception exc)
|
||||||
|
{
|
||||||
|
sb.AppendLine($"eccezione in GetMachFluxLog:{Environment.NewLine}{exc}");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case stepType.GetMachProdData:
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var currFL = dbClient.MachProdDataGetNew(0);
|
||||||
|
// mostro le righe
|
||||||
|
foreach (var fluxRow in currFL)
|
||||||
|
{
|
||||||
|
// aggiungo riga in out
|
||||||
|
sb.Append($"{fluxRow.Id:000} | {fluxRow.DtEve} | {fluxRow.CodComm} | {fluxRow.Action}");
|
||||||
|
}
|
||||||
|
// aggiorno syncstate...
|
||||||
|
int lastIdx = currFL.Max(x => x.Id);
|
||||||
|
SyncStateModel currSync = new SyncStateModel()
|
||||||
|
{
|
||||||
|
LastIdx = lastIdx,
|
||||||
|
LastUpdate = DateTime.Now,
|
||||||
|
Note = "Test update",
|
||||||
|
TableName = "ProdData"
|
||||||
|
};
|
||||||
|
dbClient.SyncStateUpsert(currSync);
|
||||||
|
}
|
||||||
|
catch (Exception exc)
|
||||||
|
{
|
||||||
|
sb.AppendLine($"eccezione in GetMachProdData:{Environment.NewLine}{exc}");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case stepType.GetMachSignLog:
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var currFL = dbClient.MachSigLogGetNew(0);
|
||||||
|
// mostro le righe
|
||||||
|
foreach (var fluxRow in currFL)
|
||||||
|
{
|
||||||
|
// aggiungo riga in out
|
||||||
|
sb.Append($"{fluxRow.Id:000} | {fluxRow.DtEve} | {fluxRow.ValInt} | {fluxRow.Valore}");
|
||||||
|
}
|
||||||
|
// aggiorno syncstate...
|
||||||
|
int lastIdx = currFL.Max(x => x.Id);
|
||||||
|
SyncStateModel currSync = new SyncStateModel()
|
||||||
|
{
|
||||||
|
LastIdx = lastIdx,
|
||||||
|
LastUpdate = DateTime.Now,
|
||||||
|
Note = "Test update",
|
||||||
|
TableName = "SignLog"
|
||||||
|
};
|
||||||
|
dbClient.SyncStateUpsert(currSync);
|
||||||
|
}
|
||||||
|
catch (Exception exc)
|
||||||
|
{
|
||||||
|
sb.AppendLine($"eccezione in GetMachSignLog:{Environment.NewLine}{exc}");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
string esitoStep = sb.ToString();
|
||||||
|
|
||||||
|
Console.WriteLine(esitoStep);
|
||||||
|
Console.WriteLine($"------ Done Step {item.id} ------");
|
||||||
|
Console.WriteLine();
|
||||||
|
Console.WriteLine("Press a key to continue...");
|
||||||
|
Console.ReadKey();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void serverTest(DbController dbClient)
|
||||||
|
{
|
||||||
|
Console.WriteLine(separator);
|
||||||
|
string testServer = dbClient.ServerOk();
|
||||||
|
Console.WriteLine($"Test connessione: esito {testServer}");
|
||||||
|
Console.WriteLine(separator);
|
||||||
|
Console.WriteLine();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion Private Methods
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
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("EgwProxy.SqlDb.Test")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("EgwProxy.SqlDb.Test")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2023")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
|
// to COM components. If you need to access a type in this assembly from
|
||||||
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
|
[assembly: Guid("a11ca446-ae97-413d-a567-45a081f003db")]
|
||||||
|
|
||||||
|
// Version information for an assembly consists of the following four values:
|
||||||
|
//
|
||||||
|
// Major Version
|
||||||
|
// Minor Version
|
||||||
|
// Build Number
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
|
// by using the '*' as shown below:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,108 @@
|
|||||||
|
|
||||||
|
ALTER PROCEDURE [dbo].[GetMachineFluxLog]
|
||||||
|
AS
|
||||||
|
BEGIN
|
||||||
|
|
||||||
|
-- SET NOCOUNT ON added to prevent extra result sets from
|
||||||
|
-- interfering with SELECT statements.
|
||||||
|
SET NOCOUNT ON;
|
||||||
|
|
||||||
|
BEGIN tran
|
||||||
|
|
||||||
|
-- dichiarazioni variabili x recupero dati
|
||||||
|
DECLARE @LastIdx INT = 0
|
||||||
|
DECLARE @NewIdx INT = 0
|
||||||
|
|
||||||
|
-- recupero valore ultima riga stato processata...
|
||||||
|
SELECT @LastIdx = ISNULL(LastIdx,0)
|
||||||
|
FROM SyncState
|
||||||
|
WHERE TableName = 'ToMachineFluxLog'
|
||||||
|
|
||||||
|
-- recupero nuovo MAX idx
|
||||||
|
SELECT @NewIdx = ISNULL(MAX(ID),0)
|
||||||
|
FROM syn_M2ERP_MACHINE_STATE
|
||||||
|
|
||||||
|
-- eseguo SOLO SE ho dati aggiuntivi...
|
||||||
|
IF(@NewIdx > @LastIdx)
|
||||||
|
BEGIN
|
||||||
|
/* --------------------------------------------------
|
||||||
|
* Inviero solo VARIAZIONI dei valori
|
||||||
|
* - CurrentPP (Part Program)
|
||||||
|
* - ActiveProdOrder (Ordine in esecuzione)
|
||||||
|
*
|
||||||
|
* andando ad incrociare ogni record col precedente...
|
||||||
|
* -------------------------------------------------- */
|
||||||
|
|
||||||
|
-- processo dati ORDINI
|
||||||
|
;WITH cteCurrOrd AS
|
||||||
|
(
|
||||||
|
SELECT ID
|
||||||
|
,ActiveProdOrder
|
||||||
|
,Targa as IdxMacchina
|
||||||
|
,[DateTime] AS DtEvento
|
||||||
|
FROM syn_M2ERP_MACHINE_STATE
|
||||||
|
WHERE ID > @LastIdx AND ID <= @NewIdx
|
||||||
|
)
|
||||||
|
, ctePrevOrd AS
|
||||||
|
(
|
||||||
|
SELECT ID
|
||||||
|
,ActiveProdOrder
|
||||||
|
,Targa as IdxMacchina
|
||||||
|
,[DateTime] AS DtEvento
|
||||||
|
FROM syn_M2ERP_MACHINE_STATE
|
||||||
|
WHERE ID >= @LastIdx AND ID < @NewIdx
|
||||||
|
)
|
||||||
|
|
||||||
|
-- lego i valori col precedente x calcolare se siano variati x insert valori
|
||||||
|
INSERT INTO MachineFluxLog(DtEvento, IdxMacchina, CodFlux, Valore, Cnt)
|
||||||
|
SELECT curr.DtEvento, curr.IdxMacchina, 'ProdOrd' AS CodFlux, curr.ActiveProdOrder as Valore, 0 as Cnt
|
||||||
|
FROM cteCurrOrd curr
|
||||||
|
INNER JOIN ctePrevOrd prev
|
||||||
|
ON curr.ID = prev.ID+1
|
||||||
|
WHERE curr.ActiveProdOrder <> prev.ActiveProdOrder
|
||||||
|
|
||||||
|
-- processo dati Part Program
|
||||||
|
;WITH cteCurrPP AS
|
||||||
|
(
|
||||||
|
SELECT ID
|
||||||
|
,CurrentPP
|
||||||
|
,Targa as IdxMacchina
|
||||||
|
,[DateTime] AS DtEvento
|
||||||
|
FROM syn_M2ERP_MACHINE_STATE
|
||||||
|
WHERE ID > @LastIdx AND ID <= @NewIdx
|
||||||
|
)
|
||||||
|
, ctePrevPP AS
|
||||||
|
(
|
||||||
|
SELECT ID
|
||||||
|
,CurrentPP
|
||||||
|
,Targa as IdxMacchina
|
||||||
|
,[DateTime] AS DtEvento
|
||||||
|
FROM syn_M2ERP_MACHINE_STATE
|
||||||
|
WHERE ID >= @LastIdx AND ID < @NewIdx
|
||||||
|
)
|
||||||
|
|
||||||
|
-- lego i valori col precedente x calcolare se siano variati x insert valori
|
||||||
|
INSERT INTO MachineFluxLog(DtEvento, IdxMacchina, CodFlux, Valore, Cnt)
|
||||||
|
SELECT curr.DtEvento, curr.IdxMacchina, 'PartProg' as CodFlux, curr.CurrentPP as Valore, 0 as Cnt
|
||||||
|
FROM cteCurrPP curr
|
||||||
|
INNER JOIN ctePrevPP prev
|
||||||
|
ON curr.ID = prev.ID+1
|
||||||
|
WHERE curr.CurrentPP <> prev.CurrentPP
|
||||||
|
|
||||||
|
|
||||||
|
-- aggiorno valore indice processato
|
||||||
|
MERGE SyncState AS tgt
|
||||||
|
USING (SELECT @NewIdx as LastIdx, 'ToMachineFluxLog' AS TableName) as src (LastIdx, TableName)
|
||||||
|
ON (tgt.TableName = src.TableName)
|
||||||
|
WHEN MATCHED THEN
|
||||||
|
UPDATE SET LastIdx = src.LastIdx
|
||||||
|
,Note = 'UPDATED from ' + CAST(@LastIdx AS NVARCHAR(50))
|
||||||
|
,LastUpdate = GETDATE()
|
||||||
|
WHEN NOT MATCHED THEN
|
||||||
|
INSERT (LastIdx, TableName, Note, LastUpdate)
|
||||||
|
VALUES (src.LastIdx, src.TableName, 'CREATED', GETDATE());
|
||||||
|
|
||||||
|
END
|
||||||
|
|
||||||
|
COMMIT tran
|
||||||
|
END
|
||||||
@@ -0,0 +1,109 @@
|
|||||||
|
ALTER PROCEDURE [dbo].GetMachineProdData
|
||||||
|
AS
|
||||||
|
BEGIN
|
||||||
|
-- SET NOCOUNT ON added to prevent extra result sets from
|
||||||
|
-- interfering with SELECT statements.
|
||||||
|
SET NOCOUNT ON;
|
||||||
|
|
||||||
|
BEGIN tran
|
||||||
|
|
||||||
|
-- dichiarazioni variabili x recupero dati
|
||||||
|
DECLARE @LastIdx INT = 0
|
||||||
|
DECLARE @NewIdx INT = 0
|
||||||
|
|
||||||
|
-- recupero valore ultima riga stato processata...
|
||||||
|
SELECT @LastIdx = ISNULL(LastIdx,0)
|
||||||
|
FROM SyncState
|
||||||
|
WHERE TableName = 'ToMachineProdData'
|
||||||
|
|
||||||
|
-- recupero nuovo MAX idx
|
||||||
|
SELECT @NewIdx = ISNULL(MAX(ID),0)
|
||||||
|
FROM syn_M2ERP_PRODORDERS
|
||||||
|
|
||||||
|
-- eseguo SOLO SE ho dati aggiuntivi...
|
||||||
|
IF(@NewIdx > @LastIdx)
|
||||||
|
BEGIN
|
||||||
|
/* --------------------------------------------------
|
||||||
|
* Invierò solo VARIAZIONI dei valori
|
||||||
|
* - CurrentProdOrder (iniziato/concluso)
|
||||||
|
* - Quantità Produzione
|
||||||
|
*
|
||||||
|
* andando ad incrociare ogni record col precedente...
|
||||||
|
* -------------------------------------------------- */
|
||||||
|
|
||||||
|
-- processo dati ORDINI
|
||||||
|
;WITH cteCurrOrd AS
|
||||||
|
(
|
||||||
|
SELECT ID
|
||||||
|
,ProdOrder
|
||||||
|
,Targa as IdxMacchina
|
||||||
|
,[DateTime] AS DtEvento
|
||||||
|
,ProdOrderState
|
||||||
|
,ProdQty
|
||||||
|
FROM syn_M2ERP_PRODORDERS
|
||||||
|
WHERE ID > @LastIdx AND ID <= @NewIdx
|
||||||
|
)
|
||||||
|
, ctePrevOrd AS
|
||||||
|
(
|
||||||
|
SELECT ID
|
||||||
|
,ProdOrder
|
||||||
|
,Targa as IdxMacchina
|
||||||
|
,[DateTime] AS DtEvento
|
||||||
|
,ProdOrderState
|
||||||
|
,ProdQty
|
||||||
|
FROM syn_M2ERP_PRODORDERS
|
||||||
|
WHERE ID >= @LastIdx AND ID < @NewIdx
|
||||||
|
)
|
||||||
|
, cteActDec AS
|
||||||
|
(
|
||||||
|
SELECT curr.DtEvento as DtEve
|
||||||
|
,curr.IdxMacchina
|
||||||
|
,CASE
|
||||||
|
WHEN curr.ProdOrderState = 1 THEN 'StartOrd'
|
||||||
|
--WHEN curr.ProdOrderState = 2 THEN 'PauseOrd'
|
||||||
|
WHEN curr.ProdOrderState = 3 THEN 'EndOrd'
|
||||||
|
--WHEN curr.ProdOrderState = 6 THEN 'InsOrd'
|
||||||
|
ELSE 'NONE'
|
||||||
|
END AS OrdAction
|
||||||
|
,CASE
|
||||||
|
WHEN LEFT(curr.ProdOrder, 4) = 'PODL' THEN REPLACE(curr.ProdOrder,'PODL','')
|
||||||
|
ELSE 0 END AS IdxPodl
|
||||||
|
,CASE
|
||||||
|
WHEN LEFT(curr.ProdOrder, 3) = 'ODL' THEN REPLACE(curr.ProdOrder,'ODL','')
|
||||||
|
ELSE 0 END AS IdxOdl
|
||||||
|
,curr.ProdOrder as CodComm
|
||||||
|
,curr.ProdQty as PzCount
|
||||||
|
FROM cteCurrOrd curr
|
||||||
|
INNER JOIN ctePrevOrd prev
|
||||||
|
ON curr.ID = prev.ID+1
|
||||||
|
WHERE (curr.ProdOrder <> prev.ProdOrder)
|
||||||
|
OR (curr.ProdOrderState <> prev.ProdOrderState)
|
||||||
|
OR (curr.ProdQty <> prev.ProdQty)
|
||||||
|
)
|
||||||
|
-- lego i valori col precedente x calcolare se siano variati x insert valori
|
||||||
|
INSERT INTO MachineProdData(DtEve, IdxMacchina, Action, IdxPodl, IdxOdl, CodComm, PzCount)
|
||||||
|
SELECT DtEve, IdxMacchina, OrdAction, IdxPodl, IdxOdl, CodComm, PzCount
|
||||||
|
FROM cteActDec
|
||||||
|
WHERE OrdAction <> 'NONE'
|
||||||
|
|
||||||
|
|
||||||
|
-- aggiorno valore indice processato
|
||||||
|
MERGE SyncState AS tgt
|
||||||
|
USING (SELECT @NewIdx as LastIdx, 'ToMachineProdData' AS TableName) as src (LastIdx, TableName)
|
||||||
|
ON (tgt.TableName = src.TableName)
|
||||||
|
WHEN MATCHED THEN
|
||||||
|
UPDATE SET LastIdx = src.LastIdx
|
||||||
|
,Note = 'UPDATED from ' + CAST(@LastIdx AS NVARCHAR(50))
|
||||||
|
,LastUpdate = GETDATE()
|
||||||
|
WHEN NOT MATCHED THEN
|
||||||
|
INSERT (LastIdx, TableName, Note, LastUpdate)
|
||||||
|
VALUES (src.LastIdx, src.TableName, 'CREATED', GETDATE());
|
||||||
|
|
||||||
|
END
|
||||||
|
|
||||||
|
COMMIT tran
|
||||||
|
|
||||||
|
END
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,36 @@
|
|||||||
|
/****** MoonPro_IOB-ISF_PAMA Script Date: 13/03/2023 19:03:53 ******/
|
||||||
|
|
||||||
|
-- creazione sinonimi
|
||||||
|
CREATE SYNONYM [dbo].[syn_ERP2M] FOR [P_HUB_PLD392].[dbo].[ERP2M]
|
||||||
|
CREATE SYNONYM [dbo].[syn_M2ERP_MACHINE_STATE] FOR [P_HUB_PLD392].[dbo].[M2ERP_MACHINE_STATE]
|
||||||
|
CREATE SYNONYM [dbo].[syn_M2ERP_PRODORDERS] FOR [P_HUB_PLD392].[dbo].[M2ERP_PRODORDERS]
|
||||||
|
|
||||||
|
GO
|
||||||
|
|
||||||
|
-- fix funzione
|
||||||
|
/***************************************
|
||||||
|
* FUNCTION f_padLeft
|
||||||
|
*
|
||||||
|
* fornisce una stringa della lunghezza desiderata aggiungendo a sx il carattere richiesto alla @string originale
|
||||||
|
*
|
||||||
|
* Steamware, S.E.L.
|
||||||
|
* mod: 2010.03.19
|
||||||
|
*
|
||||||
|
****************************************/
|
||||||
|
create FUNCTION [dbo].[f_padLeft] (@string VARCHAR(255), @desired_length INTEGER, @pad_character CHAR(1))
|
||||||
|
RETURNS VARCHAR(255) AS
|
||||||
|
BEGIN
|
||||||
|
|
||||||
|
-- Prefix the required number of spaces to bulk up the string and then replace the spaces with the desired character
|
||||||
|
RETURN CASE
|
||||||
|
WHEN LEN(@string) < @desired_length
|
||||||
|
THEN REPLACE(SPACE(@desired_length - LEN(@string)), ' ', @pad_character) + @string
|
||||||
|
ELSE @string
|
||||||
|
END
|
||||||
|
|
||||||
|
END
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- fix stored specifiche
|
||||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,66 @@
|
|||||||
|
select * from ActType
|
||||||
|
select * from ActList
|
||||||
|
select * from SyncState
|
||||||
|
select * from MesPODL_last
|
||||||
|
select * from MesPODL_req
|
||||||
|
|
||||||
|
-- test scrittura PODL: OK!
|
||||||
|
exec dbo.SyncPodlToMachine
|
||||||
|
|
||||||
|
exec dbo.GetMachineSigLog
|
||||||
|
select * from SyncState
|
||||||
|
select * from MachineSignalLog
|
||||||
|
|
||||||
|
/*
|
||||||
|
truncate table MachineSignalLog
|
||||||
|
update SyncState
|
||||||
|
set lastidx=0
|
||||||
|
where TableName='syn_M2ERP_MACHINE_STATE'
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
exec dbo.GetMachineFluxLog
|
||||||
|
|
||||||
|
select * from syn_ERP2M
|
||||||
|
select * from syn_M2ERP_MACHINE_STATE
|
||||||
|
select * from syn_M2ERP_PRODORDERS
|
||||||
|
|
||||||
|
|
||||||
|
select * from syn_ERP2M
|
||||||
|
|
||||||
|
|
||||||
|
SELECT * FROM MachineFluxLog
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
drop table __MigrationHistory
|
||||||
|
drop table ActList
|
||||||
|
drop table ActType
|
||||||
|
drop table MachineEventList
|
||||||
|
drop table MachineFluxLog
|
||||||
|
drop table MachinePODL
|
||||||
|
drop table MesPODL_last
|
||||||
|
drop table MesPODL_req
|
||||||
|
drop table SyncState
|
||||||
|
|
||||||
|
drop PROCEDURE dbo.BackupDb
|
||||||
|
drop PROCEDURE dbo.ExportAll
|
||||||
|
drop PROCEDURE dbo.GetMachineEvList
|
||||||
|
drop PROCEDURE dbo.GetMachineFluxLog
|
||||||
|
drop PROCEDURE dbo.ImportAll
|
||||||
|
drop PROCEDURE dbo.ResetPodlMes
|
||||||
|
drop PROCEDURE dbo.SyncPodlToMachine
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
select * from ERP2M
|
||||||
|
|
||||||
|
select * from M2ERP_MACHINE_STATE where ActiveProdOrder = 'ODL0003743'
|
||||||
|
select * from M2ERP_PRODORDERS
|
||||||
|
|
||||||
|
select * from M2ERP_PRODORDERS where ProdOrder = 'ODL0003743'
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace EgwProxy.SqlDb.Test
|
||||||
|
{
|
||||||
|
public class TestSetup
|
||||||
|
{
|
||||||
|
public string app { get; set; } = "testApp";
|
||||||
|
public string server { get; set; } = "";
|
||||||
|
public string user { get; set; } = "";
|
||||||
|
public string password { get; set; } = "";
|
||||||
|
public string dbName { get; set; } = "MoonPro_IOB_ISF_PAMA";
|
||||||
|
public List<singleStep> steps { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class singleStep
|
||||||
|
{
|
||||||
|
public string id { get; set; } = "00";
|
||||||
|
public string description { get; set; } = "00";
|
||||||
|
public stepType action { get; set; } = stepType.None;
|
||||||
|
|
||||||
|
public List<string> paramList { get; set; } = new List<string>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum stepType
|
||||||
|
{
|
||||||
|
None,
|
||||||
|
DbMigrateAndSync,
|
||||||
|
ExecExportAll,
|
||||||
|
ExecImportAll,
|
||||||
|
GetMachSignLog,
|
||||||
|
GetMachProdData,
|
||||||
|
GetMachFluxLog,
|
||||||
|
GetSyncState,
|
||||||
|
ResetPodl,
|
||||||
|
SetNewPodl,
|
||||||
|
//procPodl
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
{
|
||||||
|
"server": "308SERVER60\\LANTEK",
|
||||||
|
"user": "steamware",
|
||||||
|
"password": "viadante16",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"id": "00",
|
||||||
|
"description": "Db Migrate + SYNC",
|
||||||
|
"action": "DbMigrateAndSync",
|
||||||
|
"paramList": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "01",
|
||||||
|
"description": "Test SYNC",
|
||||||
|
"action": "GetSyncState",
|
||||||
|
"paramList": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "02",
|
||||||
|
"description": "Reset PODL MES",
|
||||||
|
"action": "ResetPodl",
|
||||||
|
"paramList": []
|
||||||
|
},
|
||||||
|
//{
|
||||||
|
// "id": "03",
|
||||||
|
// "description": "upload Test PODL",
|
||||||
|
// "action": "SetNewPodl",
|
||||||
|
// "paramList": [
|
||||||
|
// "1001",
|
||||||
|
// "1002",
|
||||||
|
// "1003"
|
||||||
|
// ]
|
||||||
|
//}
|
||||||
|
{
|
||||||
|
"id": "03",
|
||||||
|
"description": "Export All",
|
||||||
|
"action": "ExecExportAll",
|
||||||
|
"paramList": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "04",
|
||||||
|
"description": "Import All",
|
||||||
|
"action": "ExecImportAll",
|
||||||
|
"paramList": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "05",
|
||||||
|
"description": "Get SignLog",
|
||||||
|
"action": "GetMachSignLog",
|
||||||
|
"paramList": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "06",
|
||||||
|
"description": "Get ProdData",
|
||||||
|
"action": "GetMachProdData",
|
||||||
|
"paramList": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "07",
|
||||||
|
"description": "Get FluxLog",
|
||||||
|
"action": "GetMachFluxLog",
|
||||||
|
"paramList": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "08",
|
||||||
|
"description": "Test SYNC",
|
||||||
|
"action": "GetSyncState",
|
||||||
|
"paramList": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="EntityFramework" version="6.4.4" targetFramework="net462" />
|
||||||
|
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net462" />
|
||||||
|
<package id="System.Configuration.ConfigurationManager" version="7.0.0" targetFramework="net462" />
|
||||||
|
<package id="System.Security.AccessControl" version="6.0.0" targetFramework="net462" />
|
||||||
|
<package id="System.Security.Permissions" version="7.0.0" targetFramework="net462" />
|
||||||
|
<package id="System.Security.Principal.Windows" version="5.0.0" targetFramework="net462" />
|
||||||
|
</packages>
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
@echo off
|
||||||
|
echo Effettua pulizia post build: configurazione %1. directory %2
|
||||||
|
|
||||||
|
RD /S /Q %2"\lib\da"
|
||||||
|
RD /S /Q %2"\lib\de"
|
||||||
|
RD /S /Q %2"\lib\es"
|
||||||
|
RD /S /Q %2"\lib\fr"
|
||||||
|
RD /S /Q %2"\lib\it"
|
||||||
|
RD /S /Q %2"\lib\ja-JP"
|
||||||
|
RD /S /Q %2"\lib\ko"
|
||||||
|
RD /S /Q %2"\lib\nl"
|
||||||
|
RD /S /Q %2"\lib\pl"
|
||||||
|
RD /S /Q %2"\lib\pt"
|
||||||
|
RD /S /Q %2"\lib\ru"
|
||||||
|
RD /S /Q %2"\lib\sv"
|
||||||
|
RD /S /Q %2"\lib\tr"
|
||||||
|
RD /S /Q %2"\lib\zh"
|
||||||
|
|
||||||
|
MOVE /Y %2"da" %2"lib\"
|
||||||
|
MOVE /Y %2"de" %2"lib\"
|
||||||
|
MOVE /Y %2"es" %2"lib\"
|
||||||
|
MOVE /Y %2"fr" %2"lib\"
|
||||||
|
MOVE /Y %2"it" %2"lib\"
|
||||||
|
MOVE /Y %2"ja-JP" %2"lib\"
|
||||||
|
MOVE /Y %2"ko" %2"lib\"
|
||||||
|
MOVE /Y %2"nl" %2"lib\"
|
||||||
|
MOVE /Y %2"pl" %2"lib\"
|
||||||
|
MOVE /Y %2"pt" %2"lib\"
|
||||||
|
MOVE /Y %2"ru" %2"lib\"
|
||||||
|
MOVE /Y %2"sv" %2"lib\"
|
||||||
|
MOVE /Y %2"tr" %2"lib\"
|
||||||
|
MOVE /Y %2"zh" %2"lib\"
|
||||||
|
|
||||||
|
|
||||||
|
if %1 == "Release" goto Release
|
||||||
|
if %1 == "Debug" goto Debug
|
||||||
|
if %1 == "Remote_DEBUG" goto RemoteDebug
|
||||||
|
|
||||||
|
:Release
|
||||||
|
REM INIZIO eliminando i files pdb
|
||||||
|
del /S %2"*.pdb""
|
||||||
|
del /S %2"lib/*.pdb""
|
||||||
|
echo Release: eliminato pdb!!!
|
||||||
|
goto END
|
||||||
|
|
||||||
|
:Debug
|
||||||
|
echo Debug: nulla da eliminare
|
||||||
|
|
||||||
|
REM copia script verso server remoto
|
||||||
|
REM ROBOCOPY . \\10.150.0.1\Steamware\SqlDbTest-DEB /MIR
|
||||||
|
|
||||||
|
goto END
|
||||||
|
|
||||||
|
|
||||||
|
:RemoteDebug
|
||||||
|
REM copia script verso server remoto
|
||||||
|
REM echo Debug remoto: effettuo robocopy sync (verificare remote per cliente)
|
||||||
|
|
||||||
|
REM FINASSI
|
||||||
|
REM ROBOCOPY . \\10.150.0.1\Steamware\SqlDbTest-DEB /MIR
|
||||||
|
REM Baglietto
|
||||||
|
REM ROBOCOPY . \\192.168.60.15\Steamware\SqlDbTest-DEB /MIR
|
||||||
|
REM GIACOVELLI LOCOROTONDO
|
||||||
|
REM ROBOCOPY . \\192.168.1.93\Steamware\SqlDbTest-DEB /MIR
|
||||||
|
REM IMI Remosa
|
||||||
|
ROBOCOPY . \\192.168.0.12\Steamware\SqlDbTest-DEB /MIR
|
||||||
|
|
||||||
|
REM IOB-WIN-SIM
|
||||||
|
REM ROBOCOPY . \\IOB-WIN-SIMULA\Steamware\SqlDbTest-DEB /MIR
|
||||||
|
|
||||||
|
goto END
|
||||||
|
|
||||||
|
:END
|
||||||
|
echo Fatto!
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
@echo off
|
||||||
|
echo Effettua setup dei file specifici per i vari ambienti pre build installer: verifica da nome configurazione %1
|
||||||
|
|
||||||
|
|
||||||
|
if %1 == "Release" goto Release
|
||||||
|
if %1 == "Debug" goto Debug
|
||||||
|
if %1 == "Remote_DEBUG" goto RemoteDebug
|
||||||
|
|
||||||
|
:Release
|
||||||
|
echo Release: nulla da copiare
|
||||||
|
goto END
|
||||||
|
|
||||||
|
:Debug
|
||||||
|
echo Debug: copia file ini x simulazione Debug
|
||||||
|
REM del %2"DATA\CONF\EsaKvara.ini"
|
||||||
|
REM copy %2"Resources\SCM\EsaKvara_SIM.ini" %2"DATA\CONF\EsaKvara.ini"
|
||||||
|
goto END
|
||||||
|
|
||||||
|
|
||||||
|
:RemoteDebug
|
||||||
|
echo RemoteDebug: nulla da copiare
|
||||||
|
goto END
|
||||||
|
|
||||||
|
:END
|
||||||
|
echo Fatto!
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 17
|
||||||
|
VisualStudioVersion = 17.5.33424.131
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EgwProxy.SqlDb", "EgwProxy.SqlDb\EgwProxy.SqlDb.csproj", "{A5F9E2C8-B866-4470-923C-11BA35270963}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EgwProxy.SqlDb.Test", "EgwProxy.SqlDb.Test\EgwProxy.SqlDb.Test.csproj", "{A11CA446-AE97-413D-A567-45A081F003DB}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
Remote_DEBUG|Any CPU = Remote_DEBUG|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{A5F9E2C8-B866-4470-923C-11BA35270963}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{A5F9E2C8-B866-4470-923C-11BA35270963}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{A5F9E2C8-B866-4470-923C-11BA35270963}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{A5F9E2C8-B866-4470-923C-11BA35270963}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{A5F9E2C8-B866-4470-923C-11BA35270963}.Remote_DEBUG|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{A5F9E2C8-B866-4470-923C-11BA35270963}.Remote_DEBUG|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{A11CA446-AE97-413D-A567-45A081F003DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{A11CA446-AE97-413D-A567-45A081F003DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{A11CA446-AE97-413D-A567-45A081F003DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{A11CA446-AE97-413D-A567-45A081F003DB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{A11CA446-AE97-413D-A567-45A081F003DB}.Remote_DEBUG|Any CPU.ActiveCfg = Remote_DEBUG|Any CPU
|
||||||
|
{A11CA446-AE97-413D-A567-45A081F003DB}.Remote_DEBUG|Any CPU.Build.0 = Remote_DEBUG|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {E2472E21-58D3-4EAD-BC4A-BC3915B18BEF}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<configSections>
|
||||||
|
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
|
||||||
|
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||||
|
</configSections>
|
||||||
|
<connectionStrings>
|
||||||
|
<add name="SyncState" connectionString="data source=SQL2016DEV;initial catalog=MoonPro_IOB_ISF;persist security info=True;user id=sa;password=keyhammer16;MultipleActiveResultSets=True;App=EgwProxy.SqlDb" providerName="System.Data.SqlClient" />
|
||||||
|
</connectionStrings>
|
||||||
|
<entityFramework>
|
||||||
|
<providers>
|
||||||
|
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
|
||||||
|
</providers>
|
||||||
|
</entityFramework>
|
||||||
|
</configuration>
|
||||||
@@ -0,0 +1,316 @@
|
|||||||
|
using EgwProxy.SqlDb.DbModels;
|
||||||
|
using NLog;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace EgwProxy.SqlDb.Controllers
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Controller accesso dati DB IOB_ISF
|
||||||
|
/// </summary>
|
||||||
|
public class DbController : IDisposable
|
||||||
|
{
|
||||||
|
#region Public Constructors
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Avvio dell'oggetto gestione DB con stringa di connessione specifica
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="connSyncState">Connessione DB locale di SYNC</param>
|
||||||
|
public DbController(string connSyncState)
|
||||||
|
{
|
||||||
|
connString = connSyncState;
|
||||||
|
Log.Info("Avviata classe DbController");
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion Public Constructors
|
||||||
|
|
||||||
|
#region Public Methods
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Recupera la tab di ActList corrente
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public List<ActListModel> ActListGetAll()
|
||||||
|
{
|
||||||
|
List<ActListModel> dbResult = new List<ActListModel>();
|
||||||
|
using (var dbSyncStateCtx = new SyncStateDbContext(connString))
|
||||||
|
{
|
||||||
|
dbResult = dbSyncStateCtx
|
||||||
|
.DbSetActions
|
||||||
|
.ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
return dbResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Recupera la tab di ActType corrente
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public List<ActTypeModel> ActTypeGetAll()
|
||||||
|
{
|
||||||
|
List<ActTypeModel> dbResult = new List<ActTypeModel>();
|
||||||
|
using (var dbSyncStateCtx = new SyncStateDbContext(connString))
|
||||||
|
{
|
||||||
|
dbResult = dbSyncStateCtx
|
||||||
|
.DbSetActListType
|
||||||
|
.ToList();
|
||||||
|
}
|
||||||
|
return dbResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool DbForceMigrate()
|
||||||
|
{
|
||||||
|
bool fatto = false;
|
||||||
|
using (var dbSyncStateCtx = new SyncStateDbContext(connString))
|
||||||
|
{
|
||||||
|
dbSyncStateCtx.DbForceMigrate();
|
||||||
|
fatto = true;
|
||||||
|
}
|
||||||
|
return fatto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Dispose classe
|
||||||
|
/// </summary>
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
// Clear database context
|
||||||
|
connString = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Recupera la tab FluxLog x i record successivi all'ID già processato
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="lastIdx"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public List<MachFluxLogModel> MachFluxLogGetNew(long lastIdx)
|
||||||
|
{
|
||||||
|
List<MachFluxLogModel> dbResult = new List<MachFluxLogModel>();
|
||||||
|
using (var dbSyncStateCtx = new SyncStateDbContext(connString))
|
||||||
|
{
|
||||||
|
dbResult = dbSyncStateCtx
|
||||||
|
.DbSetMachFluxLog
|
||||||
|
.Where(x => x.Id > lastIdx)
|
||||||
|
.OrderBy(x => x.Id)
|
||||||
|
.ToList();
|
||||||
|
}
|
||||||
|
return dbResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Recupera la tab PODL Macchina x i record successivi all'ID già processato
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="lastIdx"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public List<MachPODLModel> MachPOdlGetNew(long lastIdx)
|
||||||
|
{
|
||||||
|
List<MachPODLModel> dbResult = new List<MachPODLModel>();
|
||||||
|
using (var dbSyncStateCtx = new SyncStateDbContext(connString))
|
||||||
|
{
|
||||||
|
dbResult = dbSyncStateCtx
|
||||||
|
.DbSetMachPODL
|
||||||
|
.Where(x => x.IdxPromessa > lastIdx)
|
||||||
|
.OrderBy(x => x.IdxPromessa)
|
||||||
|
.ToList();
|
||||||
|
}
|
||||||
|
return dbResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Recupera la tab ProdData x i record successivi all'ID già processato
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="lastIdx"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public List<MachProdDataModel> MachProdDataGetNew(long lastIdx)
|
||||||
|
{
|
||||||
|
List<MachProdDataModel> dbResult = new List<MachProdDataModel>();
|
||||||
|
using (var dbSyncStateCtx = new SyncStateDbContext(connString))
|
||||||
|
{
|
||||||
|
dbResult = dbSyncStateCtx
|
||||||
|
.DbSetMachProdData
|
||||||
|
.Where(x => x.Id > lastIdx)
|
||||||
|
.OrderBy(x => x.Id)
|
||||||
|
.ToList();
|
||||||
|
}
|
||||||
|
return dbResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Recupera la tab EvList x i record successivi all'ID già processato
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="lastIdx"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public List<MachSigLogModel> MachSigLogGetNew(long lastIdx)
|
||||||
|
{
|
||||||
|
List<MachSigLogModel> dbResult = new List<MachSigLogModel>();
|
||||||
|
using (var dbSyncStateCtx = new SyncStateDbContext(connString))
|
||||||
|
{
|
||||||
|
dbResult = dbSyncStateCtx
|
||||||
|
.DbSetMachEvList
|
||||||
|
.Where(x => x.Id > lastIdx)
|
||||||
|
.OrderBy(x => x.Id)
|
||||||
|
.ToList();
|
||||||
|
}
|
||||||
|
return dbResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Scrive elenco PODL attivi al momento x processing successivo
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="CurrPodlReq"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public bool MesPodlWriteReq(List<MesPODLReqModel> CurrPodlReq)
|
||||||
|
{
|
||||||
|
bool fatto = false;
|
||||||
|
using (var dbSyncStateCtx = new SyncStateDbContext(connString))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// in primis verifica SE sia vuota la tab req...
|
||||||
|
var oldData = dbSyncStateCtx
|
||||||
|
.DbSetMesPodlReq
|
||||||
|
.ToList();
|
||||||
|
// se vuota scrive i record e salva
|
||||||
|
if (oldData.Count == 0)
|
||||||
|
{
|
||||||
|
// aggiungo i nuovi record
|
||||||
|
var dbResult = dbSyncStateCtx
|
||||||
|
.DbSetMesPodlReq
|
||||||
|
.AddRange(CurrPodlReq);
|
||||||
|
// salvo
|
||||||
|
dbSyncStateCtx.SaveChanges();
|
||||||
|
fatto = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch //(Exception exc)
|
||||||
|
{ }
|
||||||
|
}
|
||||||
|
return fatto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Esegue reset tabelle PODL MEs e restituisce elenco finale (vuoto)
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public List<MesPODLReqModel> ResetPODLMes()
|
||||||
|
{
|
||||||
|
List<MesPODLReqModel> dbResult = new List<MesPODLReqModel>();
|
||||||
|
using (var dbSyncStateCtx = new SyncStateDbContext(connString))
|
||||||
|
{
|
||||||
|
dbResult = dbSyncStateCtx
|
||||||
|
.Database
|
||||||
|
.SqlQuery<MesPODLReqModel>("EXEC dbo.stp_ResetPodlMes")
|
||||||
|
.ToList();
|
||||||
|
}
|
||||||
|
return dbResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string ServerOk()
|
||||||
|
{
|
||||||
|
return SyncStateGetAll().Count() > 0 ? "OK" : "NA";
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Esegue una volta la stored di ImportAll (x recupero dati da DB esterni) e poi
|
||||||
|
/// restitusice in output la tab di SyncState x verificare lo stato
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public List<SyncStateModel> SyncStateDoExportAll()
|
||||||
|
{
|
||||||
|
List<SyncStateModel> dbResult = new List<SyncStateModel>();
|
||||||
|
using (var dbSyncStateCtx = new SyncStateDbContext(connString))
|
||||||
|
{
|
||||||
|
dbResult = dbSyncStateCtx
|
||||||
|
.Database
|
||||||
|
.SqlQuery<SyncStateModel>("EXEC dbo.stp_ExportAll")
|
||||||
|
.ToList();
|
||||||
|
}
|
||||||
|
return dbResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Esegue una volta la stored di ImportAll (x recupero dati da DB esterni) e poi
|
||||||
|
/// restitusice in output la tab di SyncState x verificare lo stato
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public List<SyncStateModel> SyncStateDoImportAll()
|
||||||
|
{
|
||||||
|
List<SyncStateModel> dbResult = new List<SyncStateModel>();
|
||||||
|
using (var dbSyncStateCtx = new SyncStateDbContext(connString))
|
||||||
|
{
|
||||||
|
dbResult = dbSyncStateCtx
|
||||||
|
.Database
|
||||||
|
.SqlQuery<SyncStateModel>("EXEC dbo.stp_ImportAll")
|
||||||
|
.ToList();
|
||||||
|
}
|
||||||
|
return dbResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// recupera la tab di SyncState corrente
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public List<SyncStateModel> SyncStateGetAll()
|
||||||
|
{
|
||||||
|
List<SyncStateModel> dbResult = new List<SyncStateModel>();
|
||||||
|
using (var dbSyncStateCtx = new SyncStateDbContext(connString))
|
||||||
|
{
|
||||||
|
dbResult = dbSyncStateCtx
|
||||||
|
.DbSetSyncState
|
||||||
|
.ToList();
|
||||||
|
}
|
||||||
|
return dbResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Aggiorna record SyncState corrente
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public bool SyncStateUpsert(SyncStateModel newVal)
|
||||||
|
{
|
||||||
|
bool fatto = false;
|
||||||
|
using (var dbSyncStateCtx = new SyncStateDbContext(connString))
|
||||||
|
{
|
||||||
|
// cerco record
|
||||||
|
var dbResult = dbSyncStateCtx
|
||||||
|
.DbSetSyncState
|
||||||
|
.Where(x => x.TableName == newVal.TableName)
|
||||||
|
.FirstOrDefault();
|
||||||
|
// se trovato aggiorno
|
||||||
|
if (dbResult != null)
|
||||||
|
{
|
||||||
|
dbResult.LastIdx = newVal.LastIdx;
|
||||||
|
dbResult.Note = newVal.Note;
|
||||||
|
dbResult.LastUpdate = newVal.LastUpdate;
|
||||||
|
//dbSyncStateCtx.Entry(dbResult).State = System.Data.Entity.EntityState.Modified;
|
||||||
|
}
|
||||||
|
// altrimenti aggiungo
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dbSyncStateCtx.DbSetSyncState.Add(newVal);
|
||||||
|
}
|
||||||
|
|
||||||
|
// salvo
|
||||||
|
dbSyncStateCtx.SaveChanges();
|
||||||
|
fatto = true;
|
||||||
|
}
|
||||||
|
return fatto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion Public Methods
|
||||||
|
|
||||||
|
#region Protected Fields
|
||||||
|
|
||||||
|
protected static string connString = "";
|
||||||
|
|
||||||
|
#endregion Protected Fields
|
||||||
|
|
||||||
|
#region Private Fields
|
||||||
|
|
||||||
|
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
|
||||||
|
|
||||||
|
#endregion Private Fields
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace EgwProxy.SqlDb.DbModels
|
||||||
|
{
|
||||||
|
// <Auto-Generated>
|
||||||
|
// This is here so CodeMaid doesn't reorganize this document
|
||||||
|
// </Auto-Generated>
|
||||||
|
[Table("ActList")]
|
||||||
|
public partial class ActListModel
|
||||||
|
{
|
||||||
|
[Key, Column("IdxAct"), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
|
public int Id { get; set; } = 0;
|
||||||
|
|
||||||
|
public DateTime DtRif { get; set; } = DateTime.Today;
|
||||||
|
|
||||||
|
[StringLength(50)]
|
||||||
|
public string Source { get; set; } = "IN";
|
||||||
|
|
||||||
|
[StringLength(50)]
|
||||||
|
public string Dest { get; set; } = "OUT";
|
||||||
|
|
||||||
|
[StringLength(250)]
|
||||||
|
public string Action { get; set; } = "";
|
||||||
|
|
||||||
|
[StringLength(2500)]
|
||||||
|
public string Value { get; set; } = "";
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace EgwProxy.SqlDb.DbModels
|
||||||
|
{
|
||||||
|
// <Auto-Generated>
|
||||||
|
// This is here so CodeMaid doesn't reorganize this document
|
||||||
|
// </Auto-Generated>
|
||||||
|
[Table("ActType")]
|
||||||
|
public partial class ActTypeModel
|
||||||
|
{
|
||||||
|
[Key, StringLength(250)]
|
||||||
|
public string Action { get; set; } = "";
|
||||||
|
|
||||||
|
[StringLength(500)]
|
||||||
|
public string Description { get; set; } = "";
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace EgwProxy.SqlDb.DbModels
|
||||||
|
{
|
||||||
|
// <Auto-Generated>
|
||||||
|
// This is here so CodeMaid doesn't reorganize this document
|
||||||
|
// </Auto-Generated>
|
||||||
|
[Table("MachineFluxLog")]
|
||||||
|
public partial class MachFluxLogModel
|
||||||
|
{
|
||||||
|
[Key, Column("IdxFL"), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
|
public int Id { get; set; } = 0;
|
||||||
|
|
||||||
|
public DateTime DtEvento { get; set; } = DateTime.Now;
|
||||||
|
|
||||||
|
[StringLength(50)]
|
||||||
|
public string IdxMacchina { get; set; } = "";
|
||||||
|
|
||||||
|
[StringLength(50)]
|
||||||
|
public string CodFlux { get; set; } = "";
|
||||||
|
|
||||||
|
[StringLength(250)]
|
||||||
|
public string Valore { get; set; } = "";
|
||||||
|
|
||||||
|
public int Cnt { get; set; } = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace EgwProxy.SqlDb.DbModels
|
||||||
|
{
|
||||||
|
// <Auto-Generated>
|
||||||
|
// This is here so CodeMaid doesn't reorganize this document
|
||||||
|
// </Auto-Generated>
|
||||||
|
[Table("MachinePODL")]
|
||||||
|
public partial class MachPODLModel
|
||||||
|
{
|
||||||
|
[Key]
|
||||||
|
public int IdxRec { get; set; } = 0;
|
||||||
|
|
||||||
|
public int IdxPromessa { get; set; } = 0;
|
||||||
|
|
||||||
|
[StringLength(50)]
|
||||||
|
public string KeyRichiesta { get; set; } = "";
|
||||||
|
[StringLength(50)]
|
||||||
|
public string KeyBCode { get; set; } = "";
|
||||||
|
|
||||||
|
public bool Attivabile { get; set; } = false;
|
||||||
|
|
||||||
|
public int IdxODL { get; set; } = 0;
|
||||||
|
|
||||||
|
[StringLength(50)]
|
||||||
|
public string CodArticolo { get; set; } = "";
|
||||||
|
|
||||||
|
[StringLength(50)]
|
||||||
|
public string CodGruppo { get; set; } = "";
|
||||||
|
|
||||||
|
[StringLength(50)]
|
||||||
|
public string IdxMacchina { get; set; } = "";
|
||||||
|
|
||||||
|
public int NumPezzi { get; set; } = 0;
|
||||||
|
|
||||||
|
public decimal TCAssegnato { get; set; } = 0;
|
||||||
|
|
||||||
|
public DateTime DueDate { get; set; } = DateTime.Today;
|
||||||
|
|
||||||
|
public int Priorita { get; set; } = 0;
|
||||||
|
public int PzPallet { get; set; } = 0;
|
||||||
|
|
||||||
|
[StringLength(2500)]
|
||||||
|
public string Note { get; set; } = "";
|
||||||
|
|
||||||
|
[StringLength(50)]
|
||||||
|
public string CodCli { get; set; } = "";
|
||||||
|
|
||||||
|
public DateTime InsertDate { get; set; } = DateTime.Today;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace EgwProxy.SqlDb.DbModels
|
||||||
|
{
|
||||||
|
// <Auto-Generated>
|
||||||
|
// This is here so CodeMaid doesn't reorganize this document
|
||||||
|
// </Auto-Generated>
|
||||||
|
[Table("MachineProdData")]
|
||||||
|
public partial class MachProdDataModel
|
||||||
|
{
|
||||||
|
[Key, Column("IdxPD"), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
|
public int Id { get; set; } = 0;
|
||||||
|
|
||||||
|
public DateTime DtEve { get; set; } = DateTime.Now;
|
||||||
|
|
||||||
|
[StringLength(50)]
|
||||||
|
public string IdxMacchina { get; set; } = "";
|
||||||
|
|
||||||
|
public string Action { get; set; } = "";
|
||||||
|
|
||||||
|
public string CodComm { get; set; } = "";
|
||||||
|
|
||||||
|
public int PzCount { get; set; } = 0;
|
||||||
|
|
||||||
|
public int IdxPodl { get; set; } = 0;
|
||||||
|
|
||||||
|
public int IdxOdl { get; set; } = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace EgwProxy.SqlDb.DbModels
|
||||||
|
{
|
||||||
|
// <Auto-Generated>
|
||||||
|
// This is here so CodeMaid doesn't reorganize this document
|
||||||
|
// </Auto-Generated>
|
||||||
|
[Table("MachineSignalLog")]
|
||||||
|
public partial class MachSigLogModel
|
||||||
|
{
|
||||||
|
[Key, Column("IdxEv"), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
|
public int Id { get; set; } = 0;
|
||||||
|
|
||||||
|
public DateTime DtEve { get; set; } = DateTime.Now;
|
||||||
|
|
||||||
|
[StringLength(50)]
|
||||||
|
public string IdxMacchina { get; set; } = "";
|
||||||
|
|
||||||
|
public int ValInt { get; set; } = 0;
|
||||||
|
|
||||||
|
public string Valore { get; set; } = "";
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace EgwProxy.SqlDb.DbModels
|
||||||
|
{
|
||||||
|
// <Auto-Generated>
|
||||||
|
// This is here so CodeMaid doesn't reorganize this document
|
||||||
|
// </Auto-Generated>
|
||||||
|
[Table("MesPODL_last")]
|
||||||
|
public partial class MesPODLLastModel
|
||||||
|
{
|
||||||
|
[Key]
|
||||||
|
public int IdxRec { get; set; } = 0;
|
||||||
|
|
||||||
|
public int IdxPromessa { get; set; } = 0;
|
||||||
|
|
||||||
|
[StringLength(50)]
|
||||||
|
public string KeyRichiesta { get; set; } = "";
|
||||||
|
[StringLength(50)]
|
||||||
|
public string KeyBCode { get; set; } = "";
|
||||||
|
|
||||||
|
public bool Attivabile { get; set; } = false;
|
||||||
|
|
||||||
|
public int IdxODL { get; set; } = 0;
|
||||||
|
|
||||||
|
[StringLength(50)]
|
||||||
|
public string CodArticolo { get; set; } = "";
|
||||||
|
|
||||||
|
[StringLength(50)]
|
||||||
|
public string CodGruppo { get; set; } = "";
|
||||||
|
|
||||||
|
[StringLength(50)]
|
||||||
|
public string IdxMacchina { get; set; } = "";
|
||||||
|
|
||||||
|
public int NumPezzi { get; set; } = 0;
|
||||||
|
|
||||||
|
public decimal TCAssegnato { get; set; } = 0;
|
||||||
|
|
||||||
|
public DateTime DueDate { get; set; } = DateTime.Today;
|
||||||
|
|
||||||
|
public int Priorita { get; set; } = 0;
|
||||||
|
public int PzPallet { get; set; } = 0;
|
||||||
|
|
||||||
|
[StringLength(2500)]
|
||||||
|
public string Note { get; set; } = "";
|
||||||
|
|
||||||
|
[StringLength(50)]
|
||||||
|
public string CodCli { get; set; } = "";
|
||||||
|
|
||||||
|
public DateTime InsertDate { get; set; } = DateTime.Today;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace EgwProxy.SqlDb.DbModels
|
||||||
|
{
|
||||||
|
// <Auto-Generated>
|
||||||
|
// This is here so CodeMaid doesn't reorganize this document
|
||||||
|
// </Auto-Generated>
|
||||||
|
[Table("MesPODL_req")]
|
||||||
|
public partial class MesPODLReqModel
|
||||||
|
{
|
||||||
|
[Key]
|
||||||
|
public int IdxRec { get; set; } = 0;
|
||||||
|
|
||||||
|
public int IdxPromessa { get; set; } = 0;
|
||||||
|
|
||||||
|
[StringLength(50)]
|
||||||
|
public string KeyRichiesta { get; set; } = "";
|
||||||
|
[StringLength(50)]
|
||||||
|
public string KeyBCode { get; set; } = "";
|
||||||
|
|
||||||
|
public bool Attivabile { get; set; } = false;
|
||||||
|
|
||||||
|
public int IdxODL { get; set; } = 0;
|
||||||
|
|
||||||
|
[StringLength(50)]
|
||||||
|
public string CodArticolo { get; set; } = "";
|
||||||
|
|
||||||
|
[StringLength(50)]
|
||||||
|
public string CodGruppo { get; set; } = "";
|
||||||
|
|
||||||
|
[StringLength(50)]
|
||||||
|
public string IdxMacchina { get; set; } = "";
|
||||||
|
|
||||||
|
public int NumPezzi { get; set; } = 0;
|
||||||
|
|
||||||
|
public decimal TCAssegnato { get; set; } = 0;
|
||||||
|
|
||||||
|
public DateTime DueDate { get; set; } = DateTime.Today;
|
||||||
|
|
||||||
|
public int Priorita { get; set; } = 0;
|
||||||
|
public int PzPallet { get; set; } = 0;
|
||||||
|
|
||||||
|
[StringLength(2500)]
|
||||||
|
public string Note { get; set; } = "";
|
||||||
|
|
||||||
|
[StringLength(50)]
|
||||||
|
public string CodCli { get; set; } = "";
|
||||||
|
|
||||||
|
public DateTime InsertDate { get; set; } = DateTime.Today;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace EgwProxy.SqlDb.DbModels
|
||||||
|
{
|
||||||
|
// <Auto-Generated>
|
||||||
|
// This is here so CodeMaid doesn't reorganize this document
|
||||||
|
// </Auto-Generated>
|
||||||
|
[Table("SyncState")]
|
||||||
|
public partial class SyncStateModel
|
||||||
|
{
|
||||||
|
[Key, StringLength(250)]
|
||||||
|
public string TableName { get; set; } = "";
|
||||||
|
|
||||||
|
public long LastIdx { get; set; } = 0;
|
||||||
|
|
||||||
|
public string Note { get; set; } = "";
|
||||||
|
|
||||||
|
public DateTime LastUpdate { get; set; } = DateTime.Today;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,162 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.props" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" />
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{A5F9E2C8-B866-4470-923C-11BA35270963}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>EgwProxy.SqlDb</RootNamespace>
|
||||||
|
<AssemblyName>EgwProxy.SqlDb</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<Deterministic>true</Deterministic>
|
||||||
|
<NuGetPackageImportStamp>
|
||||||
|
</NuGetPackageImportStamp>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Remote_DEBUG|AnyCPU'">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<OutputPath>bin\Remote_DEBUG\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<LangVersion>7.3</LangVersion>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.SqlServer.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\NLog.5.1.2\lib\net46\NLog.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
|
<Reference Include="System.Configuration" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.IO.Compression" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Controllers\DbController.cs" />
|
||||||
|
<Compile Include="DbModels\MachProdDataModel.cs" />
|
||||||
|
<Compile Include="DbModels\MachSigLogModel.cs" />
|
||||||
|
<Compile Include="DbModels\MachFluxLogModel.cs" />
|
||||||
|
<Compile Include="DbModels\ActTypeModel.cs" />
|
||||||
|
<Compile Include="DbModels\MesPODLReqModel.cs" />
|
||||||
|
<Compile Include="DbModels\MesPODLLastModel.cs" />
|
||||||
|
<Compile Include="DbModels\MachPODLModel.cs" />
|
||||||
|
<Compile Include="DbModels\ActListModel.cs" />
|
||||||
|
<Compile Include="DbModels\SyncStateModel.cs" />
|
||||||
|
<Compile Include="Migrations\202303131052295_InitialDb.cs" />
|
||||||
|
<Compile Include="Migrations\202303131052295_InitialDb.designer.cs">
|
||||||
|
<DependentUpon>202303131052295_InitialDb.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Migrations\202303131054149_AddStoredProc.cs" />
|
||||||
|
<Compile Include="Migrations\202303131054149_AddStoredProc.designer.cs">
|
||||||
|
<DependentUpon>202303131054149_AddStoredProc.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Migrations\202303141853160_FixSigLogTable.cs" />
|
||||||
|
<Compile Include="Migrations\202303141853160_FixSigLogTable.designer.cs">
|
||||||
|
<DependentUpon>202303141853160_FixSigLogTable.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Migrations\202303150807341_AddMacProdData.cs" />
|
||||||
|
<Compile Include="Migrations\202303150807341_AddMacProdData.designer.cs">
|
||||||
|
<DependentUpon>202303150807341_AddMacProdData.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Migrations\ConfigurationInit.cs" />
|
||||||
|
<Compile Include="MyDbInitializer.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="SyncStateDbContext.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="App.config" />
|
||||||
|
<None Include="docfx.json" />
|
||||||
|
<None Include="index.md" />
|
||||||
|
<None Include="packages.config" />
|
||||||
|
<None Include="toc.yml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="SqlScript\AddFunc.sql">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Include="StoredProc\stp_GetMachineProdData.sql">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Include="StoredProc\stp_GetMachineEvList.sql">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Include="StoredProc\stp_ResetPodlMes.sql">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Include="StoredProc\stp_ExportAll.sql">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Include="StoredProc\stp_ImportAll.sql">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Include="StoredProc\stp_BackupDb.sql">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Include="StoredProc\stp_GetMachineFluxLog.sql">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Include="StoredProc\stp_GetMachineSigLog.sql">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Include="StoredProc\stp_SyncPodlToMachine.sql">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="Migrations\202303131052295_InitialDb.resx">
|
||||||
|
<DependentUpon>202303131052295_InitialDb.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Migrations\202303131054149_AddStoredProc.resx">
|
||||||
|
<DependentUpon>202303131054149_AddStoredProc.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Migrations\202303141853160_FixSigLogTable.resx">
|
||||||
|
<DependentUpon>202303141853160_FixSigLogTable.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Migrations\202303150807341_AddMacProdData.resx">
|
||||||
|
<DependentUpon>202303150807341_AddMacProdData.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup />
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.props'))" />
|
||||||
|
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.targets'))" />
|
||||||
|
</Target>
|
||||||
|
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" />
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
namespace EgwProxy.SqlDb.Migrations
|
||||||
|
{
|
||||||
|
using System.CodeDom.Compiler;
|
||||||
|
using System.Data.Entity.Migrations;
|
||||||
|
using System.Data.Entity.Migrations.Infrastructure;
|
||||||
|
using System.Resources;
|
||||||
|
|
||||||
|
[GeneratedCode("EntityFramework.Migrations", "6.4.4")]
|
||||||
|
public sealed partial class InitialDb : IMigrationMetadata
|
||||||
|
{
|
||||||
|
private readonly ResourceManager Resources = new ResourceManager(typeof(InitialDb));
|
||||||
|
|
||||||
|
string IMigrationMetadata.Id
|
||||||
|
{
|
||||||
|
get { return "202303131052295_InitialDb"; }
|
||||||
|
}
|
||||||
|
|
||||||
|
string IMigrationMetadata.Source
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
string IMigrationMetadata.Target
|
||||||
|
{
|
||||||
|
get { return Resources.GetString("Target"); }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,157 @@
|
|||||||
|
namespace EgwProxy.SqlDb.Migrations
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
using System.Data.Entity.Migrations;
|
||||||
|
|
||||||
|
public partial class InitialDb : DbMigration
|
||||||
|
{
|
||||||
|
public override void Up()
|
||||||
|
{
|
||||||
|
CreateTable(
|
||||||
|
"dbo.ActList",
|
||||||
|
c => new
|
||||||
|
{
|
||||||
|
IdxAct = c.Int(nullable: false, identity: true),
|
||||||
|
DtRif = c.DateTime(nullable: false),
|
||||||
|
Source = c.String(maxLength: 50),
|
||||||
|
Dest = c.String(maxLength: 50),
|
||||||
|
Action = c.String(maxLength: 250),
|
||||||
|
Value = c.String(maxLength: 500),
|
||||||
|
})
|
||||||
|
.PrimaryKey(t => t.IdxAct);
|
||||||
|
|
||||||
|
CreateTable(
|
||||||
|
"dbo.ActType",
|
||||||
|
c => new
|
||||||
|
{
|
||||||
|
Action = c.String(nullable: false, maxLength: 250),
|
||||||
|
Description = c.String(maxLength: 500),
|
||||||
|
})
|
||||||
|
.PrimaryKey(t => t.Action);
|
||||||
|
|
||||||
|
CreateTable(
|
||||||
|
"dbo.MachineEventList",
|
||||||
|
c => new
|
||||||
|
{
|
||||||
|
IdxEv = c.Int(nullable: false, identity: true),
|
||||||
|
InizioStato = c.DateTime(nullable: false),
|
||||||
|
IdxMacchina = c.String(maxLength: 50),
|
||||||
|
IdxTipo = c.Int(nullable: false),
|
||||||
|
CodArticolo = c.String(maxLength: 50),
|
||||||
|
Value = c.String(maxLength: 250),
|
||||||
|
MatrOpr = c.Int(nullable: false),
|
||||||
|
Pallet = c.String(maxLength: 20),
|
||||||
|
})
|
||||||
|
.PrimaryKey(t => t.IdxEv);
|
||||||
|
|
||||||
|
CreateTable(
|
||||||
|
"dbo.MachineFluxLog",
|
||||||
|
c => new
|
||||||
|
{
|
||||||
|
IdxFL = c.Int(nullable: false, identity: true),
|
||||||
|
DtEvento = c.DateTime(nullable: false),
|
||||||
|
IdxMacchina = c.String(maxLength: 50),
|
||||||
|
CodFlux = c.String(maxLength: 50),
|
||||||
|
Valore = c.String(maxLength: 250),
|
||||||
|
Cnt = c.Int(nullable: false),
|
||||||
|
})
|
||||||
|
.PrimaryKey(t => t.IdxFL);
|
||||||
|
|
||||||
|
CreateTable(
|
||||||
|
"dbo.MachinePODL",
|
||||||
|
c => new
|
||||||
|
{
|
||||||
|
IdxRec = c.Int(nullable: false, identity: true),
|
||||||
|
IdxPromessa = c.Int(nullable: false),
|
||||||
|
KeyRichiesta = c.String(maxLength: 50),
|
||||||
|
KeyBCode = c.String(maxLength: 50),
|
||||||
|
Attivabile = c.Boolean(nullable: false),
|
||||||
|
IdxODL = c.Int(nullable: false),
|
||||||
|
CodArticolo = c.String(maxLength: 50),
|
||||||
|
CodGruppo = c.String(maxLength: 50),
|
||||||
|
IdxMacchina = c.String(maxLength: 50),
|
||||||
|
NumPezzi = c.Int(nullable: false),
|
||||||
|
TCAssegnato = c.Decimal(nullable: false, precision: 18, scale: 2),
|
||||||
|
DueDate = c.DateTime(nullable: false),
|
||||||
|
Priorita = c.Int(nullable: false),
|
||||||
|
PzPallet = c.Int(nullable: false),
|
||||||
|
Note = c.String(maxLength: 2500),
|
||||||
|
CodCli = c.String(maxLength: 50),
|
||||||
|
InsertDate = c.DateTime(nullable: false),
|
||||||
|
})
|
||||||
|
.PrimaryKey(t => t.IdxRec);
|
||||||
|
|
||||||
|
CreateTable(
|
||||||
|
"dbo.MesPODL_last",
|
||||||
|
c => new
|
||||||
|
{
|
||||||
|
IdxRec = c.Int(nullable: false, identity: true),
|
||||||
|
IdxPromessa = c.Int(nullable: false),
|
||||||
|
KeyRichiesta = c.String(maxLength: 50),
|
||||||
|
KeyBCode = c.String(maxLength: 50),
|
||||||
|
Attivabile = c.Boolean(nullable: false),
|
||||||
|
IdxODL = c.Int(nullable: false),
|
||||||
|
CodArticolo = c.String(maxLength: 50),
|
||||||
|
CodGruppo = c.String(maxLength: 50),
|
||||||
|
IdxMacchina = c.String(maxLength: 50),
|
||||||
|
NumPezzi = c.Int(nullable: false),
|
||||||
|
TCAssegnato = c.Decimal(nullable: false, precision: 18, scale: 2),
|
||||||
|
DueDate = c.DateTime(nullable: false),
|
||||||
|
Priorita = c.Int(nullable: false),
|
||||||
|
PzPallet = c.Int(nullable: false),
|
||||||
|
Note = c.String(maxLength: 2500),
|
||||||
|
CodCli = c.String(maxLength: 50),
|
||||||
|
InsertDate = c.DateTime(nullable: false),
|
||||||
|
})
|
||||||
|
.PrimaryKey(t => t.IdxRec);
|
||||||
|
|
||||||
|
CreateTable(
|
||||||
|
"dbo.MesPODL_req",
|
||||||
|
c => new
|
||||||
|
{
|
||||||
|
IdxRec = c.Int(nullable: false, identity: true),
|
||||||
|
IdxPromessa = c.Int(nullable: false),
|
||||||
|
KeyRichiesta = c.String(maxLength: 50),
|
||||||
|
KeyBCode = c.String(maxLength: 50),
|
||||||
|
Attivabile = c.Boolean(nullable: false),
|
||||||
|
IdxODL = c.Int(nullable: false),
|
||||||
|
CodArticolo = c.String(maxLength: 50),
|
||||||
|
CodGruppo = c.String(maxLength: 50),
|
||||||
|
IdxMacchina = c.String(maxLength: 50),
|
||||||
|
NumPezzi = c.Int(nullable: false),
|
||||||
|
TCAssegnato = c.Decimal(nullable: false, precision: 18, scale: 2),
|
||||||
|
DueDate = c.DateTime(nullable: false),
|
||||||
|
Priorita = c.Int(nullable: false),
|
||||||
|
PzPallet = c.Int(nullable: false),
|
||||||
|
Note = c.String(maxLength: 2500),
|
||||||
|
CodCli = c.String(maxLength: 50),
|
||||||
|
InsertDate = c.DateTime(nullable: false),
|
||||||
|
})
|
||||||
|
.PrimaryKey(t => t.IdxRec);
|
||||||
|
|
||||||
|
CreateTable(
|
||||||
|
"dbo.SyncState",
|
||||||
|
c => new
|
||||||
|
{
|
||||||
|
TableName = c.String(nullable: false, maxLength: 250),
|
||||||
|
LastIdx = c.Long(nullable: false),
|
||||||
|
Note = c.String(),
|
||||||
|
LastUpdate = c.DateTime(nullable: false),
|
||||||
|
})
|
||||||
|
.PrimaryKey(t => t.TableName);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Down()
|
||||||
|
{
|
||||||
|
DropTable("dbo.SyncState");
|
||||||
|
DropTable("dbo.MesPODL_req");
|
||||||
|
DropTable("dbo.MesPODL_last");
|
||||||
|
DropTable("dbo.MachinePODL");
|
||||||
|
DropTable("dbo.MachineFluxLog");
|
||||||
|
DropTable("dbo.MachineEventList");
|
||||||
|
DropTable("dbo.ActType");
|
||||||
|
DropTable("dbo.ActList");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,126 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="Target" xml:space="preserve">
|
||||||
|
<value>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</value>
|
||||||
|
</data>
|
||||||
|
<data name="DefaultSchema" xml:space="preserve">
|
||||||
|
<value>dbo</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
namespace EgwProxy.SqlDb.Migrations
|
||||||
|
{
|
||||||
|
using System.CodeDom.Compiler;
|
||||||
|
using System.Data.Entity.Migrations;
|
||||||
|
using System.Data.Entity.Migrations.Infrastructure;
|
||||||
|
using System.Resources;
|
||||||
|
|
||||||
|
[GeneratedCode("EntityFramework.Migrations", "6.4.4")]
|
||||||
|
public sealed partial class AddStoredProc : IMigrationMetadata
|
||||||
|
{
|
||||||
|
private readonly ResourceManager Resources = new ResourceManager(typeof(AddStoredProc));
|
||||||
|
|
||||||
|
string IMigrationMetadata.Id
|
||||||
|
{
|
||||||
|
get { return "202303131054149_AddStoredProc"; }
|
||||||
|
}
|
||||||
|
|
||||||
|
string IMigrationMetadata.Source
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
string IMigrationMetadata.Target
|
||||||
|
{
|
||||||
|
get { return Resources.GetString("Target"); }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
namespace EgwProxy.SqlDb.Migrations
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
using System.Data.Entity.Migrations;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
public partial class AddStoredProc : DbMigration
|
||||||
|
{
|
||||||
|
public override void Up()
|
||||||
|
{
|
||||||
|
AlterColumn("dbo.ActList", "Value", c => c.String(maxLength: 2500));
|
||||||
|
|
||||||
|
// aggiunta stored
|
||||||
|
addStoredProc("stp_SyncPodlToMachine");
|
||||||
|
addStoredProc("stp_GetMachineEvList");
|
||||||
|
addStoredProc("stp_GetMachineFluxLog");
|
||||||
|
addStoredProc("stp_GetMachineProdData");
|
||||||
|
addStoredProc("stp_GetMachineSigLog");
|
||||||
|
addStoredProc("stp_BackupDb");
|
||||||
|
addStoredProc("stp_ExportAll");
|
||||||
|
addStoredProc("stp_ImportAll");
|
||||||
|
addStoredProc("stp_ResetPodlMes");
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Down()
|
||||||
|
{
|
||||||
|
AlterColumn("dbo.ActList", "Value", c => c.String(maxLength: 500));
|
||||||
|
|
||||||
|
// drop delle stored
|
||||||
|
DropStoredProcedure("dbo.stp_SyncPodlToMachine");
|
||||||
|
DropStoredProcedure("dbo.stp_GetMachineEvList");
|
||||||
|
DropStoredProcedure("dbo.stp_GetMachineFluxLog");
|
||||||
|
DropStoredProcedure("dbo.stp_GetMachineProdData");
|
||||||
|
DropStoredProcedure("dbo.stp_GetMachineSigLog");
|
||||||
|
DropStoredProcedure("dbo.stp_BackupDb");
|
||||||
|
DropStoredProcedure("dbo.stp_ExportAll");
|
||||||
|
DropStoredProcedure("dbo.stp_ImportAll");
|
||||||
|
DropStoredProcedure("dbo.stp_ResetPodlMes");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void addStoredProc(string storedName)
|
||||||
|
{
|
||||||
|
string path = Path.Combine("StoredProc", $"{storedName}.sql");
|
||||||
|
string storedBody = File.ReadAllText(path);
|
||||||
|
CreateStoredProcedure($"dbo.{storedName}", storedBody);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,126 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="Target" xml:space="preserve">
|
||||||
|
<value>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</value>
|
||||||
|
</data>
|
||||||
|
<data name="DefaultSchema" xml:space="preserve">
|
||||||
|
<value>dbo</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
namespace EgwProxy.SqlDb.Migrations
|
||||||
|
{
|
||||||
|
using System.CodeDom.Compiler;
|
||||||
|
using System.Data.Entity.Migrations;
|
||||||
|
using System.Data.Entity.Migrations.Infrastructure;
|
||||||
|
using System.Resources;
|
||||||
|
|
||||||
|
[GeneratedCode("EntityFramework.Migrations", "6.4.4")]
|
||||||
|
public sealed partial class FixSigLogTable : IMigrationMetadata
|
||||||
|
{
|
||||||
|
private readonly ResourceManager Resources = new ResourceManager(typeof(FixSigLogTable));
|
||||||
|
|
||||||
|
string IMigrationMetadata.Id
|
||||||
|
{
|
||||||
|
get { return "202303141853160_FixSigLogTable"; }
|
||||||
|
}
|
||||||
|
|
||||||
|
string IMigrationMetadata.Source
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
string IMigrationMetadata.Target
|
||||||
|
{
|
||||||
|
get { return Resources.GetString("Target"); }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
namespace EgwProxy.SqlDb.Migrations
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
using System.Data.Entity.Migrations;
|
||||||
|
|
||||||
|
public partial class FixSigLogTable : DbMigration
|
||||||
|
{
|
||||||
|
public override void Up()
|
||||||
|
{
|
||||||
|
CreateTable(
|
||||||
|
"dbo.MachineSignalLog",
|
||||||
|
c => new
|
||||||
|
{
|
||||||
|
IdxEv = c.Int(nullable: false, identity: true),
|
||||||
|
DtEve = c.DateTime(nullable: false),
|
||||||
|
IdxMacchina = c.String(maxLength: 50),
|
||||||
|
ValInt = c.Int(nullable: false),
|
||||||
|
Valore = c.String(),
|
||||||
|
})
|
||||||
|
.PrimaryKey(t => t.IdxEv);
|
||||||
|
|
||||||
|
DropTable("dbo.MachineEventList");
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Down()
|
||||||
|
{
|
||||||
|
CreateTable(
|
||||||
|
"dbo.MachineEventList",
|
||||||
|
c => new
|
||||||
|
{
|
||||||
|
IdxEv = c.Int(nullable: false, identity: true),
|
||||||
|
InizioStato = c.DateTime(nullable: false),
|
||||||
|
IdxMacchina = c.String(maxLength: 50),
|
||||||
|
IdxTipo = c.Int(nullable: false),
|
||||||
|
CodArticolo = c.String(maxLength: 50),
|
||||||
|
Value = c.String(maxLength: 250),
|
||||||
|
MatrOpr = c.Int(nullable: false),
|
||||||
|
Pallet = c.String(maxLength: 20),
|
||||||
|
})
|
||||||
|
.PrimaryKey(t => t.IdxEv);
|
||||||
|
|
||||||
|
DropTable("dbo.MachineSignalLog");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,126 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="Target" xml:space="preserve">
|
||||||
|
<value>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</value>
|
||||||
|
</data>
|
||||||
|
<data name="DefaultSchema" xml:space="preserve">
|
||||||
|
<value>dbo</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
namespace EgwProxy.SqlDb.Migrations
|
||||||
|
{
|
||||||
|
using System.CodeDom.Compiler;
|
||||||
|
using System.Data.Entity.Migrations;
|
||||||
|
using System.Data.Entity.Migrations.Infrastructure;
|
||||||
|
using System.Resources;
|
||||||
|
|
||||||
|
[GeneratedCode("EntityFramework.Migrations", "6.4.4")]
|
||||||
|
public sealed partial class AddMacProdData : IMigrationMetadata
|
||||||
|
{
|
||||||
|
private readonly ResourceManager Resources = new ResourceManager(typeof(AddMacProdData));
|
||||||
|
|
||||||
|
string IMigrationMetadata.Id
|
||||||
|
{
|
||||||
|
get { return "202303150807341_AddMacProdData"; }
|
||||||
|
}
|
||||||
|
|
||||||
|
string IMigrationMetadata.Source
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
string IMigrationMetadata.Target
|
||||||
|
{
|
||||||
|
get { return Resources.GetString("Target"); }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
namespace EgwProxy.SqlDb.Migrations
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
using System.Data.Entity.Migrations;
|
||||||
|
|
||||||
|
public partial class AddMacProdData : DbMigration
|
||||||
|
{
|
||||||
|
public override void Up()
|
||||||
|
{
|
||||||
|
CreateTable(
|
||||||
|
"dbo.MachineProdData",
|
||||||
|
c => new
|
||||||
|
{
|
||||||
|
IdxPD = c.Int(nullable: false, identity: true),
|
||||||
|
DtEve = c.DateTime(nullable: false),
|
||||||
|
IdxMacchina = c.String(maxLength: 50),
|
||||||
|
Action = c.String(),
|
||||||
|
CodComm = c.String(),
|
||||||
|
PzCount = c.Int(nullable: false),
|
||||||
|
IdxPodl = c.Int(nullable: false),
|
||||||
|
IdxOdl = c.Int(nullable: false),
|
||||||
|
})
|
||||||
|
.PrimaryKey(t => t.IdxPD);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Down()
|
||||||
|
{
|
||||||
|
DropTable("dbo.MachineProdData");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,126 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="Target" xml:space="preserve">
|
||||||
|
<value>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</value>
|
||||||
|
</data>
|
||||||
|
<data name="DefaultSchema" xml:space="preserve">
|
||||||
|
<value>dbo</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
namespace EgwProxy.SqlDb.Migrations
|
||||||
|
{
|
||||||
|
using EgwProxy.SqlDb.DbModels;
|
||||||
|
using System;
|
||||||
|
using System.Data.Entity;
|
||||||
|
using System.Data.Entity.Migrations;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
//public class ConfigurationInit : DropCreateDatabaseAlways<SyncStateDbContext>
|
||||||
|
public class ConfigurationInit : DbMigrationsConfiguration<SyncStateDbContext>
|
||||||
|
{
|
||||||
|
public ConfigurationInit()
|
||||||
|
{
|
||||||
|
AutomaticMigrationsEnabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Seed(SyncStateDbContext context)
|
||||||
|
{
|
||||||
|
// aggiunta preliminare tipo attività sync ammessi
|
||||||
|
context.DbSetActListType.AddOrUpdate<ActTypeModel>(
|
||||||
|
new ActTypeModel() { Action = "SetPodlData", Description = "Sincronizzazione dati PODL | MES --> MACH" },
|
||||||
|
new ActTypeModel() { Action = "GetPodlData", Description = "Lettura stato macchina x avvio prod ODL da PODL e sync relativa | MACH --> MES" },
|
||||||
|
new ActTypeModel() { Action = "GetEvList", Description = "Lettura info da impianto e decodifica come EvList | MACH --> MES" },
|
||||||
|
new ActTypeModel() { Action = "GetFluxLog", Description = "Lettura info da impianto e decodifica come FluxLog | MACH --> MES" },
|
||||||
|
new ActTypeModel() { Action = "GetSigLog", Description = "Lettura info da impianto e decodifica come SignalLog | MACH --> MES" },
|
||||||
|
new ActTypeModel() { Action = "StartProd", Description = "Dichiarazione inizio lavorazione (commessa) | MACH --> MES" },
|
||||||
|
new ActTypeModel() { Action = "EndProd", Description = "Dichiarazione fine lavorazione (commessa) | MACH --> MES" }
|
||||||
|
);
|
||||||
|
|
||||||
|
context.DbSetSyncState.AddOrUpdate<SyncStateModel>(
|
||||||
|
new SyncStateModel() { TableName = "ActList", LastIdx = 0, Note = "NO EXEC", LastUpdate = DateTime.Today },
|
||||||
|
new SyncStateModel() { TableName = "PODL_req", LastIdx = 0, Note = "NO EXEC", LastUpdate = DateTime.Today },
|
||||||
|
new SyncStateModel() { TableName = "EvList", LastIdx = 0, Note = "NO EXEC", LastUpdate = DateTime.Today },
|
||||||
|
new SyncStateModel() { TableName = "FluxLog", LastIdx = 0, Note = "NO EXEC", LastUpdate = DateTime.Today }
|
||||||
|
);
|
||||||
|
|
||||||
|
base.Seed(context);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
using EgwProxy.SqlDb.DbModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data.Entity;
|
||||||
|
using System.Data.Entity.Migrations;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace EgwProxy.SqlDb
|
||||||
|
{
|
||||||
|
public class MyDbInitializer : IDatabaseInitializer<SyncStateDbContext>
|
||||||
|
{
|
||||||
|
public void InitializeDatabase(SyncStateDbContext context)
|
||||||
|
{
|
||||||
|
// aggiunta preliminare tipo attività sync ammessi
|
||||||
|
context.DbSetActListType.AddOrUpdate<ActTypeModel>(
|
||||||
|
new ActTypeModel() { Action = "SetPodlData", Description = "Sincronizzazione dati PODL | MES --> MACH" },
|
||||||
|
new ActTypeModel() { Action = "GetPodlData", Description = "Lettura stato macchina x avvio prod ODL da PODL e sync relativa | MACH --> MES" },
|
||||||
|
new ActTypeModel() { Action = "GetEvList", Description = "Lettura info da impianto e decodifica come EvList | MACH --> MES" },
|
||||||
|
new ActTypeModel() { Action = "GetFluxLog", Description = "Lettura info da impianto e decodifica come FluxLog | MACH --> MES" }
|
||||||
|
);
|
||||||
|
|
||||||
|
context.DbSetSyncState.AddOrUpdate<SyncStateModel>(
|
||||||
|
new SyncStateModel() { TableName = "ActList", LastIdx = 0, Note = "NO EXEC", LastUpdate = DateTime.Today },
|
||||||
|
new SyncStateModel() { TableName = "PODL_req", LastIdx = 0, Note = "NO EXEC", LastUpdate = DateTime.Today },
|
||||||
|
new SyncStateModel() { TableName = "EvList", LastIdx = 0, Note = "NO EXEC", LastUpdate = DateTime.Today },
|
||||||
|
new SyncStateModel() { TableName = "FluxLog", LastIdx = 0, Note = "NO EXEC", LastUpdate = DateTime.Today }
|
||||||
|
);
|
||||||
|
|
||||||
|
context.SaveChanges();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
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("EgwProxy.SqlDb")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("EgwProxy.SqlDb")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2023")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
|
// to COM components. If you need to access a type in this assembly from
|
||||||
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
|
[assembly: Guid("a5f9e2c8-b866-4470-923c-11ba35270963")]
|
||||||
|
|
||||||
|
// Version information for an assembly consists of the following four values:
|
||||||
|
//
|
||||||
|
// Major Version
|
||||||
|
// Minor Version
|
||||||
|
// Build Number
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
|
// by using the '*' as shown below:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
|
||||||
|
/***************************************
|
||||||
|
* FUNCTION f_padLeft
|
||||||
|
*
|
||||||
|
* fornisce una stringa della lunghezza desiderata aggiungendo a sx il carattere richiesto alla @string originale
|
||||||
|
*
|
||||||
|
* Steamware, S.E.L.
|
||||||
|
* mod: 2010.03.19
|
||||||
|
*
|
||||||
|
****************************************/
|
||||||
|
CREATE FUNCTION [dbo].[f_padLeft] (@string VARCHAR(255), @desired_length INTEGER, @pad_character CHAR(1))
|
||||||
|
RETURNS VARCHAR(255) AS
|
||||||
|
BEGIN
|
||||||
|
|
||||||
|
-- Prefix the required number of spaces to bulk up the string and then replace the spaces with the desired character
|
||||||
|
RETURN CASE
|
||||||
|
WHEN LEN(@string) < @desired_length
|
||||||
|
THEN REPLACE(SPACE(@desired_length - LEN(@string)), ' ', @pad_character) + @string
|
||||||
|
ELSE @string
|
||||||
|
END
|
||||||
|
|
||||||
|
END
|
||||||
|
|
||||||
|
GO;
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
-- SET NOCOUNT ON added to prevent extra result sets from
|
||||||
|
-- interfering with SELECT statements.
|
||||||
|
SET NOCOUNT ON;
|
||||||
|
|
||||||
|
-- Effettua backjup del database nella cartella configurata (di default C:\DbBackup) per il DB di default --> modificare di conseguenza...
|
||||||
|
BACKUP DATABASE MoonPro_IOB_ISF
|
||||||
|
TO DISK = 'C:\Steamware\DbBackup\MoonPro_IOB_ISF.bak'
|
||||||
|
WITH FORMAT,
|
||||||
|
MEDIANAME = 'SQLServerBackups',
|
||||||
|
NAME = 'Full Backup of IOB ISF DB';
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
-- SET NOCOUNT ON added to prevent extra result sets from
|
||||||
|
-- interfering with SELECT statements.
|
||||||
|
SET NOCOUNT ON;
|
||||||
|
|
||||||
|
-- Effettua tutte le chiamate di export specifiche per il processo e poi restituisce lettura tabella SyncState
|
||||||
|
SELECT *
|
||||||
|
FROM SyncState
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
-- SET NOCOUNT ON added to prevent extra result sets from
|
||||||
|
-- interfering with SELECT statements.
|
||||||
|
SET NOCOUNT ON;
|
||||||
|
|
||||||
|
/* --------------------------------------------------
|
||||||
|
* DECODIFICA STANDARD
|
||||||
|
* STATE MACHINE 60
|
||||||
|
* bitmap MAPO
|
||||||
|
* B0: POWER_ON
|
||||||
|
* B1: RUN
|
||||||
|
* B2: pzCount
|
||||||
|
* B3: allarme
|
||||||
|
* B4: manuale
|
||||||
|
* B5: slowTC
|
||||||
|
* B6: WarmUpCoolDown
|
||||||
|
* B7: emergenza
|
||||||
|
* -------------------------------------------------- */
|
||||||
|
|
||||||
|
-- Effettua le verifiche necessarie sulle varie tabelle, leggendo dall'ultimo punto precedente e popolando MachineEventList
|
||||||
|
SELECT *
|
||||||
|
FROM MachineEventList
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
-- SET NOCOUNT ON added to prevent extra result sets from
|
||||||
|
-- interfering with SELECT statements.
|
||||||
|
SET NOCOUNT ON;
|
||||||
|
|
||||||
|
/* --------------------------------------------------
|
||||||
|
* Popola le tabelle parametri secondo disponibilità per successivo sync/invio
|
||||||
|
* -------------------------------------------------- */
|
||||||
|
|
||||||
|
-- Effettua le verifiche necessarie sulle varie tabelle, leggendo dall'ultimo punto precedente e popolando MachineFluxLog
|
||||||
|
SELECT *
|
||||||
|
FROM MachineFluxLog
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
-- SET NOCOUNT ON added to prevent extra result sets from
|
||||||
|
-- interfering with SELECT statements.
|
||||||
|
SET NOCOUNT ON;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- Effettua le verifiche necessarie sulle varie tabelle, leggendo dall'ultimo punto precedente e popolando MachineEventList
|
||||||
|
SELECT *
|
||||||
|
FROM MachineProdData
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
-- SET NOCOUNT ON added to prevent extra result sets from
|
||||||
|
-- interfering with SELECT statements.
|
||||||
|
SET NOCOUNT ON;
|
||||||
|
|
||||||
|
BEGIN tran
|
||||||
|
|
||||||
|
-- dichiarazioni variabili x recupero dati
|
||||||
|
DECLARE @LastIdx INT = 0
|
||||||
|
DECLARE @NewIdx INT = 0
|
||||||
|
|
||||||
|
-- recupero valore ultima riga stato processata...
|
||||||
|
SELECT @LastIdx = ISNULL(LastIdx,0)
|
||||||
|
FROM SyncState
|
||||||
|
WHERE TableName = 'ToMachineSigLog'
|
||||||
|
|
||||||
|
-- recupero nuovo MAX idx
|
||||||
|
SELECT @NewIdx = ISNULL(MAX(ID),0)
|
||||||
|
FROM syn_M2ERP_MACHINE_STATE
|
||||||
|
|
||||||
|
-- eseguo SOLO SE ho dati aggiuntivi...
|
||||||
|
IF(@NewIdx > @LastIdx)
|
||||||
|
BEGIN
|
||||||
|
/* --------------------------------------------------
|
||||||
|
* DECODIFICA STANDARD
|
||||||
|
* STATE MACHINE 60
|
||||||
|
* bitmap MAPO
|
||||||
|
* B0: POWER_ON
|
||||||
|
* B1: RUN
|
||||||
|
* B2: pzCount
|
||||||
|
* B3: allarme
|
||||||
|
* B4: manuale
|
||||||
|
* B5: slowTC
|
||||||
|
* B6: WarmUpCoolDown
|
||||||
|
* B7: emergenza
|
||||||
|
* -------------------------------------------------- */
|
||||||
|
|
||||||
|
-- decodifica colonne PAMA:
|
||||||
|
-- M_ON --> PowerON (B0)
|
||||||
|
-- Auto --> Lavora (B1)
|
||||||
|
-- AlarmMode --> Allarme (B3)
|
||||||
|
-- ManualMode/Mda/Jog --> Manuale (B4)
|
||||||
|
-- Mda/Jog --> Manuale (B4)
|
||||||
|
-- ManualMode --> Manuale (B4)
|
||||||
|
|
||||||
|
-- recupero i nuovi record da processare...
|
||||||
|
;WITH cteSigLog AS
|
||||||
|
(
|
||||||
|
SELECT [DateTime] AS DtEve
|
||||||
|
,Targa AS IdxMacchina
|
||||||
|
, 128 -- B7: emergenza armata (B7 --> 128)
|
||||||
|
+ CASE WHEN M_ON = 1 THEN 1 ELSE 0 END -- B0: spenta
|
||||||
|
+ CASE WHEN [Auto] = 1 THEN 2 ELSE 0 END -- B1: lavora
|
||||||
|
+ CASE WHEN AlarmMode = 1 THEN 8 ELSE 0 END -- B3: allarme
|
||||||
|
+ CASE WHEN (ManualMode = 1 OR Mda = 1 OR Jog = 1) THEN 16 ELSE 0 END -- B4: manuale
|
||||||
|
AS ValInt
|
||||||
|
FROM syn_M2ERP_MACHINE_STATE
|
||||||
|
WHERE ID > @LastIdx AND ID <= @NewIdx
|
||||||
|
)
|
||||||
|
|
||||||
|
--vero insert valori
|
||||||
|
INSERT INTO MachineSignalLog(DtEve, IdxMacchina, ValInt, Valore)
|
||||||
|
SELECT *
|
||||||
|
,CONVERT(VARCHAR(1000),CONVERT(VARBINARY(2), ValInt), 2) AS Valore
|
||||||
|
--,CONVERT(VARBINARY(2), ValInt) AS Valore
|
||||||
|
FROM cteSigLog
|
||||||
|
|
||||||
|
-- aggiorno valore indice processato
|
||||||
|
MERGE SyncState AS tgt
|
||||||
|
USING (SELECT @NewIdx as LastIdx, 'ToMachineSigLog' AS TableName) as src (LastIdx, TableName)
|
||||||
|
ON (tgt.TableName = src.TableName)
|
||||||
|
WHEN MATCHED THEN
|
||||||
|
UPDATE SET LastIdx = src.LastIdx
|
||||||
|
,Note = 'UPDATED from ' + CAST(@LastIdx AS NVARCHAR(50))
|
||||||
|
,LastUpdate = GETDATE()
|
||||||
|
WHEN NOT MATCHED THEN
|
||||||
|
INSERT (LastIdx, TableName, Note, LastUpdate)
|
||||||
|
VALUES (src.LastIdx, src.TableName, 'CREATED', GETDATE());
|
||||||
|
|
||||||
|
END
|
||||||
|
|
||||||
|
COMMIT tran
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
-- SET NOCOUNT ON added to prevent extra result sets from
|
||||||
|
-- interfering with SELECT statements.
|
||||||
|
SET NOCOUNT ON;
|
||||||
|
|
||||||
|
-- Effettua tutti i task di import e poi restituisce lettura tabella SyncState
|
||||||
|
SELECT *
|
||||||
|
FROM SyncState
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
|
||||||
|
-- SET NOCOUNT ON added to prevent extra result sets from
|
||||||
|
-- interfering with SELECT statements.
|
||||||
|
SET NOCOUNT ON;
|
||||||
|
|
||||||
|
-- Effettua reset delle tabelle PODL (ATTENZIONE!!!), da decommentare
|
||||||
|
--TRUNCATE TABLE MesPODL_req;
|
||||||
|
--DBCC CHECKIDENT ('MesPODL_req', RESEED, 0);
|
||||||
|
|
||||||
|
--TRUNCATE TABLE MesPODL_last;
|
||||||
|
--DBCC CHECKIDENT ('MesPODL_last', RESEED, 0);
|
||||||
|
|
||||||
|
-- elenco righe finale
|
||||||
|
SELECT *
|
||||||
|
FROM MesPODL_req
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
|
||||||
|
-- SET NOCOUNT ON added to prevent extra result sets from
|
||||||
|
-- interfering with SELECT statements.
|
||||||
|
SET NOCOUNT ON;
|
||||||
|
|
||||||
|
-- Calcola i NUOVI PODL e scrive ADD relativo
|
||||||
|
SELECT *
|
||||||
|
FROM MesPODL_last
|
||||||
|
|
||||||
|
-- Calcola i VECCHI PODL e scrive DELETE relativo
|
||||||
|
SELECT *
|
||||||
|
FROM MesPODL_req
|
||||||
|
|
||||||
|
-- Calcola i PODL modificati e scrive update relativo
|
||||||
|
SELECT *
|
||||||
|
FROM MesPODL_req
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
using EgwProxy.SqlDb.DbModels;
|
||||||
|
using EgwProxy.SqlDb.Migrations;
|
||||||
|
using NLog;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data.Entity;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace EgwProxy.SqlDb
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Classe per accesso dati SyncState del DB
|
||||||
|
/// </summary>
|
||||||
|
public partial class SyncStateDbContext : DbContext
|
||||||
|
{
|
||||||
|
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Costruttore implicito
|
||||||
|
/// </summary>
|
||||||
|
public SyncStateDbContext() : base("name=SyncState")
|
||||||
|
{
|
||||||
|
Log.Info("Init 01 SyncStateDbContext - DONE");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected string connString = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Costruttore da connectionString
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="connectionString"></param>
|
||||||
|
public SyncStateDbContext(string connectionString) : base(connectionString)
|
||||||
|
{
|
||||||
|
Log.Info("Init 02 SyncStateDbContext - DONE");
|
||||||
|
connString = connectionString;
|
||||||
|
#if false
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// se non ci fosse... crea o migra!
|
||||||
|
Database.CreateIfNotExists();
|
||||||
|
Database.SetInitializer(new MyDbInitializer());
|
||||||
|
Database.Initialize(false);
|
||||||
|
}
|
||||||
|
catch (Exception exc)
|
||||||
|
{
|
||||||
|
Log.Error(exc, "Exception during context initialization 02");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
public void DbForceMigrate()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// se non ci fosse... crea o migra!
|
||||||
|
//Database.Migrate();
|
||||||
|
Database.CreateIfNotExists();
|
||||||
|
Database.SetInitializer(new MyDbInitializer());
|
||||||
|
Database.Initialize(true);
|
||||||
|
Log.Info("DbForceMigrate: done!");
|
||||||
|
}
|
||||||
|
catch (Exception exc)
|
||||||
|
{
|
||||||
|
Log.Error(exc, "DbForceMigrate: Exception during context initialization 01");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// DbSet Flux Log già decodificato
|
||||||
|
/// </summary>
|
||||||
|
public virtual DbSet<ActTypeModel> DbSetActListType{ get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// DbSet dei dati stato sync DB esterni <--> locale
|
||||||
|
/// </summary>
|
||||||
|
public virtual DbSet<SyncStateModel> DbSetSyncState { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// DbSet ActionList da MES / MACCHINA
|
||||||
|
/// </summary>
|
||||||
|
public virtual DbSet<ActListModel> DbSetActions { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// DbSet PODL da Macchina
|
||||||
|
/// </summary>
|
||||||
|
public virtual DbSet<MachPODLModel> DbSetMachPODL { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// DbSet PODL Req da MES
|
||||||
|
/// </summary>
|
||||||
|
public virtual DbSet<MesPODLReqModel> DbSetMesPodlReq { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// DbSet PODL Last da MES
|
||||||
|
/// </summary>
|
||||||
|
public virtual DbSet<MesPODLLastModel> DbSetMesPodlLast { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// DbSet Flux Log già decodificato
|
||||||
|
/// </summary>
|
||||||
|
public virtual DbSet<MachFluxLogModel> DbSetMachFluxLog { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// DbSet Flux Log già decodificato
|
||||||
|
/// </summary>
|
||||||
|
public virtual DbSet<MachSigLogModel> DbSetMachEvList { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// DbSet Prod Data da macchina
|
||||||
|
/// </summary>
|
||||||
|
public virtual DbSet<MachProdDataModel> DbSetMachProdData { get; set; }
|
||||||
|
|
||||||
|
protected override void OnModelCreating(DbModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
{
|
||||||
|
"metadata": [
|
||||||
|
{
|
||||||
|
"src": [
|
||||||
|
{
|
||||||
|
"files": [
|
||||||
|
"*.csproj",
|
||||||
|
"*.vbproj"
|
||||||
|
],
|
||||||
|
"cwd": ".",
|
||||||
|
"exclude": [
|
||||||
|
"**/obj/**",
|
||||||
|
"**/bin/**",
|
||||||
|
"_site/**"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dest": "obj/api"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"build": {
|
||||||
|
"content": [
|
||||||
|
{
|
||||||
|
"files": [
|
||||||
|
"api/**.yml"
|
||||||
|
],
|
||||||
|
"cwd": "obj"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"files": [
|
||||||
|
"api/*.md",
|
||||||
|
"articles/**.md",
|
||||||
|
"toc.yml",
|
||||||
|
"*.md"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"obj/**",
|
||||||
|
"_site/**"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"resource": [
|
||||||
|
{
|
||||||
|
"files": [
|
||||||
|
"images/**"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"obj/**",
|
||||||
|
"_site/**"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"overwrite": [
|
||||||
|
{
|
||||||
|
"files": [
|
||||||
|
"apidoc/**.md"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"obj/**",
|
||||||
|
"_site/**"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dest": "_site",
|
||||||
|
"template": [
|
||||||
|
"default"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# EgwProxy.SqlDb Library
|
||||||
|
|
||||||
|
Documentazione relativa alla libreria di interfaccia con un generico DB SQL di frontiera per le operazioni di R/W dei dati di produzione.
|
||||||
|
|
||||||
|
Disponibile in forma di pacchetto nuget sul repo aziendale nexus.steamware.net: i pacchetti sono disponibili all'indirizzo
|
||||||
|
|
||||||
|
https://nexus.steamware.net/#browse/browse:nuget-hosted
|
||||||
|
|
||||||
|
Vedere la sezione Articles per maggiori informazioni sulle definizioni, l'impiego ed esempi.
|
||||||
|
|
||||||
|
## Articles
|
||||||
|
|
||||||
|
Per maggiori dettagli, definizioni e demo funzionamento si rimanda alla sezione Articles
|
||||||
|
|
||||||
|
## Api
|
||||||
|
|
||||||
|
Per ogni dettaglio e riferimento alla libreria si rimanda alla sezione Api Documentation
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="EntityFramework" version="6.4.4" targetFramework="net462" />
|
||||||
|
<package id="NLog" version="5.1.2" targetFramework="net462" />
|
||||||
|
</packages>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
- name: Articles
|
||||||
|
href: articles/
|
||||||
|
- name: API Documentation
|
||||||
|
href: obj/api/
|
||||||
|
homepage: api/index.md
|
||||||
@@ -562,6 +562,16 @@ namespace IOB_UT_NEXT
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
SIEMENS_TORRI,
|
SIEMENS_TORRI,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adapter basato su DB scambio Microsoft SqlServer, macchine LANTEK
|
||||||
|
/// </summary>
|
||||||
|
SQLSERVER_LANTEK,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adapter basato su DB scambio Microsoft SqlServer, macchine PAMA
|
||||||
|
/// </summary>
|
||||||
|
SQLSERVER_PAMA,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Metodi di WPS WebPageScraping (es x compressori Atlas Copco)
|
/// Metodi di WPS WebPageScraping (es x compressori Atlas Copco)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -85,10 +85,10 @@
|
|||||||
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.6.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.6.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NLog.4.7.13\lib\net45\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.5.1.2\lib\net46\NLog.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Pipelines.Sockets.Unofficial, Version=1.0.0.0, Culture=neutral, PublicKeyToken=42ea0a778e13fbe2, processorArchitecture=MSIL">
|
<Reference Include="Pipelines.Sockets.Unofficial, Version=1.0.0.0, Culture=neutral, PublicKeyToken=42ea0a778e13fbe2, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Pipelines.Sockets.Unofficial.2.2.2\lib\net461\Pipelines.Sockets.Unofficial.dll</HintPath>
|
<HintPath>..\packages\Pipelines.Sockets.Unofficial.2.2.2\lib\net461\Pipelines.Sockets.Unofficial.dll</HintPath>
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
<packages>
|
<packages>
|
||||||
<package id="MapoSDK" version="6.14.2211.3016" targetFramework="net462" />
|
<package id="MapoSDK" version="6.14.2211.3016" targetFramework="net462" />
|
||||||
<package id="Microsoft.Bcl.AsyncInterfaces" version="6.0.0" targetFramework="net462" />
|
<package id="Microsoft.Bcl.AsyncInterfaces" version="6.0.0" targetFramework="net462" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net462" />
|
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net462" />
|
||||||
<package id="NLog" version="4.7.13" targetFramework="net462" />
|
<package id="NLog" version="5.1.2" targetFramework="net462" />
|
||||||
<package id="Pipelines.Sockets.Unofficial" version="2.2.2" targetFramework="net462" />
|
<package id="Pipelines.Sockets.Unofficial" version="2.2.2" targetFramework="net462" />
|
||||||
<package id="SharpZipLib" version="1.3.1" targetFramework="net462" />
|
<package id="SharpZipLib" version="1.3.1" targetFramework="net462" />
|
||||||
<package id="StackExchange.Redis" version="2.6.80" targetFramework="net462" />
|
<package id="StackExchange.Redis" version="2.6.80" targetFramework="net462" />
|
||||||
|
|||||||
@@ -1576,6 +1576,9 @@ namespace IOB_WIN_NEXT
|
|||||||
optPar = optParRead,
|
optPar = optParRead,
|
||||||
versIOB = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(),
|
versIOB = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(),
|
||||||
codIOB = fIni.ReadString("IOB", "IOB_NAME", CurrIOB),
|
codIOB = fIni.ReadString("IOB", "IOB_NAME", CurrIOB),
|
||||||
|
disableExeTask = bool.Parse(fIni.ReadString("IOB", "DIS_EXE_TASK", "false")),
|
||||||
|
disableStateCh = bool.Parse(fIni.ReadString("IOB", "DIS_STATE_CH", "false")),
|
||||||
|
filenameIOB = CurrIOB,
|
||||||
minDeltaSec = fIni.ReadInteger("IOB", "MinDeltaSec", 6),
|
minDeltaSec = fIni.ReadInteger("IOB", "MinDeltaSec", 6),
|
||||||
cncIpAddr = fIni.ReadString("CNC", "IP", "::1"),
|
cncIpAddr = fIni.ReadString("CNC", "IP", "::1"),
|
||||||
cncPort = fIni.ReadString("CNC", "PORT", "0"),
|
cncPort = fIni.ReadString("CNC", "PORT", "0"),
|
||||||
@@ -1883,6 +1886,16 @@ namespace IOB_WIN_NEXT
|
|||||||
start.Enabled = true;
|
start.Enabled = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case tipoAdapter.SQLSERVER_LANTEK:
|
||||||
|
iobObj = new IobSqlServLantek(this, IOBConf);
|
||||||
|
start.Enabled = true;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case tipoAdapter.SQLSERVER_PAMA:
|
||||||
|
iobObj = new IobSqlServPama(this, IOBConf);
|
||||||
|
start.Enabled = true;
|
||||||
|
break;
|
||||||
|
|
||||||
case tipoAdapter.WPS:
|
case tipoAdapter.WPS:
|
||||||
iobObj = new IobWPS(this, IOBConf);
|
iobObj = new IobWPS(this, IOBConf);
|
||||||
start.Enabled = true;
|
start.Enabled = true;
|
||||||
@@ -2003,11 +2016,12 @@ namespace IOB_WIN_NEXT
|
|||||||
Dictionary<string, string> setPar = new Dictionary<string, string>();
|
Dictionary<string, string> setPar = new Dictionary<string, string>();
|
||||||
setPar.Add("IP", iobObj.cIobConf.cncIpAddr);
|
setPar.Add("IP", iobObj.cIobConf.cncIpAddr);
|
||||||
setPar.Add("PORT", iobObj.cIobConf.cncPort);
|
setPar.Add("PORT", iobObj.cIobConf.cncPort);
|
||||||
string note = $"DT ultimo avvio: {iobObj.dtAvvioAdp}";
|
string note = $"{iobObj.cIobConf.codIOB} | DT ultimo avvio: {iobObj.dtAvvioAdp}";
|
||||||
// verifico IOB status
|
// verifico IOB status
|
||||||
IobWinStatus currIobStatus = new IobWinStatus()
|
IobWinStatus currIobStatus = new IobWinStatus()
|
||||||
{
|
{
|
||||||
CodIob = iobObj.cIobConf.codIOB,
|
//CodIob = iobObj.cIobConf.codIOB,
|
||||||
|
CodIob = iobObj.cIobConf.filenameIOB,
|
||||||
IobType = iobObj.cIobConf.tipoIob.ToString(),
|
IobType = iobObj.cIobConf.tipoIob.ToString(),
|
||||||
queueAlLen = alQueueLen,
|
queueAlLen = alQueueLen,
|
||||||
queueEvLen = evQueueLen,
|
queueEvLen = evQueueLen,
|
||||||
|
|||||||
@@ -133,6 +133,10 @@
|
|||||||
<assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
|
<assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
|
<bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
<system.web>
|
<system.web>
|
||||||
|
|||||||
@@ -0,0 +1,83 @@
|
|||||||
|
;Configurazione IOB-WIN
|
||||||
|
[IOB]
|
||||||
|
;Accesso gestione sync DB x sync PAMA --> MoonPro_IOB_ISF --> Chiamate REST
|
||||||
|
CNCTYPE=SQLSERVER_PAMA
|
||||||
|
PING_MS_TIMEOUT=500
|
||||||
|
MinDeltaSec=5
|
||||||
|
|
||||||
|
[MACHINE]
|
||||||
|
VENDOR=PAMA
|
||||||
|
MODEL=Alesatrice 392
|
||||||
|
|
||||||
|
[CNC]
|
||||||
|
IP=127.0.0.1
|
||||||
|
PORT=1443
|
||||||
|
GETPRGNAME=false
|
||||||
|
|
||||||
|
[SERVER]
|
||||||
|
MPIP=http://192.168.0.110
|
||||||
|
MPURL=/MP/IO
|
||||||
|
CMDBASE=/IOB/input/
|
||||||
|
CMDFLOG=/IOB/flog/
|
||||||
|
CMDALIVE=/IOB
|
||||||
|
CMDENABLED=/IOB/enabled/
|
||||||
|
CMDADV1=?valore=
|
||||||
|
CMDREBO=/sendReboot.aspx?idxMacchina=
|
||||||
|
CMDRAWTRANSF=/IOB/rawTransfJson/
|
||||||
|
|
||||||
|
[MEMORY]
|
||||||
|
ADDR_READ=DB9999.DBB0
|
||||||
|
ADDR_WRITE=DB9999.DBB0
|
||||||
|
SIZE_READ=0
|
||||||
|
SIZE_WRITE=0
|
||||||
|
;BIT0=CONN
|
||||||
|
;BIT1=DB60.DBB1
|
||||||
|
;BIT2=PZCOUNT.STD.DB700.DBW22
|
||||||
|
;BIT3=DB60.DBB3
|
||||||
|
;BIT4=DB60.DBB4
|
||||||
|
|
||||||
|
|
||||||
|
[BLINK]
|
||||||
|
;MAX_COUNTER_BLINK = 30
|
||||||
|
MAX_COUNTER_BLINK = 15
|
||||||
|
;bit0 = 0
|
||||||
|
;bit1 = 0
|
||||||
|
;bit2 = 1
|
||||||
|
;bit3 = 1
|
||||||
|
;bit4 = 1
|
||||||
|
;bit5 = 0
|
||||||
|
;bit6 = 0
|
||||||
|
;bit7 = 0
|
||||||
|
BLINK_FILT=0
|
||||||
|
;BLINK_FILT=28
|
||||||
|
|
||||||
|
[OPTPAR]
|
||||||
|
AUTO_CHANGE_ODL=false
|
||||||
|
CHANGE_ODL_MODE=TIME
|
||||||
|
CHANGE_ODL_HOURS=24
|
||||||
|
CHANGE_ODL_IDLE_MIN=5
|
||||||
|
PZCOUNT_MODE=PAMA
|
||||||
|
DISABLE_PZCOUNT=FALSE
|
||||||
|
ENABLE_SEND_PZC_BLOCK=TRUE
|
||||||
|
MIN_SEND_PZC_BLOCK=0
|
||||||
|
MAX_SEND_PZC_BLOCK=100
|
||||||
|
ENABLE_DYN_DATA=TRUE
|
||||||
|
FORCE_DYN_DATA=TRUE
|
||||||
|
DEM_FACT_DYN_DATA=5
|
||||||
|
ENABLE_DATA_FILTER=TRUE
|
||||||
|
ENABLE_CLI_RESTART=TRUE
|
||||||
|
SyncStateServer=308SERVER60\LANTEK
|
||||||
|
SyncStateDb=MoonPro_IOB_ISF_PAMA
|
||||||
|
SyncStateUser=steamware
|
||||||
|
SyncStatePwd=viadante16
|
||||||
|
SyncStateCTout=
|
||||||
|
VetoReadSec=2
|
||||||
|
|
||||||
|
; clock base (da 10ms)
|
||||||
|
timerIntMs=20
|
||||||
|
|
||||||
|
; conf parametri memoria READ/WRITE
|
||||||
|
PARAM_CONF=IMI_PAMA_392.json
|
||||||
|
|
||||||
|
[BRANCH]
|
||||||
|
NAME=master
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"mMapWrite": {
|
||||||
|
|
||||||
|
},
|
||||||
|
"mMapRead": {
|
||||||
|
//"TotMerceProcTonn": {
|
||||||
|
// "name": "TotMerceProcTonn",
|
||||||
|
// "description": "Totale merce processata oggi su impianto (Tonn)",
|
||||||
|
// "memAddr": "TotMerceProcTonn",
|
||||||
|
// "tipoMem": "Real",
|
||||||
|
// "index": 0,
|
||||||
|
// "size": 0,
|
||||||
|
// "func": "MAX",
|
||||||
|
// "period": 60,
|
||||||
|
// "factor": 1
|
||||||
|
//},
|
||||||
|
//"TotMerceCaricTonn": {
|
||||||
|
// "name": "TotMerceCaricTonn",
|
||||||
|
// "description": "Totale merce caricata oggi su impianto (Tonn)",
|
||||||
|
// "memAddr": "TotMerceCaricTonn",
|
||||||
|
// "tipoMem": "Real",
|
||||||
|
// "index": 0,
|
||||||
|
// "size": 0,
|
||||||
|
// "func": "MAX",
|
||||||
|
// "period": 60,
|
||||||
|
// "factor": 1
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,6 +4,9 @@
|
|||||||
CNCTYPE=MODBUS_TCP_RIMOR
|
CNCTYPE=MODBUS_TCP_RIMOR
|
||||||
PING_MS_TIMEOUT=1000
|
PING_MS_TIMEOUT=1000
|
||||||
MinDeltaSec=5
|
MinDeltaSec=5
|
||||||
|
IOB_NAME=IMI_RIMOR_SAB
|
||||||
|
DIS_EXE_TASK=FALSE
|
||||||
|
DIS_STATE_CH=FALSE
|
||||||
|
|
||||||
[MACHINE]
|
[MACHINE]
|
||||||
VENDOR=RIMOR
|
VENDOR=RIMOR
|
||||||
|
|||||||
@@ -1,5 +1,14 @@
|
|||||||
{
|
{
|
||||||
"mMapWrite": { },
|
"mMapWrite": {
|
||||||
|
"setProg": {
|
||||||
|
"name": "setProg",
|
||||||
|
"description": "Qty",
|
||||||
|
"memAddr": "421006",
|
||||||
|
"tipoMem": "Int",
|
||||||
|
"index": 21006,
|
||||||
|
"size": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
"mMapRead": {
|
"mMapRead": {
|
||||||
"OreFunzFiltro1": {
|
"OreFunzFiltro1": {
|
||||||
"name": "OreFunzFiltro1",
|
"name": "OreFunzFiltro1",
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
"400100": 60,
|
"400100": 60,
|
||||||
"400200": 20,
|
"400200": 20,
|
||||||
"420200": 20,
|
"420200": 20,
|
||||||
"400900": 80,
|
|
||||||
"420300": 20,
|
"420300": 20,
|
||||||
"420400": 20,
|
"420400": 20,
|
||||||
"421000": 20
|
"421000": 20
|
||||||
|
|||||||
@@ -4,13 +4,16 @@
|
|||||||
CNCTYPE=MODBUS_TCP_RIMOR
|
CNCTYPE=MODBUS_TCP_RIMOR
|
||||||
PING_MS_TIMEOUT=1000
|
PING_MS_TIMEOUT=1000
|
||||||
MinDeltaSec=5
|
MinDeltaSec=5
|
||||||
|
IOB_NAME=IMI_RIMOR_SAB
|
||||||
|
DIS_EXE_TASK=FALSE
|
||||||
|
DIS_STATE_CH=TRUE
|
||||||
|
|
||||||
[MACHINE]
|
[MACHINE]
|
||||||
VENDOR=RIMOR
|
VENDOR=RIMOR
|
||||||
MODEL=Sabbiatura - PLC
|
MODEL=Sabbiatura - HMI
|
||||||
|
|
||||||
[CNC]
|
[CNC]
|
||||||
IP=192.168.10.5
|
IP=192.168.10.6
|
||||||
PORT=502
|
PORT=502
|
||||||
|
|
||||||
[SERVER]
|
[SERVER]
|
||||||
@@ -24,13 +27,13 @@ CMDADV1=?valore=
|
|||||||
CMDREBO=/sendReboot.aspx?idxMacchina=
|
CMDREBO=/sendReboot.aspx?idxMacchina=
|
||||||
|
|
||||||
[MEMORY]
|
[MEMORY]
|
||||||
ADDR_READ=40001
|
ADDR_READ=40000
|
||||||
ADDR_WRITE=40001
|
ADDR_WRITE=40000
|
||||||
SIZE_READ=10
|
SIZE_READ=10
|
||||||
SIZE_WRITE=0
|
SIZE_WRITE=0
|
||||||
HR_BASE_ADDR=400000
|
HR_BASE_ADDR=40000
|
||||||
DELTA_BASE=0
|
DELTA_BASE=-1
|
||||||
MODBUS_EXT_REG=1
|
MODBUS_EXT_REG=0
|
||||||
|
|
||||||
|
|
||||||
[BLINK]
|
[BLINK]
|
||||||
@@ -64,13 +67,11 @@ DELTA_VAL=0.1
|
|||||||
timerIntMs=10
|
timerIntMs=10
|
||||||
|
|
||||||
; conf parametri memoria READ/WRITE
|
; conf parametri memoria READ/WRITE
|
||||||
PARAM_CONF=IMI_RIMOR_SAB_01.json
|
PARAM_CONF=IMI_RIMOR_SAB_02.json
|
||||||
|
|
||||||
NO_PING=FALSE
|
NO_PING=FALSE
|
||||||
; conf blocchi memoria x READ
|
; conf blocchi memoria x READ
|
||||||
MEM_BLOCK=IMI_RIMOR_SAB_01_MBlock.json
|
MEM_BLOCK=IMI_RIMOR_SAB_02_MBlock.json
|
||||||
; conf aree allarme
|
|
||||||
ALARM_CONF=IMI_RIMOR_SAB_01_alarm.json
|
|
||||||
|
|
||||||
; rimozione check limiti min/max dynData
|
; rimozione check limiti min/max dynData
|
||||||
disDynDataRangeCheck=true
|
disDynDataRangeCheck=true
|
||||||
|
|||||||
@@ -1,90 +1,74 @@
|
|||||||
{
|
{
|
||||||
"mMapWrite": {
|
"mMapWrite": {
|
||||||
|
"setArt": {
|
||||||
|
"name": "setArt",
|
||||||
|
"description": "Articolo",
|
||||||
|
"memAddr": "40901",
|
||||||
|
"tipoMem": "String",
|
||||||
|
"index": 901,
|
||||||
|
"size": 12
|
||||||
|
},
|
||||||
"setComm": {
|
"setComm": {
|
||||||
"name": "setComm",
|
"name": "setComm",
|
||||||
"description": "Commessa",
|
"description": "Commessa",
|
||||||
"memAddr": "40050",
|
"memAddr": "40921",
|
||||||
"tipoMem": "String",
|
"tipoMem": "String",
|
||||||
"index": 50,
|
"index": 921,
|
||||||
"size": 20
|
"size": 12
|
||||||
|
},
|
||||||
|
"setProg": {
|
||||||
|
"name": "setProg",
|
||||||
|
"description": "Qty",
|
||||||
|
"memAddr": "40941",
|
||||||
|
"tipoMem": "String",
|
||||||
|
"index": 941,
|
||||||
|
"size": 30
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mMapRead": {
|
"mMapRead": {
|
||||||
"AmpMot1": {
|
"setArt": {
|
||||||
"name": "AmpMot1",
|
"name": "setArt",
|
||||||
"description": "Assorbimento (MAX) motore 1 - catena linea1 motore 1 tazze A4.2",
|
"description": "Articolo",
|
||||||
"memAddr": "40003",
|
"memAddr": "40901",
|
||||||
"tipoMem": "Int",
|
"tipoMem": "String",
|
||||||
"index": 3,
|
"index": 901,
|
||||||
"size": 1,
|
"size": 12,
|
||||||
"func": "MAX",
|
"func": "POINT",
|
||||||
"period": 90,
|
"period": 90,
|
||||||
"factor": 0.01,
|
"factor": 1,
|
||||||
"minVal": 0,
|
"minVal": 0,
|
||||||
"maxVal": 999,
|
"maxVal": 999999,
|
||||||
"unit": "%"
|
"unit": ""
|
||||||
},
|
},
|
||||||
"AmpMot2": {
|
"setComm": {
|
||||||
"name": "AmpMot2",
|
"name": "setComm",
|
||||||
"description": "Assorbimento (MAX) motore 2 - catena linea2 motore 2 tazze A4.2",
|
"description": "Commessa",
|
||||||
"memAddr": "40004",
|
"memAddr": "40921",
|
||||||
"tipoMem": "Int",
|
"tipoMem": "String",
|
||||||
"index": 4,
|
"index": 921,
|
||||||
"size": 1,
|
"size": 12,
|
||||||
"func": "MAX",
|
"func": "POINT",
|
||||||
"period": 90,
|
"period": 90,
|
||||||
"factor": 0.01,
|
"factor": 1,
|
||||||
"minVal": 0,
|
"minVal": 0,
|
||||||
"maxVal": 999,
|
"maxVal": 0,
|
||||||
"unit": "%"
|
"unit": ""
|
||||||
},
|
},
|
||||||
"AmpMot3": {
|
"setProg": {
|
||||||
"name": "AmpMot3",
|
"name": "setProg",
|
||||||
"description": "Assorbimento (MAX) motore 3 - nastro uscita cesti motore 3 A2.4",
|
"description": "Qty",
|
||||||
"memAddr": "40005",
|
"memAddr": "40941",
|
||||||
"tipoMem": "Int",
|
"tipoMem": "String",
|
||||||
"index": 5,
|
"index": 941,
|
||||||
"size": 1,
|
"size": 30,
|
||||||
"func": "MAX",
|
"func": "POINT",
|
||||||
"period": 90,
|
"period": 90,
|
||||||
"factor": 0.01,
|
"factor": 1,
|
||||||
"minVal": 0,
|
"minVal": 0,
|
||||||
"maxVal": 999,
|
"maxVal": 0,
|
||||||
"unit": "%"
|
"unit": ""
|
||||||
},
|
|
||||||
"AmpMot4": {
|
|
||||||
"name": "AmpMot4",
|
|
||||||
"description": "Assorbimento (MAX) motore 4 - curva uscita cesti motore 4 A2.4",
|
|
||||||
"memAddr": "40006",
|
|
||||||
"tipoMem": "Int",
|
|
||||||
"index": 6,
|
|
||||||
"size": 1,
|
|
||||||
"func": "MAX",
|
|
||||||
"period": 90,
|
|
||||||
"factor": 0.01,
|
|
||||||
"minVal": 0,
|
|
||||||
"maxVal": 999,
|
|
||||||
"unit": "%"
|
|
||||||
},
|
|
||||||
"AmpMot5": {
|
|
||||||
"name": "AmpMot5",
|
|
||||||
"description": "Assorbimento (MAX) motore 5 - nastro ingresso casse vuote motore 5 A2.4",
|
|
||||||
"memAddr": "40007",
|
|
||||||
"tipoMem": "Int",
|
|
||||||
"index": 7,
|
|
||||||
"size": 1,
|
|
||||||
"func": "MAX",
|
|
||||||
"period": 90,
|
|
||||||
"factor": 0.01,
|
|
||||||
"minVal": 0,
|
|
||||||
"maxVal": 999,
|
|
||||||
"unit": "%"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"optMemPar": {
|
"optMemPar": {
|
||||||
"AlarmIntCond": "40000|0=0",
|
|
||||||
"ManualIntCond": "40000|0=1",
|
|
||||||
"EStopBitCond": "40001.0=1",
|
|
||||||
"WorkIntCond": "40000|0=2,4"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"ReadBlocks": {
|
"ReadBlocks": {
|
||||||
"40000": 10
|
"40900": 70
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"description": "Allarmi Impianto",
|
|
||||||
"tipoMem": "DInt",
|
|
||||||
"memAddr": "40000",
|
|
||||||
"index": 0,
|
|
||||||
"size": 2,
|
|
||||||
"messages": [
|
|
||||||
"##",
|
|
||||||
"##",
|
|
||||||
"##",
|
|
||||||
"##",
|
|
||||||
"##",
|
|
||||||
"##",
|
|
||||||
"##",
|
|
||||||
"##",
|
|
||||||
"EMERGENZA GENERALE",
|
|
||||||
"TERMICO SCATTATO",
|
|
||||||
"FAULT INVERTER",
|
|
||||||
"FAULT STEPPER",
|
|
||||||
"CARTER APERTI",
|
|
||||||
"PORTA SX APERTA",
|
|
||||||
"PORTA DX APERTA",
|
|
||||||
"CARTER APERTI"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "Allarmi Impianto",
|
|
||||||
"tipoMem": "DInt",
|
|
||||||
"memAddr": "40002",
|
|
||||||
"index": 2,
|
|
||||||
"size": 2,
|
|
||||||
"messages": [
|
|
||||||
"TOUT BF NASTRO 1",
|
|
||||||
"TOUT BF NASTRO 2",
|
|
||||||
"TOUT BF NASTRO 3",
|
|
||||||
"TOUT BF NASTRO 4",
|
|
||||||
"TOUT BF NASTRO 5",
|
|
||||||
"TOUT BF NASTRO 6",
|
|
||||||
"ALL MOTORULLO 1",
|
|
||||||
"ALL MOTORULLO 2",
|
|
||||||
"ALL MOTORULLO 3",
|
|
||||||
"ALL MOTORULLO 4",
|
|
||||||
"ALL MOTORULLO 5",
|
|
||||||
"ALL MOTORULLO 6",
|
|
||||||
"",
|
|
||||||
"",
|
|
||||||
"",
|
|
||||||
""
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
;Configurazione IOB-WIN
|
||||||
|
[IOB]
|
||||||
|
;Impianto Rimor verniciatura - IMI Remosa
|
||||||
|
CNCTYPE=MODBUS_TCP_RIMOR
|
||||||
|
PING_MS_TIMEOUT=1000
|
||||||
|
MinDeltaSec=5
|
||||||
|
IOB_NAME=IMI_RIMOR_VER
|
||||||
|
DIS_EXE_TASK=FALSE
|
||||||
|
DIS_STATE_CH=FALSE
|
||||||
|
|
||||||
|
[MACHINE]
|
||||||
|
VENDOR=RIMOR
|
||||||
|
MODEL=Verniciatura - PLC
|
||||||
|
|
||||||
|
[CNC]
|
||||||
|
IP=192.168.10.7
|
||||||
|
PORT=502
|
||||||
|
|
||||||
|
[SERVER]
|
||||||
|
MPIP=http://192.168.0.110
|
||||||
|
MPURL=/MP/IO
|
||||||
|
CMDBASE=/IOB/input/
|
||||||
|
CMDFLOG=/IOB/flog/
|
||||||
|
CMDALIVE=/IOB
|
||||||
|
CMDENABLED=/IOB/enabled/
|
||||||
|
CMDADV1=?valore=
|
||||||
|
CMDREBO=/sendReboot.aspx?idxMacchina=
|
||||||
|
|
||||||
|
[MEMORY]
|
||||||
|
ADDR_READ=400000
|
||||||
|
ADDR_WRITE=400000
|
||||||
|
SIZE_READ=10
|
||||||
|
SIZE_WRITE=0
|
||||||
|
HR_BASE_ADDR=400000
|
||||||
|
DELTA_BASE=-1
|
||||||
|
MODBUS_EXT_REG=1
|
||||||
|
|
||||||
|
|
||||||
|
[BLINK]
|
||||||
|
;MAX_COUNTER_BLINK = 30
|
||||||
|
MAX_COUNTER_BLINK = 15
|
||||||
|
;bit0 = 0
|
||||||
|
;bit1 = 0
|
||||||
|
;bit2 = 1
|
||||||
|
;bit3 = 1
|
||||||
|
;bit4 = 1
|
||||||
|
;bit5 = 0
|
||||||
|
;bit6 = 0
|
||||||
|
;bit7 = 0
|
||||||
|
BLINK_FILT=0
|
||||||
|
;BLINK_FILT=28
|
||||||
|
|
||||||
|
[OPTPAR]
|
||||||
|
;PZCOUNT_MODE=STD.[PAR/MEM].info|BIT.indice
|
||||||
|
PZCOUNT_MODE=STD.DB85.DBRE16
|
||||||
|
DISABLE_PZCOUNT=TRUE
|
||||||
|
ENABLE_SEND_PZC_BLOCK=TRUE
|
||||||
|
MIN_SEND_PZC_BLOCK=0
|
||||||
|
MAX_SEND_PZC_BLOCK=100
|
||||||
|
; GEST DATI DYN
|
||||||
|
ENABLE_DYN_DATA=TRUE
|
||||||
|
FORCE_DYN_DATA=TRUE
|
||||||
|
; gestione delta minimo accettabile tra min/MAX
|
||||||
|
DELTA_VAL=0.1
|
||||||
|
|
||||||
|
; clock base (da 10ms)
|
||||||
|
timerIntMs=10
|
||||||
|
|
||||||
|
; conf parametri memoria READ/WRITE
|
||||||
|
PARAM_CONF=IMI_RIMOR_VER_01.json
|
||||||
|
|
||||||
|
NO_PING=FALSE
|
||||||
|
; conf blocchi memoria x READ
|
||||||
|
MEM_BLOCK=IMI_RIMOR_VER_01_MBlock.json
|
||||||
|
; conf aree allarme
|
||||||
|
ALARM_CONF=IMI_RIMOR_VER_01_alarm.json
|
||||||
|
|
||||||
|
; rimozione check limiti min/max dynData
|
||||||
|
disDynDataRangeCheck=true
|
||||||
|
|
||||||
|
[BRANCH]
|
||||||
|
NAME=master
|
||||||
@@ -0,0 +1,216 @@
|
|||||||
|
{
|
||||||
|
"mMapWrite": {
|
||||||
|
"setProg": {
|
||||||
|
"name": "setProg",
|
||||||
|
"description": "Qty",
|
||||||
|
"memAddr": "406202",
|
||||||
|
"tipoMem": "Int",
|
||||||
|
"index": 6202,
|
||||||
|
"size": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mMapRead": {
|
||||||
|
"OreFunzFiltro1": {
|
||||||
|
"name": "OreFunzFiltro1",
|
||||||
|
"description": "Ore funzionamento filtro 1",
|
||||||
|
"memAddr": "406297",
|
||||||
|
"tipoMem": "Int",
|
||||||
|
"index": 6297,
|
||||||
|
"size": 1,
|
||||||
|
"func": "MAX",
|
||||||
|
"period": 90,
|
||||||
|
"factor": 1,
|
||||||
|
"minVal": 0,
|
||||||
|
"maxVal": 999999,
|
||||||
|
"unit": "h"
|
||||||
|
},
|
||||||
|
"MinFunzFiltro1": {
|
||||||
|
"name": "MinFunzFiltro1",
|
||||||
|
"description": "Minuti funzionamento filtro 1",
|
||||||
|
"memAddr": "406301",
|
||||||
|
"tipoMem": "Int",
|
||||||
|
"index": 6301,
|
||||||
|
"size": 1,
|
||||||
|
"func": "MAX",
|
||||||
|
"period": 90,
|
||||||
|
"factor": 1,
|
||||||
|
"minVal": 0,
|
||||||
|
"maxVal": 999999,
|
||||||
|
"unit": "m"
|
||||||
|
},
|
||||||
|
"OreFunzFiltroPar1": {
|
||||||
|
"name": "OreFunzFiltroPar1",
|
||||||
|
"description": "Ore funzionamento filtro 1 (contatore parziale azzerabile)",
|
||||||
|
"memAddr": "406299",
|
||||||
|
"tipoMem": "Int",
|
||||||
|
"index": 6299,
|
||||||
|
"size": 1,
|
||||||
|
"func": "MAX",
|
||||||
|
"period": 90,
|
||||||
|
"factor": 1,
|
||||||
|
"minVal": 0,
|
||||||
|
"maxVal": 999999,
|
||||||
|
"unit": "h"
|
||||||
|
},
|
||||||
|
"MinFunzFiltroPar1": {
|
||||||
|
"name": "MinFunzFiltroPar1",
|
||||||
|
"description": "Minuti funzionamento filtro 1 (contatore parziale azzerabile)",
|
||||||
|
"memAddr": "406302",
|
||||||
|
"tipoMem": "Int",
|
||||||
|
"index": 6302,
|
||||||
|
"size": 1,
|
||||||
|
"func": "MAX",
|
||||||
|
"period": 90,
|
||||||
|
"factor": 1,
|
||||||
|
"minVal": 0,
|
||||||
|
"maxVal": 999999,
|
||||||
|
"unit": "m"
|
||||||
|
},
|
||||||
|
"OreFunzFiltro2": {
|
||||||
|
"name": "OreFunzFiltro2",
|
||||||
|
"description": "Ore funzionamento filtro 2",
|
||||||
|
"memAddr": "406303",
|
||||||
|
"tipoMem": "Int",
|
||||||
|
"index": 6303,
|
||||||
|
"size": 1,
|
||||||
|
"func": "MAX",
|
||||||
|
"period": 90,
|
||||||
|
"factor": 1,
|
||||||
|
"minVal": 0,
|
||||||
|
"maxVal": 999999,
|
||||||
|
"unit": "h"
|
||||||
|
},
|
||||||
|
"MinFunzFiltro2": {
|
||||||
|
"name": "MinFunzFiltro2",
|
||||||
|
"description": "Minuti funzionamento filtro 2",
|
||||||
|
"memAddr": "406307",
|
||||||
|
"tipoMem": "Int",
|
||||||
|
"index": 6307,
|
||||||
|
"size": 1,
|
||||||
|
"func": "MAX",
|
||||||
|
"period": 90,
|
||||||
|
"factor": 1,
|
||||||
|
"minVal": 0,
|
||||||
|
"maxVal": 999999,
|
||||||
|
"unit": "m"
|
||||||
|
},
|
||||||
|
"OreFunzFiltroPar2": {
|
||||||
|
"name": "OreFunzFiltroPar2",
|
||||||
|
"description": "Ore funzionamento filtro 1 (contatore parziale azzerabile)",
|
||||||
|
"memAddr": "406305",
|
||||||
|
"tipoMem": "Int",
|
||||||
|
"index": 6305,
|
||||||
|
"size": 1,
|
||||||
|
"func": "MAX",
|
||||||
|
"period": 90,
|
||||||
|
"factor": 1,
|
||||||
|
"minVal": 0,
|
||||||
|
"maxVal": 999999,
|
||||||
|
"unit": "h"
|
||||||
|
},
|
||||||
|
"MinFunzFiltroPar2": {
|
||||||
|
"name": "MinFunzFiltroPar2",
|
||||||
|
"description": "Minuti funzionamento filtro 1 (contatore parziale azzerabile)",
|
||||||
|
"memAddr": "406308",
|
||||||
|
"tipoMem": "Int",
|
||||||
|
"index": 6308,
|
||||||
|
"size": 1,
|
||||||
|
"func": "MAX",
|
||||||
|
"period": 90,
|
||||||
|
"factor": 1,
|
||||||
|
"minVal": 0,
|
||||||
|
"maxVal": 999999,
|
||||||
|
"unit": "m"
|
||||||
|
},
|
||||||
|
"OreFunzAgitatori": {
|
||||||
|
"name": "OreFunzAgitatori",
|
||||||
|
"description": "Ore funzionamento Agitatori",
|
||||||
|
"memAddr": "406309",
|
||||||
|
"tipoMem": "Int",
|
||||||
|
"index": 6309,
|
||||||
|
"size": 1,
|
||||||
|
"func": "MAX",
|
||||||
|
"period": 90,
|
||||||
|
"factor": 1,
|
||||||
|
"minVal": 0,
|
||||||
|
"maxVal": 999999,
|
||||||
|
"unit": "h"
|
||||||
|
},
|
||||||
|
"MinFunzAgitatori": {
|
||||||
|
"name": "MinFunzAgitatori",
|
||||||
|
"description": "Minuti funzionamento Agitatori",
|
||||||
|
"memAddr": "406313",
|
||||||
|
"tipoMem": "Int",
|
||||||
|
"index": 6313,
|
||||||
|
"size": 1,
|
||||||
|
"func": "MAX",
|
||||||
|
"period": 90,
|
||||||
|
"factor": 1,
|
||||||
|
"minVal": 0,
|
||||||
|
"maxVal": 999999,
|
||||||
|
"unit": "m"
|
||||||
|
},
|
||||||
|
"OreFunzAgitatoriPar": {
|
||||||
|
"name": "OreFunzAgitatoriPar",
|
||||||
|
"description": "Ore funzionamento Agitatori (contatore parziale azzerabile)",
|
||||||
|
"memAddr": "406311",
|
||||||
|
"tipoMem": "Int",
|
||||||
|
"index": 6311,
|
||||||
|
"size": 1,
|
||||||
|
"func": "MAX",
|
||||||
|
"period": 90,
|
||||||
|
"factor": 1,
|
||||||
|
"minVal": 0,
|
||||||
|
"maxVal": 999999,
|
||||||
|
"unit": "h"
|
||||||
|
},
|
||||||
|
"MinFunzAgitatoriPar": {
|
||||||
|
"name": "MinFunzAgitatoriPar",
|
||||||
|
"description": "Minuti funzionamento Agitatori (contatore parziale azzerabile)",
|
||||||
|
"memAddr": "406314",
|
||||||
|
"tipoMem": "Int",
|
||||||
|
"index": 6314,
|
||||||
|
"size": 1,
|
||||||
|
"func": "MAX",
|
||||||
|
"period": 90,
|
||||||
|
"factor": 1,
|
||||||
|
"minVal": 0,
|
||||||
|
"maxVal": 999999,
|
||||||
|
"unit": "m"
|
||||||
|
},
|
||||||
|
"DurataLavorazione": {
|
||||||
|
"name": "DurataLavorazione",
|
||||||
|
"description": "Durata Lavorazione",
|
||||||
|
"memAddr": "406198",
|
||||||
|
"tipoMem": "Int",
|
||||||
|
"index": 6198,
|
||||||
|
"size": 1,
|
||||||
|
"func": "MAX",
|
||||||
|
"period": 90,
|
||||||
|
"factor": 1,
|
||||||
|
"minVal": 0,
|
||||||
|
"maxVal": 999999,
|
||||||
|
"unit": "h/m"
|
||||||
|
},
|
||||||
|
"StatoLavorazione": {
|
||||||
|
"name": "StatoLavorazione",
|
||||||
|
"description": "Stato Lavorazione",
|
||||||
|
"memAddr": "406200",
|
||||||
|
"tipoMem": "Int",
|
||||||
|
"index": 6200,
|
||||||
|
"size": 1,
|
||||||
|
"func": "MAX",
|
||||||
|
"period": 90,
|
||||||
|
"factor": 1,
|
||||||
|
"minVal": 0,
|
||||||
|
"maxVal": 999999,
|
||||||
|
"unit": "#"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"optMemPar": {
|
||||||
|
"AlarmIntCond": "406200|0=1",
|
||||||
|
"ManualIntCond": "406200|0=3",
|
||||||
|
//"EStopBitCond": "100040.0=1",
|
||||||
|
"WorkIntCond": "406200|0=2,4"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"ReadBlocks": {
|
||||||
|
//"100040": 20,
|
||||||
|
//"332760": 20,
|
||||||
|
"406190": 20,
|
||||||
|
"406290": 30,
|
||||||
|
"404200": 60,
|
||||||
|
"404300": 10
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"description": "Allarmi Impianto",
|
||||||
|
"tipoMem": "DInt",
|
||||||
|
"memAddr": "40000",
|
||||||
|
"index": 0,
|
||||||
|
"size": 2,
|
||||||
|
"messages": [
|
||||||
|
"##",
|
||||||
|
"##",
|
||||||
|
"##",
|
||||||
|
"##",
|
||||||
|
"##",
|
||||||
|
"##",
|
||||||
|
"##",
|
||||||
|
"##",
|
||||||
|
"##EMERGENZA GENERALE",
|
||||||
|
"##TERMICO SCATTATO",
|
||||||
|
"##FAULT INVERTER",
|
||||||
|
"##FAULT STEPPER",
|
||||||
|
"##CARTER APERTI",
|
||||||
|
"##PORTA SX APERTA",
|
||||||
|
"##PORTA DX APERTA",
|
||||||
|
"##CARTER APERTI"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Allarmi Impianto",
|
||||||
|
"tipoMem": "DInt",
|
||||||
|
"memAddr": "40002",
|
||||||
|
"index": 2,
|
||||||
|
"size": 2,
|
||||||
|
"messages": [
|
||||||
|
"##TOUT BF NASTRO 1",
|
||||||
|
"##TOUT BF NASTRO 2",
|
||||||
|
"##TOUT BF NASTRO 3",
|
||||||
|
"##TOUT BF NASTRO 4",
|
||||||
|
"##TOUT BF NASTRO 5",
|
||||||
|
"##TOUT BF NASTRO 6",
|
||||||
|
"##ALL MOTORULLO 1",
|
||||||
|
"##ALL MOTORULLO 2",
|
||||||
|
"##ALL MOTORULLO 3",
|
||||||
|
"##ALL MOTORULLO 4",
|
||||||
|
"##ALL MOTORULLO 5",
|
||||||
|
"##ALL MOTORULLO 6",
|
||||||
|
"##",
|
||||||
|
"##",
|
||||||
|
"##",
|
||||||
|
"##"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
;Configurazione IOB-WIN
|
||||||
|
[IOB]
|
||||||
|
;Impianto Rimor verniciatura - IMI Remosa
|
||||||
|
CNCTYPE=MODBUS_TCP_RIMOR
|
||||||
|
PING_MS_TIMEOUT=1000
|
||||||
|
MinDeltaSec=5
|
||||||
|
IOB_NAME=IMI_RIMOR_VER
|
||||||
|
DIS_EXE_TASK=FALSE
|
||||||
|
DIS_STATE_CH=TRUE
|
||||||
|
|
||||||
|
[MACHINE]
|
||||||
|
VENDOR=RIMOR
|
||||||
|
MODEL=Verniciatura - HMI
|
||||||
|
|
||||||
|
[CNC]
|
||||||
|
IP=192.168.10.8
|
||||||
|
PORT=502
|
||||||
|
|
||||||
|
[SERVER]
|
||||||
|
MPIP=http://192.168.0.110
|
||||||
|
MPURL=/MP/IO
|
||||||
|
CMDBASE=/IOB/input/
|
||||||
|
CMDFLOG=/IOB/flog/
|
||||||
|
CMDALIVE=/IOB
|
||||||
|
CMDENABLED=/IOB/enabled/
|
||||||
|
CMDADV1=?valore=
|
||||||
|
CMDREBO=/sendReboot.aspx?idxMacchina=
|
||||||
|
|
||||||
|
[MEMORY]
|
||||||
|
ADDR_READ=40000
|
||||||
|
ADDR_WRITE=40000
|
||||||
|
SIZE_READ=10
|
||||||
|
SIZE_WRITE=0
|
||||||
|
HR_BASE_ADDR=40000
|
||||||
|
DELTA_BASE=-1
|
||||||
|
MODBUS_EXT_REG=0
|
||||||
|
|
||||||
|
|
||||||
|
[BLINK]
|
||||||
|
;MAX_COUNTER_BLINK = 30
|
||||||
|
MAX_COUNTER_BLINK = 15
|
||||||
|
;bit0 = 0
|
||||||
|
;bit1 = 0
|
||||||
|
;bit2 = 1
|
||||||
|
;bit3 = 1
|
||||||
|
;bit4 = 1
|
||||||
|
;bit5 = 0
|
||||||
|
;bit6 = 0
|
||||||
|
;bit7 = 0
|
||||||
|
BLINK_FILT=0
|
||||||
|
;BLINK_FILT=28
|
||||||
|
|
||||||
|
[OPTPAR]
|
||||||
|
;PZCOUNT_MODE=STD.[PAR/MEM].info|BIT.indice
|
||||||
|
PZCOUNT_MODE=STD.DB85.DBRE16
|
||||||
|
DISABLE_PZCOUNT=TRUE
|
||||||
|
ENABLE_SEND_PZC_BLOCK=TRUE
|
||||||
|
MIN_SEND_PZC_BLOCK=0
|
||||||
|
MAX_SEND_PZC_BLOCK=100
|
||||||
|
; GEST DATI DYN
|
||||||
|
ENABLE_DYN_DATA=TRUE
|
||||||
|
FORCE_DYN_DATA=TRUE
|
||||||
|
; gestione delta minimo accettabile tra min/MAX
|
||||||
|
DELTA_VAL=0.1
|
||||||
|
|
||||||
|
; clock base (da 10ms)
|
||||||
|
timerIntMs=10
|
||||||
|
|
||||||
|
; conf parametri memoria READ/WRITE
|
||||||
|
PARAM_CONF=IMI_RIMOR_VER_02.json
|
||||||
|
|
||||||
|
NO_PING=FALSE
|
||||||
|
; conf blocchi memoria x READ
|
||||||
|
MEM_BLOCK=IMI_RIMOR_VER_02_MBlock.json
|
||||||
|
|
||||||
|
; rimozione check limiti min/max dynData
|
||||||
|
disDynDataRangeCheck=true
|
||||||
|
|
||||||
|
[BRANCH]
|
||||||
|
NAME=master
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
{
|
||||||
|
"mMapWrite": {
|
||||||
|
"setArt": {
|
||||||
|
"name": "setArt",
|
||||||
|
"description": "Articolo",
|
||||||
|
"memAddr": "40901",
|
||||||
|
"tipoMem": "String",
|
||||||
|
"index": 901,
|
||||||
|
"size": 12
|
||||||
|
},
|
||||||
|
"setComm": {
|
||||||
|
"name": "setComm",
|
||||||
|
"description": "Commessa",
|
||||||
|
"memAddr": "40921",
|
||||||
|
"tipoMem": "String",
|
||||||
|
"index": 921,
|
||||||
|
"size": 12
|
||||||
|
},
|
||||||
|
"setProg": {
|
||||||
|
"name": "setProg",
|
||||||
|
"description": "Qty",
|
||||||
|
"memAddr": "40941",
|
||||||
|
"tipoMem": "String",
|
||||||
|
"index": 941,
|
||||||
|
"size": 30
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mMapRead": {
|
||||||
|
"setArt": {
|
||||||
|
"name": "setArt",
|
||||||
|
"description": "Articolo",
|
||||||
|
"memAddr": "40901",
|
||||||
|
"tipoMem": "String",
|
||||||
|
"index": 901,
|
||||||
|
"size": 12,
|
||||||
|
"func": "POINT",
|
||||||
|
"period": 90,
|
||||||
|
"factor": 1,
|
||||||
|
"minVal": 0,
|
||||||
|
"maxVal": 999999,
|
||||||
|
"unit": ""
|
||||||
|
},
|
||||||
|
"setComm": {
|
||||||
|
"name": "setComm",
|
||||||
|
"description": "Commessa",
|
||||||
|
"memAddr": "40921",
|
||||||
|
"tipoMem": "String",
|
||||||
|
"index": 921,
|
||||||
|
"size": 12,
|
||||||
|
"func": "POINT",
|
||||||
|
"period": 90,
|
||||||
|
"factor": 1,
|
||||||
|
"minVal": 0,
|
||||||
|
"maxVal": 0,
|
||||||
|
"unit": ""
|
||||||
|
},
|
||||||
|
"setProg": {
|
||||||
|
"name": "setProg",
|
||||||
|
"description": "Qty",
|
||||||
|
"memAddr": "40941",
|
||||||
|
"tipoMem": "String",
|
||||||
|
"index": 941,
|
||||||
|
"size": 30,
|
||||||
|
"func": "POINT",
|
||||||
|
"period": 90,
|
||||||
|
"factor": 1,
|
||||||
|
"minVal": 0,
|
||||||
|
"maxVal": 0,
|
||||||
|
"unit": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"optMemPar": {
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"ReadBlocks": {
|
||||||
|
"40900": 70
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -46,6 +46,11 @@ CLI_INST=SteamWareSim
|
|||||||
;STARTLIST=SIMUL_01
|
;STARTLIST=SIMUL_01
|
||||||
;STARTLIST=GIACO_SAIM_003
|
;STARTLIST=GIACO_SAIM_003
|
||||||
;STARTLIST=SIMUL_01
|
;STARTLIST=SIMUL_01
|
||||||
STARTLIST=IMI_RIMOR_SAB_01
|
;STARTLIST=PIZ09
|
||||||
|
;STARTLIST=IMI_RIMOR_SAB_01
|
||||||
|
;STARTLIST=IMI_RIMOR_VER_01
|
||||||
|
;STARTLIST=IMI_RIMOR_VER_02
|
||||||
|
;STARTLIST=IMI_RIMOR_SAB_01
|
||||||
|
STARTLIST=IMI_RIMOR_VER_01
|
||||||
|
|
||||||
MAXCNC=10
|
MAXCNC=10
|
||||||
@@ -124,6 +124,9 @@
|
|||||||
<Reference Include="EgwProxy.OsaiCncLib.XmlSerializers, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="EgwProxy.OsaiCncLib.XmlSerializers, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\EgwProxy.OsaiCncLib.3.6.2205.2015\lib\EgwProxy.OsaiCncLib.XmlSerializers.dll</HintPath>
|
<HintPath>..\packages\EgwProxy.OsaiCncLib.3.6.2205.2015\lib\EgwProxy.OsaiCncLib.XmlSerializers.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="EgwProxy.SqlDb, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\EgwProxy.SqlDb.3.6.2303.1515\lib\EgwProxy.SqlDb.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>
|
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
@@ -150,10 +153,10 @@
|
|||||||
<HintPath>..\packages\MTConnect.NET.2.9.1.28314\lib\net40\MTConnect-NET.dll</HintPath>
|
<HintPath>..\packages\MTConnect.NET.2.9.1.28314\lib\net40\MTConnect-NET.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NLog.4.7.13\lib\net45\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.5.1.2\lib\net46\NLog.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="OmronFinsTCP.Net, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="OmronFinsTCP.Net, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\OmronFinsTCP.Net.3.0.0.0\lib\net40\OmronFinsTCP.Net.dll</HintPath>
|
<HintPath>..\packages\OmronFinsTCP.Net.3.0.0.0\lib\net40\OmronFinsTCP.Net.dll</HintPath>
|
||||||
@@ -189,6 +192,7 @@
|
|||||||
<HintPath>..\packages\System.Formats.Asn1.6.0.0\lib\net461\System.Formats.Asn1.dll</HintPath>
|
<HintPath>..\packages\System.Formats.Asn1.6.0.0\lib\net461\System.Formats.Asn1.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.IdentityModel" />
|
<Reference Include="System.IdentityModel" />
|
||||||
|
<Reference Include="System.IO.Compression, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
|
||||||
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
|
<HintPath>..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
@@ -230,6 +234,8 @@
|
|||||||
<Compile Include="..\VersGen\VersGen.cs">
|
<Compile Include="..\VersGen\VersGen.cs">
|
||||||
<Link>VersGen.cs</Link>
|
<Link>VersGen.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="IobSqlServLantek.cs" />
|
||||||
|
<Compile Include="IobSqlServPama.cs" />
|
||||||
<Compile Include="IobIcoelDb.cs" />
|
<Compile Include="IobIcoelDb.cs" />
|
||||||
<Compile Include="IobIcoelSoap.cs" />
|
<Compile Include="IobIcoelSoap.cs" />
|
||||||
<Compile Include="IobModbusTCPFimat.cs" />
|
<Compile Include="IobModbusTCPFimat.cs" />
|
||||||
@@ -315,10 +321,38 @@
|
|||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="UAClient.cs" />
|
<Compile Include="UAClient.cs" />
|
||||||
<Compile Include="utils.cs" />
|
<Compile Include="utils.cs" />
|
||||||
<None Include="DATA\CONF\IMI_RIMOR_SAB_02.ini" />
|
<None Include="DATA\CONF\IMI_PAMA_392.ini" />
|
||||||
<None Include="DATA\CONF\IMI_RIMOR_SAB_02.json" />
|
<None Include="DATA\CONF\IMI_PAMA_392.json" />
|
||||||
<None Include="DATA\CONF\IMI_RIMOR_SAB_02_alarm.json" />
|
<None Include="DATA\CONF\IMI_RIMOR_VER_02.ini">
|
||||||
<None Include="DATA\CONF\IMI_RIMOR_SAB_02_MBlock.json" />
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Include="DATA\CONF\IMI_RIMOR_VER_02.json">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Include="DATA\CONF\IMI_RIMOR_VER_02_MBlock.json">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Include="DATA\CONF\IMI_RIMOR_VER_01.ini">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Include="DATA\CONF\IMI_RIMOR_VER_01.json">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Include="DATA\CONF\IMI_RIMOR_VER_01_alarm.json">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Include="DATA\CONF\IMI_RIMOR_VER_01_MBlock.json">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Include="DATA\CONF\IMI_RIMOR_SAB_02.ini">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Include="DATA\CONF\IMI_RIMOR_SAB_02.json">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Include="DATA\CONF\IMI_RIMOR_SAB_02_MBlock.json">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
<None Include="DATA\CONF\IMI_RIMOR_SAB_01_MBlock.json">
|
<None Include="DATA\CONF\IMI_RIMOR_SAB_01_MBlock.json">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
@@ -367,15 +401,9 @@
|
|||||||
<None Include="DATA\CONF\GIACO_SAIM_001.json" />
|
<None Include="DATA\CONF\GIACO_SAIM_001.json" />
|
||||||
<None Include="DATA\CONF\GIACO_SAIM_003_MBlock.json" />
|
<None Include="DATA\CONF\GIACO_SAIM_003_MBlock.json" />
|
||||||
<None Include="DATA\CONF\GIACO_SAIM_001_MBlock.json" />
|
<None Include="DATA\CONF\GIACO_SAIM_001_MBlock.json" />
|
||||||
<None Include="DATA\CONF\GIACO_SAIM_002.ini">
|
<None Include="DATA\CONF\GIACO_SAIM_002.ini" />
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<None Include="DATA\CONF\GIACO_SAIM_002.json" />
|
||||||
</None>
|
<None Include="DATA\CONF\GIACO_SAIM_002_MBlock.json" />
|
||||||
<None Include="DATA\CONF\GIACO_SAIM_002.json">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="DATA\CONF\GIACO_SAIM_002_MBlock.json">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="DATA\CONF\GIACO_ULMA_001.ini" />
|
<None Include="DATA\CONF\GIACO_ULMA_001.ini" />
|
||||||
<None Include="DATA\CONF\GIACO_ULMA_001.json" />
|
<None Include="DATA\CONF\GIACO_ULMA_001.json" />
|
||||||
<None Include="DATA\CONF\GIACO_ICOEL_002.json" />
|
<None Include="DATA\CONF\GIACO_ICOEL_002.json" />
|
||||||
@@ -420,12 +448,8 @@
|
|||||||
<None Include="DATA\CONF\GT594.ini" />
|
<None Include="DATA\CONF\GT594.ini" />
|
||||||
<None Include="DATA\CONF\GT594.json" />
|
<None Include="DATA\CONF\GT594.json" />
|
||||||
<None Include="DATA\CONF\L018.ini" />
|
<None Include="DATA\CONF\L018.ini" />
|
||||||
<None Include="DATA\CONF\SIM_DP_02.json">
|
<None Include="DATA\CONF\SIM_DP_02.json" />
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<None Include="DATA\CONF\SIM_DP_01.json" />
|
||||||
</None>
|
|
||||||
<None Include="DATA\CONF\SIM_DP_01.json">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="DATA\IobOpcUaClient.Config.xml">
|
<None Include="DATA\IobOpcUaClient.Config.xml">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
@@ -521,24 +545,16 @@
|
|||||||
<None Include="DATA\CONF\GT579.ini" />
|
<None Include="DATA\CONF\GT579.ini" />
|
||||||
<None Include="DATA\CONF\IMI_50.ini" />
|
<None Include="DATA\CONF\IMI_50.ini" />
|
||||||
<None Include="DATA\CONF\IMI_50.json" />
|
<None Include="DATA\CONF\IMI_50.json" />
|
||||||
<None Include="DATA\CONF\PIZ04_MBlock.json">
|
<None Include="DATA\CONF\PIZ04_MBlock.json" />
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="DATA\CONF\PIZ05_MBlock.json" />
|
<None Include="DATA\CONF\PIZ05_MBlock.json" />
|
||||||
<None Include="DATA\CONF\PIZ05.ini" />
|
<None Include="DATA\CONF\PIZ05.ini" />
|
||||||
<None Include="DATA\CONF\PIZ05.json" />
|
<None Include="DATA\CONF\PIZ05.json" />
|
||||||
<None Include="DATA\CONF\PIZ04.ini">
|
<None Include="DATA\CONF\PIZ04.ini" />
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<None Include="DATA\CONF\PIZ04.json" />
|
||||||
</None>
|
|
||||||
<None Include="DATA\CONF\PIZ04.json">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="DATA\CONF\PIZ03.ini" />
|
<None Include="DATA\CONF\PIZ03.ini" />
|
||||||
<None Include="DATA\CONF\PIZ03.json" />
|
<None Include="DATA\CONF\PIZ03.json" />
|
||||||
<None Include="DATA\CONF\PIZ05_alarm.json" />
|
<None Include="DATA\CONF\PIZ05_alarm.json" />
|
||||||
<None Include="DATA\CONF\PIZ04_alarm.json">
|
<None Include="DATA\CONF\PIZ04_alarm.json" />
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="DATA\CONF\PIZ03_alarm.json" />
|
<None Include="DATA\CONF\PIZ03_alarm.json" />
|
||||||
<None Include="DATA\CONF\PIZ08.ini" />
|
<None Include="DATA\CONF\PIZ08.ini" />
|
||||||
<None Include="DATA\CONF\PIZ08.json" />
|
<None Include="DATA\CONF\PIZ08.json" />
|
||||||
@@ -546,33 +562,15 @@
|
|||||||
<None Include="DATA\CONF\PING.ini">
|
<None Include="DATA\CONF\PING.ini">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<None Include="DATA\CONF\PIZ09.ini">
|
<None Include="DATA\CONF\PIZ09.ini" />
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<None Include="DATA\CONF\PIZ09.json" />
|
||||||
</None>
|
<None Include="DATA\CONF\PIZ09_alarm.json" />
|
||||||
<None Include="DATA\CONF\PIZ09.json">
|
<None Include="DATA\CONF\PIZ09_MBlock.json" />
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<None Include="DATA\CONF\SIM_PIZ08.ini" />
|
||||||
</None>
|
<None Include="DATA\CONF\SIM_PIZ05.ini" />
|
||||||
<None Include="DATA\CONF\PIZ09_alarm.json">
|
<None Include="DATA\CONF\SIM_PIZ04.ini" />
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<None Include="DATA\CONF\SIM_PIZ03.ini" />
|
||||||
</None>
|
<None Include="DATA\CONF\SIM_PIZ00.json" />
|
||||||
<None Include="DATA\CONF\PIZ09_MBlock.json">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="DATA\CONF\SIM_PIZ08.ini">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="DATA\CONF\SIM_PIZ05.ini">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="DATA\CONF\SIM_PIZ04.ini">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="DATA\CONF\SIM_PIZ03.ini">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="DATA\CONF\SIM_PIZ00.json">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="DATA\CONF\MECART_80.ini" />
|
<None Include="DATA\CONF\MECART_80.ini" />
|
||||||
<None Include="DATA\CONF\MECART_80.json" />
|
<None Include="DATA\CONF\MECART_80.json" />
|
||||||
<None Include="DATA\CONF\FINASSI_OMP_01.ini" />
|
<None Include="DATA\CONF\FINASSI_OMP_01.ini" />
|
||||||
@@ -587,18 +585,10 @@
|
|||||||
<None Include="DATA\CONF\TEST.json">
|
<None Include="DATA\CONF\TEST.json">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<None Include="DATA\CONF\SIMUL_05.json">
|
<None Include="DATA\CONF\SIMUL_05.json" />
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<None Include="DATA\CONF\SIMUL_06.json" />
|
||||||
</None>
|
<None Include="DATA\CONF\SIMUL_07.json" />
|
||||||
<None Include="DATA\CONF\SIMUL_06.json">
|
<None Include="DATA\CONF\SIMUL_08.json" />
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="DATA\CONF\SIMUL_07.json">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="DATA\CONF\SIMUL_08.json">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="DATA\CONF\VL23.json" />
|
<None Include="DATA\CONF\VL23.json" />
|
||||||
<None Include="DATA\CONF\VL22.json" />
|
<None Include="DATA\CONF\VL22.json" />
|
||||||
<None Include="DATA\CONF\VL21.json" />
|
<None Include="DATA\CONF\VL21.json" />
|
||||||
@@ -609,18 +599,10 @@
|
|||||||
<None Include="DATA\CONF\VL26.ini" />
|
<None Include="DATA\CONF\VL26.ini" />
|
||||||
<None Include="DATA\CONF\VL25.json" />
|
<None Include="DATA\CONF\VL25.json" />
|
||||||
<None Include="DATA\CONF\VL24.json" />
|
<None Include="DATA\CONF\VL24.json" />
|
||||||
<None Include="DATA\CONF\SIMUL_04.json">
|
<None Include="DATA\CONF\SIMUL_04.json" />
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<None Include="DATA\CONF\SIMUL_03.json" />
|
||||||
</None>
|
<None Include="DATA\CONF\SIMUL_02.json" />
|
||||||
<None Include="DATA\CONF\SIMUL_03.json">
|
<None Include="DATA\CONF\SIMUL_01.json" />
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="DATA\CONF\SIMUL_02.json">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="DATA\CONF\SIMUL_01.json">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="DATA\CONF\INTERCL_02.json" />
|
<None Include="DATA\CONF\INTERCL_02.json" />
|
||||||
<None Include="DATA\CONF\INTERCL_01.json" />
|
<None Include="DATA\CONF\INTERCL_01.json" />
|
||||||
<None Include="DATA\CONF\3019.json" />
|
<None Include="DATA\CONF\3019.json" />
|
||||||
@@ -638,30 +620,14 @@
|
|||||||
<None Include="DATA\CONF\3018.ini" />
|
<None Include="DATA\CONF\3018.ini" />
|
||||||
<None Include="DATA\CONF\3017.ini" />
|
<None Include="DATA\CONF\3017.ini" />
|
||||||
<None Include="DATA\CONF\3018.json" />
|
<None Include="DATA\CONF\3018.json" />
|
||||||
<None Include="DATA\CONF\SIMUL_08.ini">
|
<None Include="DATA\CONF\SIMUL_08.ini" />
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<None Include="DATA\CONF\SIMUL_07.ini" />
|
||||||
</None>
|
<None Include="DATA\CONF\SIMUL_06.ini" />
|
||||||
<None Include="DATA\CONF\SIMUL_07.ini">
|
<None Include="DATA\CONF\SIMUL_05.ini" />
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<None Include="DATA\CONF\SIM_DP_02.ini" />
|
||||||
</None>
|
<None Include="DATA\CONF\SIM_DP_01.ini" />
|
||||||
<None Include="DATA\CONF\SIMUL_06.ini">
|
<None Include="DATA\CONF\SIMUL_01.ini" />
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<None Include="DATA\CONF\SIMUL_02.ini" />
|
||||||
</None>
|
|
||||||
<None Include="DATA\CONF\SIMUL_05.ini">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="DATA\CONF\SIM_DP_02.ini">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="DATA\CONF\SIM_DP_01.ini">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="DATA\CONF\SIMUL_01.ini">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="DATA\CONF\SIMUL_02.ini">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="DATA\CONF\3006.ini" />
|
<None Include="DATA\CONF\3006.ini" />
|
||||||
<None Include="DATA\CONF\3007.ini" />
|
<None Include="DATA\CONF\3007.ini" />
|
||||||
<None Include="DATA\CONF\3010.ini" />
|
<None Include="DATA\CONF\3010.ini" />
|
||||||
@@ -688,12 +654,8 @@
|
|||||||
</None>
|
</None>
|
||||||
<None Include="DATA\CONF\GT547.ini" />
|
<None Include="DATA\CONF\GT547.ini" />
|
||||||
<None Include="DATA\CONF\4000.ini" />
|
<None Include="DATA\CONF\4000.ini" />
|
||||||
<None Include="DATA\CONF\SIMUL_04.ini">
|
<None Include="DATA\CONF\SIMUL_04.ini" />
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<None Include="DATA\CONF\SIMUL_03.ini" />
|
||||||
</None>
|
|
||||||
<None Include="DATA\CONF\SIMUL_03.ini">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="DATA\CONF\L014.ini" />
|
<None Include="DATA\CONF\L014.ini" />
|
||||||
<None Include="DATA\CONF\L017.ini" />
|
<None Include="DATA\CONF\L017.ini" />
|
||||||
<None Include="DATA\CONF\MAIN.ini">
|
<None Include="DATA\CONF\MAIN.ini">
|
||||||
|
|||||||
@@ -51,6 +51,20 @@ namespace IOB_WIN_NEXT
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string cpuType { get; set; } = "";
|
public string cpuType { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indica che sono disabilitati i Task2Exe (tipicamente gestione scrittura verso PLC)
|
||||||
|
/// </summary>
|
||||||
|
public bool disableExeTask { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indica che sono disabilitate le fasi controllo stato/semafori (tipicamente x impianti
|
||||||
|
/// con PLC "suddivisi", PLC + HMI)
|
||||||
|
/// </summary>
|
||||||
|
public bool disableStateCh { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary> Nome del file IOB di avvio (REDIS <--> MAN) </summary>
|
||||||
|
public string filenameIOB { get; set; } = "ND";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Nome file di INI
|
/// Nome file di INI
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
+66
-23
@@ -260,6 +260,12 @@ namespace IOB_WIN_NEXT
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public TCMan tcMan = new TCMan(0.5, 1.3, 5);
|
public TCMan tcMan = new TCMan(0.5, 1.3, 5);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Imposta veto lettura dati (es per DB a 2 sec)
|
||||||
|
/// </summary>
|
||||||
|
public DateTime vetoDataRead = DateTime.Now;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Imposta veto chiamata split (durante chiamata, per 60 sec)
|
/// Imposta veto chiamata split (durante chiamata, per 60 sec)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -284,7 +290,8 @@ namespace IOB_WIN_NEXT
|
|||||||
if (IOBConf != null)
|
if (IOBConf != null)
|
||||||
{
|
{
|
||||||
// init oggetto redis...
|
// init oggetto redis...
|
||||||
redisMan = new RedisIobCache(IOBConf.serverData.MPIP, IOBConf.codIOB, IOBConf.tipoIob.ToString(), IOBConf.minDeltaSec);
|
redisMan = new RedisIobCache(IOBConf.serverData.MPIP, IOBConf.filenameIOB, $"{IOBConf.tipoIob}", IOBConf.minDeltaSec);
|
||||||
|
//redisMan = new RedisIobCache(IOBConf.serverData.MPIP, IOBConf.codIOB, $"{IOBConf.tipoIob}", IOBConf.minDeltaSec);
|
||||||
|
|
||||||
// initi oggetto TCMan
|
// initi oggetto TCMan
|
||||||
tcMan = new TCMan(IOBConf.TCLambda, IOBConf.TCMaxDelayFactor, IOBConf.TCMaxIncrPz);
|
tcMan = new TCMan(IOBConf.TCLambda, IOBConf.TCMaxDelayFactor, IOBConf.TCMaxIncrPz);
|
||||||
@@ -3074,27 +3081,31 @@ namespace IOB_WIN_NEXT
|
|||||||
public Dictionary<string, string> processTask(Dictionary<string, string> task2exe)
|
public Dictionary<string, string> processTask(Dictionary<string, string> task2exe)
|
||||||
{
|
{
|
||||||
Dictionary<string, string> taskDone = new Dictionary<string, string>();
|
Dictionary<string, string> taskDone = new Dictionary<string, string>();
|
||||||
if (task2exe != null)
|
// eseguo realmente solo se NON disabilitata questa gestione (caso doppio PLC/HMI)...
|
||||||
|
if (!cIobConf.disableExeTask)
|
||||||
{
|
{
|
||||||
lgInfo($"Task2Exe S01: {task2exe.Count} task ricevuti:");
|
if (task2exe != null)
|
||||||
int idTask = 0;
|
|
||||||
foreach (var item in task2exe)
|
|
||||||
{
|
{
|
||||||
idTask++;
|
lgInfo($"Task2Exe S01: {task2exe.Count} task ricevuti:");
|
||||||
lgInfo($"[{idTask:00}] - {item.Key} --> {item.Value}");
|
int idTask = 0;
|
||||||
}
|
foreach (var item in task2exe)
|
||||||
// chiamo procedura esecutiva (diversa x ogni IOB)
|
{
|
||||||
taskDone = executeTasks(task2exe);
|
idTask++;
|
||||||
lgInfo($"Task2Exe S02: eseguiti {taskDone.Count} task");
|
lgInfo($"[{idTask:00}] - {item.Key} --> {item.Value}");
|
||||||
// loggo tutti i task done...
|
}
|
||||||
foreach (var item in taskDone)
|
// chiamo procedura esecutiva (diversa x ogni IOB)
|
||||||
{
|
taskDone = executeTasks(task2exe);
|
||||||
sendToTaskWatch(item.Key, item.Value);
|
lgInfo($"Task2Exe S02: eseguiti {taskDone.Count} task");
|
||||||
}
|
// loggo tutti i task done...
|
||||||
// ora chiamo la cancellazione dei task eseguiti...
|
foreach (var item in taskDone)
|
||||||
foreach (var item in taskDone)
|
{
|
||||||
{
|
sendToTaskWatch(item.Key, item.Value);
|
||||||
remTask2exe(item.Key, item.Value);
|
}
|
||||||
|
// ora chiamo la cancellazione dei task eseguiti...
|
||||||
|
foreach (var item in taskDone)
|
||||||
|
{
|
||||||
|
remTask2exe(item.Key, item.Value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return taskDone;
|
return taskDone;
|
||||||
@@ -3265,7 +3276,15 @@ namespace IOB_WIN_NEXT
|
|||||||
}
|
}
|
||||||
if (connectionOk)
|
if (connectionOk)
|
||||||
{
|
{
|
||||||
readSemafori(ref currDispData);
|
if (!cIobConf.disableStateCh)
|
||||||
|
{
|
||||||
|
readSemafori(ref currDispData);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// forzo lettura OK
|
||||||
|
currDispData.semIn = Semaforo.SV;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -4522,6 +4541,20 @@ namespace IOB_WIN_NEXT
|
|||||||
return answ;
|
return answ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Fornisce formato valido x messa in coda nel formato dtEve#value#cont
|
||||||
|
/// </summary>
|
||||||
|
protected string getEncodSigLog(DateTime DtEvent, int val2log, int counter)
|
||||||
|
{
|
||||||
|
string answ = "";
|
||||||
|
try
|
||||||
|
{
|
||||||
|
answ = $"{DtEvent:yyyyMMddHHmmssfff}#{val2log:X2}#{counter}";
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{ }
|
||||||
|
return answ;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Indica se vada inviata la key richiesta con lo split/autoODL
|
/// Indica se vada inviata la key richiesta con lo split/autoODL
|
||||||
@@ -6001,13 +6034,23 @@ namespace IOB_WIN_NEXT
|
|||||||
allParam.Add(currItem);
|
allParam.Add(currItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// invio su cloud parametri SE sono connesso all'OPC-ua...
|
// invio su cloud parametri SE sono connesso alla macchina...
|
||||||
if (serverOk)
|
if (serverOk)
|
||||||
{
|
{
|
||||||
rawData = JsonConvert.SerializeObject(allParam, Formatting.Indented);
|
rawData = JsonConvert.SerializeObject(allParam, Formatting.Indented);
|
||||||
if (serverOk)
|
if (serverOk)
|
||||||
{
|
{
|
||||||
var resp = utils.callUrl($"{urlSaveAllParams}", rawData);
|
// verifica se sia un IOB "parziale)
|
||||||
|
if (cIobConf.disableExeTask || cIobConf.disableStateCh)
|
||||||
|
{
|
||||||
|
// versione upsert
|
||||||
|
var resp = utils.callUrl($"{urlUpdateWriteParams}", rawData);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// versione forzata di tutto
|
||||||
|
var resp = utils.callUrl($"{urlSaveAllParams}", rawData);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -104,14 +104,40 @@ namespace IOB_WIN_NEXT
|
|||||||
case taskType.fixStopSetup:
|
case taskType.fixStopSetup:
|
||||||
case taskType.forceResetPzCount:
|
case taskType.forceResetPzCount:
|
||||||
case taskType.forceSetPzCount:
|
case taskType.forceSetPzCount:
|
||||||
case taskType.setProg:
|
|
||||||
case taskType.sendWatchDogMes2Plc:
|
case taskType.sendWatchDogMes2Plc:
|
||||||
case taskType.startSetup:
|
case taskType.startSetup:
|
||||||
case taskType.stopSetup:
|
case taskType.stopSetup:
|
||||||
|
taskVal = $"taskReq: {tName} | key: {item.Key} | val: {item.Value} | SKIPPED | NO EXEC";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case taskType.setProg:
|
||||||
case taskType.setPzComm:
|
case taskType.setPzComm:
|
||||||
case taskType.setArt:
|
case taskType.setArt:
|
||||||
case taskType.setComm:
|
case taskType.setComm:
|
||||||
taskVal = $"taskReq: {tName} | key: {item.Key} | val: {item.Value} | SKIPPED | NO EXEC";
|
// cerco se ho configurato parametri x invio...
|
||||||
|
if (memMap.mMapWrite.ContainsKey(item.Key))
|
||||||
|
{
|
||||||
|
memMap.mMapWrite[item.Key].value = item.Value;
|
||||||
|
// preparo obj oparametro da scrivere...
|
||||||
|
List<objItem> updatedPar = new List<objItem>();
|
||||||
|
objItem newParam = new objItem()
|
||||||
|
{
|
||||||
|
uid = item.Key,
|
||||||
|
name = item.Key,
|
||||||
|
value = item.Value,
|
||||||
|
reqValue = "",
|
||||||
|
writable = true,
|
||||||
|
lastRequest = DateTime.Now
|
||||||
|
};
|
||||||
|
updatedPar.Add(newParam);
|
||||||
|
// richiamo scrittura parametri su PLC
|
||||||
|
plcWriteParams(ref updatedPar);
|
||||||
|
taskVal = $"REQUEST SET val: {item.Key} --> {item.Value}";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
taskVal = $"taskReq: {tName} | key: {item.Key} | val: {item.Value} | NOT FOUND IN mMapWrite List | NO EXEC";
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case taskType.setParameter:
|
case taskType.setParameter:
|
||||||
@@ -385,33 +411,36 @@ namespace IOB_WIN_NEXT
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public override void readSemafori(ref newDisplayData currDispData)
|
public override void readSemafori(ref newDisplayData currDispData)
|
||||||
{
|
{
|
||||||
// NON eseguo x NON indicare data ora ultima lettura se NON fatta davvero
|
if (!cIobConf.disableStateCh)
|
||||||
//base.readSemafori(ref currDispData);
|
|
||||||
byte[] MemBlock = new byte[2];
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
currDispData.semIn = Semaforo.SV;
|
// NON eseguo x NON indicare data ora ultima lettura se NON fatta davvero
|
||||||
|
//base.readSemafori(ref currDispData);
|
||||||
if (verboseLog)
|
byte[] MemBlock = new byte[2];
|
||||||
|
try
|
||||||
{
|
{
|
||||||
lgDebug("inizio read semafori");
|
currDispData.semIn = Semaforo.SV;
|
||||||
}
|
|
||||||
|
|
||||||
if (verboseLog)
|
if (verboseLog)
|
||||||
|
{
|
||||||
|
lgDebug("inizio read semafori");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (verboseLog)
|
||||||
|
{
|
||||||
|
lgTrace(string.Format("RawInput[0]: {0}", utils.binaryForm(RawInput[0])));
|
||||||
|
}
|
||||||
|
|
||||||
|
// salvo il solo BYTE dell'input decifrando il semaforo...
|
||||||
|
decodeToBaseBitmap();
|
||||||
|
decodeOtherData();
|
||||||
|
// riporto bitmap...
|
||||||
|
reportRawInput(ref currDispData);
|
||||||
|
}
|
||||||
|
catch (Exception exc)
|
||||||
{
|
{
|
||||||
lgTrace(string.Format("RawInput[0]: {0}", utils.binaryForm(RawInput[0])));
|
currDispData.semIn = Semaforo.SR;
|
||||||
|
lgError($"Eccezione in readSemafori{Environment.NewLine}{exc}");
|
||||||
}
|
}
|
||||||
|
|
||||||
// salvo il solo BYTE dell'input decifrando il semaforo...
|
|
||||||
decodeToBaseBitmap();
|
|
||||||
decodeOtherData();
|
|
||||||
// riporto bitmap...
|
|
||||||
reportRawInput(ref currDispData);
|
|
||||||
}
|
|
||||||
catch (Exception exc)
|
|
||||||
{
|
|
||||||
currDispData.semIn = Semaforo.SR;
|
|
||||||
lgError($"Eccezione in readSemafori{Environment.NewLine}{exc}");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1141,8 +1170,9 @@ namespace IOB_WIN_NEXT
|
|||||||
Array.Copy(readTestInt, i * 2, thisSet, 0, 2);
|
Array.Copy(readTestInt, i * 2, thisSet, 0, 2);
|
||||||
lgTrace($"{currMemType} | {baseAddr + i * 2:000} | Valori: {thisSet[0]} / {thisSet[1]} | Val Int: {ModbusClient.ConvertRegistersToInt(thisSet)} | Val Real: {ModbusClient.ConvertRegistersToFloat(thisSet):N6}");
|
lgTrace($"{currMemType} | {baseAddr + i * 2:000} | Valori: {thisSet[0]} / {thisSet[1]} | Val Int: {ModbusClient.ConvertRegistersToInt(thisSet)} | Val Real: {ModbusClient.ConvertRegistersToFloat(thisSet):N6}");
|
||||||
}
|
}
|
||||||
|
// provo anche come stringa intera
|
||||||
|
lgTrace($"{currMemType} | {baseAddr:000} | Val string: {ModbusClient.ConvertRegistersToString(readTestInt, 0, readTestInt.Length)}");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case modbusMemType.NotDefined:
|
case modbusMemType.NotDefined:
|
||||||
default:
|
default:
|
||||||
lgTrace($"Errore: tipo memoria non definitito per {baseAddr} / {numVals}");
|
lgTrace($"Errore: tipo memoria non definitito per {baseAddr} / {numVals}");
|
||||||
|
|||||||
@@ -0,0 +1,283 @@
|
|||||||
|
using EgwProxy.Icoel;
|
||||||
|
using IOB_UT_NEXT;
|
||||||
|
using MapoSDK;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Net.NetworkInformation;
|
||||||
|
|
||||||
|
namespace IOB_WIN_NEXT
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Adapter specializzato per LANTEK e le chiamate tramite DB per i dati
|
||||||
|
/// ....TBD
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public class IobSqlServLantek : IobGeneric
|
||||||
|
{
|
||||||
|
#region Public Constructors
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Costruttore dell'IOB Icoel DB
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="caller">AdapterForm chiamante</param>
|
||||||
|
/// <param name="IOBConf">Configurazione IOB per avvio</param>
|
||||||
|
public IobSqlServLantek(AdapterForm caller, IobConfiguration IOBConf) : base(caller, IOBConf)
|
||||||
|
{
|
||||||
|
/* --------------------------------------
|
||||||
|
* todo's
|
||||||
|
* --------------------------------------
|
||||||
|
* - init obj comunicazione da conf e nuget
|
||||||
|
* - lanciare sync e verifica stato sync
|
||||||
|
*/
|
||||||
|
|
||||||
|
string SyncStateDb = getOptPar("SyncStateDb");
|
||||||
|
string SyncStateUser = getOptPar("SyncStateUser");
|
||||||
|
string SyncStatePwd = getOptPar("SyncStatePwd");
|
||||||
|
string SyncStateCTout = getOptPar("SyncStateCTout");
|
||||||
|
|
||||||
|
string connSyncState = $"data source={SyncStateDb};initial catalog=MoonPro_ISF;persist security info=True;user id={SyncStateUser};password={SyncStatePwd};MultipleActiveResultSets=True;App=IOB-WIN-NEXT";
|
||||||
|
|
||||||
|
// gestione command timeout da https://erikej.github.io/sqlclient/2020/10/26/sqlclient-commandtimeout-preview.html
|
||||||
|
if (!string.IsNullOrEmpty(SyncStateCTout))
|
||||||
|
{
|
||||||
|
connSyncState = $"{connSyncState};Command Timeout={SyncStateCTout}";
|
||||||
|
}
|
||||||
|
|
||||||
|
// eccezione: NON TROVA EntityFramework 6.0.0 o successivo... why?!?
|
||||||
|
dbProxy = new DbProxy(connSyncState);
|
||||||
|
|
||||||
|
lastPING = DateTime.Now.AddHours(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion Public Constructors
|
||||||
|
|
||||||
|
#region Public Methods
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Implementazione custom esecuzione task specifici
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="task2exe"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public override Dictionary<string, string> executeTasks(Dictionary<string, string> task2exe)
|
||||||
|
{
|
||||||
|
// unico task ammissibile: fare un SYNC forzato...
|
||||||
|
Dictionary<string, string> taskDone = new Dictionary<string, string>();
|
||||||
|
if (task2exe != null)
|
||||||
|
{
|
||||||
|
// controllo se memMap != null...
|
||||||
|
if (memMap != null)
|
||||||
|
{
|
||||||
|
bool taskOk = false;
|
||||||
|
string taskVal = "";
|
||||||
|
// cerco task specifici: se ho startSetup --> imposto bit DBB701.DBB0.4
|
||||||
|
foreach (var item in task2exe)
|
||||||
|
{
|
||||||
|
taskOk = false;
|
||||||
|
taskVal = "";
|
||||||
|
// converto richiesta in enum...
|
||||||
|
taskType tName = taskType.nihil;
|
||||||
|
Enum.TryParse(item.Key, out tName);
|
||||||
|
// controllo sulla KEY...
|
||||||
|
switch (tName)
|
||||||
|
{
|
||||||
|
case taskType.syncDbData:
|
||||||
|
lgInfo($"executeTasks --> syncDbData");
|
||||||
|
// effettua sync
|
||||||
|
refreshElencoStati();
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
taskVal = $"IobSqlServLantek | taskReq: {tName} | key: {item.Key} | val: {item.Value} | SKIPPED | NO EXEC";
|
||||||
|
lgInfo($"IobSqlServLantek | chiamata senza processing: taskOk: {taskOk} | taskVal: {taskVal}");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
lastReadPLC = DateTime.Now;
|
||||||
|
return taskDone;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Recupero dati dinamici...
|
||||||
|
/// </summary>
|
||||||
|
public override Dictionary<string, string> getDynData()
|
||||||
|
{
|
||||||
|
// valore non presente in vers default... se gestito fare override
|
||||||
|
Dictionary<string, string> outVal = new Dictionary<string, string>();
|
||||||
|
// recupero da DB locale stato sync attuale
|
||||||
|
var elencoSyncStateCurr = dbProxy.DataController.SyncStateGetAll();
|
||||||
|
foreach (var item in elencoSyncStateCurr)
|
||||||
|
{
|
||||||
|
saveValue(ref outVal, item.NumRec, $"{item.TableName}_NumRec");
|
||||||
|
saveValue(ref outVal, item.NumRecIn, $"{item.TableName}_NumRecIn");
|
||||||
|
saveValue(ref outVal, item.LastIdx, $"{item.TableName}_LastIdx");
|
||||||
|
saveValue(ref outVal, item.LastIdxIn, $"{item.TableName}_LastIdxIn");
|
||||||
|
}
|
||||||
|
|
||||||
|
// aggiungo anche i campi currData
|
||||||
|
var currData = dbProxy.DataController.CurrDataGetAll();
|
||||||
|
foreach (var item in currData)
|
||||||
|
{
|
||||||
|
saveValue(ref outVal, (double)item.CurrVal, item.Topic);
|
||||||
|
}
|
||||||
|
|
||||||
|
lastReadPLC = DateTime.Now;
|
||||||
|
return outVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Effettua processing CUSTOM x Icoel:
|
||||||
|
/// - recupera elenco batch delle 2 linee
|
||||||
|
/// - invia al sistema
|
||||||
|
/// </summary>
|
||||||
|
public override void processCustomTaskLF()
|
||||||
|
{
|
||||||
|
lgInfo($"Richiesto processCustomTaskLF");
|
||||||
|
// effettua sync
|
||||||
|
refreshElencoStati();
|
||||||
|
lastReadPLC = DateTime.Now;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Effettua lettura semafori principale <paramref name="currDispData">Parametri da
|
||||||
|
/// aggiornare x display in form</paramref>
|
||||||
|
/// </summary>
|
||||||
|
public override void readSemafori(ref newDisplayData currDispData)
|
||||||
|
{
|
||||||
|
if (connectionOk)
|
||||||
|
{
|
||||||
|
B_input = 1;
|
||||||
|
currDispData.semIn = Semaforo.SV;
|
||||||
|
|
||||||
|
if (dbProxy != null && elencoSyncState != null && elencoSyncState.Count > 0)
|
||||||
|
{
|
||||||
|
B_input += (1 << 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// accodo NON emergenza
|
||||||
|
B_input += (1 << 7);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
B_input = 0;
|
||||||
|
currDispData.semIn = Semaforo.SR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Override connessione
|
||||||
|
/// </summary>
|
||||||
|
public override void tryConnect()
|
||||||
|
{
|
||||||
|
if (!connectionOk)
|
||||||
|
{
|
||||||
|
// controllo che il ping sia stato tentato almeno pingTestSec fa...
|
||||||
|
if (DateTime.Now.Subtract(lastPING).TotalSeconds > utils.CRI("pingTestSec"))
|
||||||
|
{
|
||||||
|
if (verboseLog || periodicLog)
|
||||||
|
{
|
||||||
|
lgInfo("IcoelSoap: ConnKO - tryConnect");
|
||||||
|
}
|
||||||
|
// in primis salvo data ping...
|
||||||
|
lastPING = DateTime.Now;
|
||||||
|
// se passa il ping faccio il resto...
|
||||||
|
if (testPingMachine == IPStatus.Success)
|
||||||
|
{
|
||||||
|
string szStatusConnection = "";
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// ora provo connessione...
|
||||||
|
parentForm.commPlcActive = true;
|
||||||
|
if (dbProxy != null)
|
||||||
|
{
|
||||||
|
elencoSyncState = dbProxy.DataController.SyncStateDoImportAll();
|
||||||
|
|
||||||
|
if (elencoSyncState != null && elencoSyncState.Count > 0)
|
||||||
|
{
|
||||||
|
parentForm.commPlcActive = false;
|
||||||
|
connectionOk = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// refresh stato connessione!!!
|
||||||
|
if (connectionOk)
|
||||||
|
{
|
||||||
|
if (adpRunning)
|
||||||
|
{
|
||||||
|
lgInfo("Connessione OK");
|
||||||
|
lastReadPLC = DateTime.Now;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lgError("Impossibile procedere, connessione mancante...");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception exc)
|
||||||
|
{
|
||||||
|
lgFatal($"Errore nella connessione all'adapter IcoelSoap: {szStatusConnection}{Environment.NewLine}{exc}");
|
||||||
|
connectionOk = false;
|
||||||
|
lgInfo($"Eccezione in TryConnect, Adapter IcoelSoap NON running, pausa di {utils.CRI("waitRecMSec")} msec prima di ulteriori tentativi di riconnessione");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// loggo no risposta ping ...
|
||||||
|
connectionOk = false;
|
||||||
|
if (verboseLog || periodicLog)
|
||||||
|
{
|
||||||
|
lgInfo($"Attenzione: IcoelSoap controllo PING fallito per IP {cIobConf.cncIpAddr}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
needRefresh = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void tryDisconnect()
|
||||||
|
{
|
||||||
|
// registro solo che è disconnesso
|
||||||
|
connectionOk = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion Public Methods
|
||||||
|
|
||||||
|
#region Protected Properties
|
||||||
|
|
||||||
|
protected EgwProxy.Icoel.DbProxy dbProxy { get; set; } = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Stato di sync delle tab gestite
|
||||||
|
/// </summary>
|
||||||
|
protected List<EgwProxy.Icoel.DataLayer.DatabaseModels.SyncStateModel> elencoSyncState { get; set; } = new List<EgwProxy.Icoel.DataLayer.DatabaseModels.SyncStateModel>();
|
||||||
|
|
||||||
|
#endregion Protected Properties
|
||||||
|
|
||||||
|
#region Private Methods
|
||||||
|
|
||||||
|
private void refreshElencoStati()
|
||||||
|
{
|
||||||
|
Stopwatch sw = new Stopwatch();
|
||||||
|
sw.Start();
|
||||||
|
elencoSyncState = dbProxy.DataController.SyncStateDoImportAll();
|
||||||
|
sw.Stop();
|
||||||
|
lastReadPLC = DateTime.Now;
|
||||||
|
lgInfo($"DB: esecuzione task dbProxy.DataController.SyncStateGetAll() in {sw.ElapsedMilliseconds} ms");
|
||||||
|
|
||||||
|
if (elencoSyncState != null)
|
||||||
|
{
|
||||||
|
foreach (var item in elencoSyncState)
|
||||||
|
{
|
||||||
|
lgTrace($"TAB: {item.TableName} | IdxIN / IdxLocal {item.LastIdxIn} / {item.LastIdx} | NumIn / NumLocal {item.NumRecIn} / {item.NumRec}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion Private Methods
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,378 @@
|
|||||||
|
using EgwProxy.SqlDb.DbModels;
|
||||||
|
using EgwProxy.SqlDb.Controllers;
|
||||||
|
using IOB_UT_NEXT;
|
||||||
|
using MapoSDK;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Net.NetworkInformation;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace IOB_WIN_NEXT
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Adapter specializzato per PAMA e le chiamate tramite DB per i dati
|
||||||
|
/// - PODL (ordini MES --> MACCHINA)
|
||||||
|
/// - SignLog (da stato macchina)
|
||||||
|
/// - FluxLog (da stato macchina)
|
||||||
|
/// - ProdLog (da stato Prod)
|
||||||
|
/// </summary>
|
||||||
|
public class IobSqlServPama : IobGeneric
|
||||||
|
{
|
||||||
|
#region Public Constructors
|
||||||
|
|
||||||
|
protected int vetoReadDbSec = 3;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Costruttore dell'IOB DB PAMA
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="caller">AdapterForm chiamante</param>
|
||||||
|
/// <param name="IOBConf">Configurazione IOB per avvio</param>
|
||||||
|
public IobSqlServPama(AdapterForm caller, IobConfiguration IOBConf) : base(caller, IOBConf)
|
||||||
|
{
|
||||||
|
string SyncStateServ = getOptPar("SyncStateServer");
|
||||||
|
string SyncStateDb = getOptPar("SyncStateDb");
|
||||||
|
string SyncStateUser = getOptPar("SyncStateUser");
|
||||||
|
string SyncStatePwd = getOptPar("SyncStatePwd");
|
||||||
|
string SyncStateCTout = getOptPar("SyncStateCTout");
|
||||||
|
string VetoReadSec = getOptPar("VetoReadSec");
|
||||||
|
|
||||||
|
string connSyncState = $"data source={SyncStateServ};initial catalog={SyncStateDb};persist security info=True;user id={SyncStateUser};password={SyncStatePwd};MultipleActiveResultSets=True;App=IOB-WIN-NEXT";
|
||||||
|
|
||||||
|
// gestione command timeout da https://erikej.github.io/sqlclient/2020/10/26/sqlclient-commandtimeout-preview.html
|
||||||
|
if (!string.IsNullOrEmpty(SyncStateCTout))
|
||||||
|
{
|
||||||
|
connSyncState = $"{connSyncState};Command Timeout={SyncStateCTout}";
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(VetoReadSec))
|
||||||
|
{
|
||||||
|
int.TryParse(VetoReadSec, out vetoReadDbSec);
|
||||||
|
}
|
||||||
|
|
||||||
|
// eccezione: NON TROVA EntityFramework 6.0.0 o successivo... why?!?
|
||||||
|
dbProxy = new DbController(connSyncState);
|
||||||
|
|
||||||
|
lastPING = DateTime.Now.AddHours(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion Public Constructors
|
||||||
|
|
||||||
|
#region Public Methods
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Implementazione custom esecuzione task specifici
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="task2exe"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public override Dictionary<string, string> executeTasks(Dictionary<string, string> task2exe)
|
||||||
|
{
|
||||||
|
// unico task ammissibile: fare un SYNC forzato...
|
||||||
|
Dictionary<string, string> taskDone = new Dictionary<string, string>();
|
||||||
|
if (task2exe != null)
|
||||||
|
{
|
||||||
|
// controllo se memMap != null...
|
||||||
|
if (memMap != null)
|
||||||
|
{
|
||||||
|
bool taskOk = false;
|
||||||
|
string taskVal = "";
|
||||||
|
// cerco task specifici: se ho startSetup --> imposto bit DBB701.DBB0.4
|
||||||
|
foreach (var item in task2exe)
|
||||||
|
{
|
||||||
|
taskOk = false;
|
||||||
|
taskVal = "";
|
||||||
|
// converto richiesta in enum...
|
||||||
|
taskType tName = taskType.nihil;
|
||||||
|
Enum.TryParse(item.Key, out tName);
|
||||||
|
// controllo sulla KEY...
|
||||||
|
switch (tName)
|
||||||
|
{
|
||||||
|
case taskType.syncDbData:
|
||||||
|
lgInfo($"executeTasks --> syncDbData");
|
||||||
|
// effettua sync scrivendo i dati in export (PODL)
|
||||||
|
execExportAll();
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
taskVal = $"IobSqlServPama | taskReq: {tName} | key: {item.Key} | val: {item.Value} | SKIPPED | NO EXEC";
|
||||||
|
lgInfo($"IobSqlServPama | chiamata senza processing: taskOk: {taskOk} | taskVal: {taskVal}");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
lastReadPLC = DateTime.Now;
|
||||||
|
return taskDone;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Recupero dati dinamici...
|
||||||
|
/// </summary>
|
||||||
|
public override Dictionary<string, string> getDynData()
|
||||||
|
{
|
||||||
|
// valore non presente in vers default... se gestito fare override
|
||||||
|
Dictionary<string, string> outVal = new Dictionary<string, string>();
|
||||||
|
|
||||||
|
// totalmente da fare e testare sulal falsariga del signLog
|
||||||
|
|
||||||
|
#if false
|
||||||
|
// recupero da DB locale stato sync attuale
|
||||||
|
var elencoSyncStateCurr = dbProxy.DataController.SyncStateGetAll();
|
||||||
|
foreach (var item in elencoSyncStateCurr)
|
||||||
|
{
|
||||||
|
saveValue(ref outVal, item.NumRec, $"{item.TableName}_NumRec");
|
||||||
|
saveValue(ref outVal, item.NumRecIn, $"{item.TableName}_NumRecIn");
|
||||||
|
saveValue(ref outVal, item.LastIdx, $"{item.TableName}_LastIdx");
|
||||||
|
saveValue(ref outVal, item.LastIdxIn, $"{item.TableName}_LastIdxIn");
|
||||||
|
}
|
||||||
|
|
||||||
|
// aggiungo anche i campi currData
|
||||||
|
var currData = dbProxy.DataController.CurrDataGetAll();
|
||||||
|
foreach (var item in currData)
|
||||||
|
{
|
||||||
|
saveValue(ref outVal, (double)item.CurrVal, item.Topic);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
lastReadPLC = DateTime.Now;
|
||||||
|
return outVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Effettua processing CUSTOM:
|
||||||
|
/// - esegue tutti gli import
|
||||||
|
/// </summary>
|
||||||
|
public override void processCustomTaskLF()
|
||||||
|
{
|
||||||
|
lgInfo($"Richiesto processCustomTaskLF");
|
||||||
|
// effettua sync
|
||||||
|
execImportAll();
|
||||||
|
lastReadPLC = DateTime.Now;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Effettua lettura semafori principale <paramref name="currDispData">Parametri da
|
||||||
|
/// aggiornare x display in form</paramref>
|
||||||
|
/// </summary>
|
||||||
|
public override void readSemafori(ref newDisplayData currDispData)
|
||||||
|
{
|
||||||
|
DateTime adesso = DateTime.Now;
|
||||||
|
if (connectionOk)
|
||||||
|
{
|
||||||
|
// controllo veto checkDB
|
||||||
|
if (adesso > vetoDataRead)
|
||||||
|
{
|
||||||
|
// predispongo prox veto...
|
||||||
|
vetoDataRead = adesso.AddSeconds(vetoReadDbSec);
|
||||||
|
// semaforo
|
||||||
|
currDispData.semIn = Semaforo.SV;
|
||||||
|
|
||||||
|
// verifico ultimo idxLetto x SignLog e processo
|
||||||
|
elencoSyncState = dbProxy.SyncStateGetAll();
|
||||||
|
// cerco info sui SignLog (ToMes e letti)
|
||||||
|
var currSignLogRead = elencoSyncState.FirstOrDefault(x => x.TableName == "SignLog");
|
||||||
|
// se nullo inizializzo
|
||||||
|
if (currSignLogRead == null)
|
||||||
|
{
|
||||||
|
currSignLogRead = new SyncStateModel()
|
||||||
|
{
|
||||||
|
LastIdx = 0,
|
||||||
|
LastUpdate = adesso,
|
||||||
|
TableName = "SignLog",
|
||||||
|
Note = "Init"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
var currSignLogSent = elencoSyncState.FirstOrDefault(x => x.TableName == "SignLogToMes");
|
||||||
|
// se nullo inizializzo
|
||||||
|
if (currSignLogSent == null)
|
||||||
|
{
|
||||||
|
currSignLogSent = new SyncStateModel()
|
||||||
|
{
|
||||||
|
LastIdx = 0,
|
||||||
|
LastUpdate = adesso,
|
||||||
|
TableName = "SignLogToMes",
|
||||||
|
Note = "Init"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
// verifica se ci siano dati da trasmettere (sui valori LastIdx)
|
||||||
|
if (currSignLogRead.LastIdx > currSignLogSent.LastIdx)
|
||||||
|
{
|
||||||
|
// recupero i dati dal DB...
|
||||||
|
var data2send = dbProxy.MachSigLogGetNew(currSignLogSent.LastIdx);
|
||||||
|
// se ho dati preparo invio
|
||||||
|
if (data2send != null && data2send.Count > 0)
|
||||||
|
{
|
||||||
|
foreach (var sLog2send in data2send)
|
||||||
|
{
|
||||||
|
string currVal = getEncodSigLog(sLog2send.DtEve, sLog2send.ValInt, counterSigIN);
|
||||||
|
// --> accodo (valore già formattato)!
|
||||||
|
QueueIN.Enqueue(currVal);
|
||||||
|
// loggo!
|
||||||
|
lgTrace(string.Format("[QUEUE-IN] {0}", currVal));
|
||||||
|
counterSigIN++;
|
||||||
|
if (counterSigIN > 9999)
|
||||||
|
{
|
||||||
|
counterSigIN = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// aggiorno idx inviato...
|
||||||
|
currSignLogSent.LastIdx = currSignLogRead.LastIdx;
|
||||||
|
var lastRec = data2send.LastOrDefault();
|
||||||
|
if (lastRec != null)
|
||||||
|
{
|
||||||
|
// salvo in B_input ultimo valore letto...
|
||||||
|
B_input = lastRec.ValInt;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// alla fine aggiorno i dati inviati!
|
||||||
|
dbProxy.SyncStateUpsert(currSignLogSent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
B_input = 0;
|
||||||
|
currDispData.semIn = Semaforo.SR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Override connessione
|
||||||
|
/// </summary>
|
||||||
|
public override void tryConnect()
|
||||||
|
{
|
||||||
|
if (!connectionOk)
|
||||||
|
{
|
||||||
|
// controllo che il ping sia stato tentato almeno pingTestSec fa...
|
||||||
|
if (DateTime.Now.Subtract(lastPING).TotalSeconds > utils.CRI("pingTestSec"))
|
||||||
|
{
|
||||||
|
if (verboseLog || periodicLog)
|
||||||
|
{
|
||||||
|
lgInfo("SqlDb PAMA: ConnKO - tryConnect");
|
||||||
|
}
|
||||||
|
// in primis salvo data ping...
|
||||||
|
lastPING = DateTime.Now;
|
||||||
|
// se passa il ping faccio il resto...
|
||||||
|
if (testPingMachine == IPStatus.Success)
|
||||||
|
{
|
||||||
|
string szStatusConnection = "";
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// ora provo connessione...
|
||||||
|
parentForm.commPlcActive = true;
|
||||||
|
if (dbProxy != null)
|
||||||
|
{
|
||||||
|
elencoSyncState = dbProxy.SyncStateDoImportAll();
|
||||||
|
|
||||||
|
if (elencoSyncState != null && elencoSyncState.Count > 0)
|
||||||
|
{
|
||||||
|
parentForm.commPlcActive = false;
|
||||||
|
connectionOk = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// refresh stato connessione!!!
|
||||||
|
if (connectionOk)
|
||||||
|
{
|
||||||
|
if (adpRunning)
|
||||||
|
{
|
||||||
|
lgInfo("Connessione OK");
|
||||||
|
lastReadPLC = DateTime.Now;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lgError("Impossibile procedere, connessione mancante...");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception exc)
|
||||||
|
{
|
||||||
|
lgFatal($"Errore nella connessione all'adapter SqlDb PAMA: {szStatusConnection}{Environment.NewLine}{exc}");
|
||||||
|
connectionOk = false;
|
||||||
|
lgInfo($"Eccezione in TryConnect, Adapter SqlDb PAMA NON running, pausa di {utils.CRI("waitRecMSec")} msec prima di ulteriori tentativi di riconnessione");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// loggo no risposta ping ...
|
||||||
|
connectionOk = false;
|
||||||
|
if (verboseLog || periodicLog)
|
||||||
|
{
|
||||||
|
lgInfo($"Attenzione: SqlDb PAMA controllo PING fallito per IP {cIobConf.cncIpAddr}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
needRefresh = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void tryDisconnect()
|
||||||
|
{
|
||||||
|
// registro solo che è disconnesso
|
||||||
|
connectionOk = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion Public Methods
|
||||||
|
|
||||||
|
#region Protected Properties
|
||||||
|
|
||||||
|
protected DbController dbProxy { get; set; } = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Stato di sync delle tab gestite
|
||||||
|
/// </summary>
|
||||||
|
protected List<SyncStateModel> elencoSyncState { get; set; } = new List<SyncStateModel>();
|
||||||
|
|
||||||
|
#endregion Protected Properties
|
||||||
|
|
||||||
|
#region Private Methods
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Esegue task EXPORT (MES PODL to MACHINE)
|
||||||
|
/// </summary>
|
||||||
|
private void execExportAll()
|
||||||
|
{
|
||||||
|
Stopwatch sw = new Stopwatch();
|
||||||
|
sw.Start();
|
||||||
|
elencoSyncState = dbProxy.SyncStateDoExportAll();
|
||||||
|
sw.Stop();
|
||||||
|
lastReadPLC = DateTime.Now;
|
||||||
|
lgInfo($"DB: esecuzione task dbProxy.SyncStateDoExportAll() in {sw.ElapsedMilliseconds} ms");
|
||||||
|
|
||||||
|
if (elencoSyncState != null)
|
||||||
|
{
|
||||||
|
foreach (var item in elencoSyncState)
|
||||||
|
{
|
||||||
|
lgTrace($"TAB {item.TableName} | LastIdx {item.LastIdx} | Note {item.Note} | Last Upd {item.LastUpdate}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Esegue task IMPORT (MES PODL to MACHINE)
|
||||||
|
/// </summary>
|
||||||
|
private void execImportAll()
|
||||||
|
{
|
||||||
|
Stopwatch sw = new Stopwatch();
|
||||||
|
sw.Start();
|
||||||
|
elencoSyncState = dbProxy.SyncStateDoImportAll();
|
||||||
|
sw.Stop();
|
||||||
|
lastReadPLC = DateTime.Now;
|
||||||
|
lgInfo($"DB: esecuzione task dbProxy.SyncStateDoImportAll() in {sw.ElapsedMilliseconds} ms");
|
||||||
|
|
||||||
|
if (elencoSyncState != null)
|
||||||
|
{
|
||||||
|
foreach (var item in elencoSyncState)
|
||||||
|
{
|
||||||
|
lgTrace($"TAB {item.TableName} | LastIdx {item.LastIdx} | Note {item.Note} | Last Upd {item.LastUpdate}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion Private Methods
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@
|
|||||||
<package id="EgwProxy.Icoel" version="3.6.2210.1815" targetFramework="net462" />
|
<package id="EgwProxy.Icoel" version="3.6.2210.1815" targetFramework="net462" />
|
||||||
<package id="EgwProxy.MultiCncLib" version="3.6.2207.1211" targetFramework="net462" />
|
<package id="EgwProxy.MultiCncLib" version="3.6.2207.1211" targetFramework="net462" />
|
||||||
<package id="EgwProxy.OsaiCncLib" version="3.6.2205.2015" targetFramework="net462" />
|
<package id="EgwProxy.OsaiCncLib" version="3.6.2205.2015" targetFramework="net462" />
|
||||||
|
<package id="EgwProxy.SqlDb" version="3.6.2303.1515" targetFramework="net462" />
|
||||||
<package id="EntityFramework" version="6.4.4" targetFramework="net462" />
|
<package id="EntityFramework" version="6.4.4" targetFramework="net462" />
|
||||||
<package id="FluentFTP" version="41.0.0" targetFramework="net462" />
|
<package id="FluentFTP" version="41.0.0" targetFramework="net462" />
|
||||||
<package id="MapoSDK" version="6.14.2211.3016" targetFramework="net462" />
|
<package id="MapoSDK" version="6.14.2211.3016" targetFramework="net462" />
|
||||||
@@ -14,8 +15,8 @@
|
|||||||
<package id="Microsoft.Extensions.Logging.Abstractions" version="2.1.0" targetFramework="net462" />
|
<package id="Microsoft.Extensions.Logging.Abstractions" version="2.1.0" targetFramework="net462" />
|
||||||
<package id="Microsoft.VisualStudio.SlowCheetah" version="4.0.8" targetFramework="net462" developmentDependency="true" />
|
<package id="Microsoft.VisualStudio.SlowCheetah" version="4.0.8" targetFramework="net462" developmentDependency="true" />
|
||||||
<package id="MTConnect.NET" version="2.9.1.28314" targetFramework="net40-client" />
|
<package id="MTConnect.NET" version="2.9.1.28314" targetFramework="net40-client" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net462" />
|
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net462" />
|
||||||
<package id="NLog" version="4.7.13" targetFramework="net462" />
|
<package id="NLog" version="5.1.2" targetFramework="net462" />
|
||||||
<package id="OmronFinsTCP.Net" version="3.0.0.0" targetFramework="net40-client" />
|
<package id="OmronFinsTCP.Net" version="3.0.0.0" targetFramework="net40-client" />
|
||||||
<package id="OPCFoundation.NetStandard.Opc.Ua.Client" version="1.4.367.75" targetFramework="net462" />
|
<package id="OPCFoundation.NetStandard.Opc.Ua.Client" version="1.4.367.75" targetFramework="net462" />
|
||||||
<package id="OPCFoundation.NetStandard.Opc.Ua.Configuration" version="1.4.367.75" targetFramework="net462" />
|
<package id="OPCFoundation.NetStandard.Opc.Ua.Configuration" version="1.4.367.75" targetFramework="net462" />
|
||||||
|
|||||||
Reference in New Issue
Block a user