diff --git a/EgwProxy.Icoel.DataLayer/App.config b/EgwProxy.Icoel.DataLayer/App.config index 3373bdc3..46b80daf 100644 --- a/EgwProxy.Icoel.DataLayer/App.config +++ b/EgwProxy.Icoel.DataLayer/App.config @@ -16,31 +16,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/EgwProxy.Icoel.DataLayer/EgwProxy.Icoel.DataLayer.csproj b/EgwProxy.Icoel.DataLayer/EgwProxy.Icoel.DataLayer.csproj index 7a71091f..90117ab0 100644 --- a/EgwProxy.Icoel.DataLayer/EgwProxy.Icoel.DataLayer.csproj +++ b/EgwProxy.Icoel.DataLayer/EgwProxy.Icoel.DataLayer.csproj @@ -34,48 +34,18 @@ prompt 4 + + true + - - ..\packages\Azure.Core.1.6.0\lib\net461\Azure.Core.dll - - - ..\packages\Azure.Identity.1.3.0\lib\netstandard2.0\Azure.Identity.dll - ..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll ..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.SqlServer.dll - - ..\packages\Microsoft.Bcl.AsyncInterfaces.1.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll - - - ..\packages\Microsoft.Data.SqlClient.4.1.1\lib\net461\Microsoft.Data.SqlClient.dll - - - ..\packages\Microsoft.Identity.Client.4.22.0\lib\net461\Microsoft.Identity.Client.dll - - - ..\packages\Microsoft.Identity.Client.Extensions.Msal.2.16.5\lib\net45\Microsoft.Identity.Client.Extensions.Msal.dll - - - ..\packages\Microsoft.IdentityModel.JsonWebTokens.6.8.0\lib\net461\Microsoft.IdentityModel.JsonWebTokens.dll - - - ..\packages\Microsoft.IdentityModel.Logging.6.8.0\lib\net461\Microsoft.IdentityModel.Logging.dll - - - ..\packages\Microsoft.IdentityModel.Protocols.6.8.0\lib\net461\Microsoft.IdentityModel.Protocols.dll - - - ..\packages\Microsoft.IdentityModel.Protocols.OpenIdConnect.6.8.0\lib\net461\Microsoft.IdentityModel.Protocols.OpenIdConnect.dll - - - ..\packages\Microsoft.IdentityModel.Tokens.6.8.0\lib\net461\Microsoft.IdentityModel.Tokens.dll - - - ..\packages\NLog.4.7.9\lib\net45\NLog.dll + + ..\packages\NLog.5.2.3\lib\net46\NLog.dll @@ -83,43 +53,36 @@ - - ..\packages\System.Configuration.ConfigurationManager.5.0.0\lib\net461\System.Configuration.ConfigurationManager.dll - - - ..\packages\System.Diagnostics.DiagnosticSource.4.6.0\lib\net46\System.Diagnostics.DiagnosticSource.dll - - - ..\packages\System.IdentityModel.Tokens.Jwt.6.8.0\lib\net461\System.IdentityModel.Tokens.Jwt.dll - ..\packages\System.IO.4.3.0\lib\net462\System.IO.dll - - ..\packages\System.IO.Compression.4.1.0\lib\net46\System.IO.Compression.dll + + ..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll + True + True - - ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll + + ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll - - ..\packages\System.Runtime.CompilerServices.Unsafe.4.6.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll + + ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll - - ..\packages\System.Security.AccessControl.5.0.0\lib\net461\System.Security.AccessControl.dll + + ..\packages\System.Security.AccessControl.6.0.0\lib\net461\System.Security.AccessControl.dll ..\packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net461\System.Security.Cryptography.Algorithms.dll @@ -127,26 +90,11 @@ ..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll - - ..\packages\System.Security.Cryptography.ProtectedData.4.5.0\lib\net461\System.Security.Cryptography.ProtectedData.dll - - - ..\packages\System.Security.Permissions.5.0.0\lib\net461\System.Security.Permissions.dll - ..\packages\System.Security.Principal.Windows.5.0.0\lib\net461\System.Security.Principal.Windows.dll - - ..\packages\System.Text.Encodings.Web.4.7.2\lib\net461\System.Text.Encodings.Web.dll - - - ..\packages\System.Text.Json.4.6.0\lib\net461\System.Text.Json.dll - - - ..\packages\System.Threading.Tasks.Extensions.4.5.2\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll - ..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll @@ -186,7 +134,5 @@ 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}. - - \ No newline at end of file diff --git a/EgwProxy.Icoel.DataLayer/packages.config b/EgwProxy.Icoel.DataLayer/packages.config index 67c12590..eb9d5551 100644 --- a/EgwProxy.Icoel.DataLayer/packages.config +++ b/EgwProxy.Icoel.DataLayer/packages.config @@ -1,37 +1,17 @@  - - - - - - - - - - - - - + - - - - - + + - + - + - - - - - \ No newline at end of file diff --git a/EgwProxy.Icoel.Debug.nuspec b/EgwProxy.Icoel.Debug.nuspec index 578007e9..90dd7f6f 100644 --- a/EgwProxy.Icoel.Debug.nuspec +++ b/EgwProxy.Icoel.Debug.nuspec @@ -12,7 +12,7 @@ #copyright# EgwProxy.Icoel EgwProxy Icoel - + diff --git a/EgwProxy.Icoel.Release.nuspec b/EgwProxy.Icoel.Release.nuspec index 046d2cb6..980049e0 100644 --- a/EgwProxy.Icoel.Release.nuspec +++ b/EgwProxy.Icoel.Release.nuspec @@ -12,7 +12,7 @@ #copyright# EgwProxy.Icoel EgwProxy Icoel - + diff --git a/EgwProxy.Icoel.Test/App.config b/EgwProxy.Icoel.Test/App.config index 1b10acd2..504f8ea2 100644 --- a/EgwProxy.Icoel.Test/App.config +++ b/EgwProxy.Icoel.Test/App.config @@ -47,31 +47,5 @@ --> - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/EgwProxy.Icoel.Test/EgwProxy.Icoel.Test.csproj b/EgwProxy.Icoel.Test/EgwProxy.Icoel.Test.csproj index 68e1c233..9375929a 100644 --- a/EgwProxy.Icoel.Test/EgwProxy.Icoel.Test.csproj +++ b/EgwProxy.Icoel.Test/EgwProxy.Icoel.Test.csproj @@ -36,8 +36,8 @@ - - ..\packages\System.IO.Compression.4.1.0\lib\net46\System.IO.Compression.dll + + ..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll diff --git a/EgwProxy.Icoel.Test/packages.config b/EgwProxy.Icoel.Test/packages.config index 69ca852f..42c44888 100644 --- a/EgwProxy.Icoel.Test/packages.config +++ b/EgwProxy.Icoel.Test/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/EgwProxy.Icoel/App.config b/EgwProxy.Icoel/App.config index 99afcda5..e6508929 100644 --- a/EgwProxy.Icoel/App.config +++ b/EgwProxy.Icoel/App.config @@ -33,31 +33,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/EgwProxy.Icoel/EgwProxy.Icoel.csproj b/EgwProxy.Icoel/EgwProxy.Icoel.csproj index 414507bc..dc643762 100644 --- a/EgwProxy.Icoel/EgwProxy.Icoel.csproj +++ b/EgwProxy.Icoel/EgwProxy.Icoel.csproj @@ -39,15 +39,16 @@ - - ..\packages\NLog.4.7.9\lib\net45\NLog.dll + + ..\packages\NLog.5.2.3\lib\net46\NLog.dll - - ..\packages\System.IO.Compression.4.1.0\lib\net46\System.IO.Compression.dll + + ..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll + True diff --git a/EgwProxy.Icoel/packages.config b/EgwProxy.Icoel/packages.config index 8b897446..21f93e4a 100644 --- a/EgwProxy.Icoel/packages.config +++ b/EgwProxy.Icoel/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/IOB-MAN/App.config b/IOB-MAN/App.config index 73c38842..23dbccd3 100644 --- a/IOB-MAN/App.config +++ b/IOB-MAN/App.config @@ -63,7 +63,7 @@ - + @@ -99,6 +99,14 @@ + + + + + + + + diff --git a/IOB-MAN/IOB-MAN.csproj b/IOB-MAN/IOB-MAN.csproj index f4c3cc5e..73aa1385 100644 --- a/IOB-MAN/IOB-MAN.csproj +++ b/IOB-MAN/IOB-MAN.csproj @@ -38,38 +38,48 @@ IobManIcon.ico - - ..\packages\DnsClient.1.6.0\lib\net45\DnsClient.dll + + ..\packages\AWSSDK.Core.3.7.100.14\lib\net45\AWSSDK.Core.dll + + + ..\packages\AWSSDK.SecurityToken.3.7.100.14\lib\net45\AWSSDK.SecurityToken.dll + + + ..\packages\DnsClient.1.6.1\lib\net45\DnsClient.dll ..\packages\SharpZipLib.1.3.3\lib\net45\ICSharpCode.SharpZipLib.dll - - ..\packages\MapoSDK.6.14.2204.2616\lib\MapoSDK.dll + + ..\packages\MapoSDK.6.14.2304.1209\lib\MapoSDK.dll + True ..\packages\Microsoft.Bcl.AsyncInterfaces.6.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll - - ..\packages\MongoDB.Bson.2.15.0\lib\netstandard2.0\MongoDB.Bson.dll + + ..\packages\Microsoft.Extensions.Logging.Abstractions.6.0.4\lib\net461\Microsoft.Extensions.Logging.Abstractions.dll - - ..\packages\MongoDB.Driver.2.15.0\lib\netstandard2.0\MongoDB.Driver.dll + + ..\packages\MongoDB.Bson.2.21.0\lib\netstandard2.0\MongoDB.Bson.dll - - ..\packages\MongoDB.Driver.Core.2.15.0\lib\netstandard2.0\MongoDB.Driver.Core.dll + + ..\packages\MongoDB.Driver.2.21.0\lib\netstandard2.0\MongoDB.Driver.dll - - ..\packages\MongoDB.Libmongocrypt.1.3.0\lib\netstandard2.0\MongoDB.Libmongocrypt.dll + + ..\packages\MongoDB.Driver.Core.2.21.0\lib\netstandard2.0\MongoDB.Driver.Core.dll + + + ..\packages\MongoDB.Libmongocrypt.1.8.0\lib\netstandard2.0\MongoDB.Libmongocrypt.dll - ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll - - ..\packages\NLog.4.7.15\lib\net45\NLog.dll + + ..\packages\NLog.5.2.3\lib\net46\NLog.dll - ..\packages\Pipelines.Sockets.Unofficial.2.2.2\lib\net461\Pipelines.Sockets.Unofficial.dll + ..\packages\Pipelines.Sockets.Unofficial.2.2.8\lib\net461\Pipelines.Sockets.Unofficial.dll ..\packages\RestSharp.106.15.0\lib\net452\RestSharp.dll @@ -80,17 +90,20 @@ ..\packages\SharpCompress.0.31.0\lib\net461\SharpCompress.dll + + ..\packages\Snappier.1.0.0\lib\netstandard2.0\Snappier.dll + - ..\packages\StackExchange.Redis.2.5.61\lib\net461\StackExchange.Redis.dll + ..\packages\StackExchange.Redis.2.6.122\lib\net461\StackExchange.Redis.dll - - ..\packages\SteamWare.IO.5.2.2205.1719\lib\net462\SteamWare.IO.dll + + ..\packages\SteamWare.IO.5.2.2206.1310\lib\net462\SteamWare.IO.dll - - ..\packages\SteamWare.Logger.5.2.2205.1719\lib\net462\SteamWare.Logger.dll + + ..\packages\SteamWare.Logger.5.2.2206.1310\lib\net462\SteamWare.Logger.dll - - ..\packages\SteamWare.Scheduler.5.2.2205.1719\lib\net462\SteamWare.Scheduler.dll + + ..\packages\SteamWare.Scheduler.5.2.2206.1310\lib\net462\SteamWare.Scheduler.dll @@ -101,7 +114,7 @@ ..\packages\System.Diagnostics.PerformanceCounter.6.0.1\lib\net461\System.Diagnostics.PerformanceCounter.dll - + ..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll True True @@ -110,8 +123,8 @@ ..\packages\System.IO.Pipelines.6.0.2\lib\net461\System.IO.Pipelines.dll - - ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll + + ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll ..\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll @@ -175,6 +188,9 @@ + + ..\packages\ZstdSharp.Port.0.6.2\lib\net461\ZstdSharp.dll + @@ -229,19 +245,12 @@ - - - - Always PreserveNewest - - Designer - SettingsSingleFileGenerator @@ -266,6 +275,9 @@ + + + @@ -273,13 +285,11 @@ - + - Questo progetto fa riferimento a uno o più pacchetti NuGet che non sono presenti in questo computer. Usare lo strumento di ripristino dei pacchetti NuGet per scaricarli. Per altre informazioni, vedere http://go.microsoft.com/fwlink/?LinkID=322105. Il file mancante è {0}. + 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}. - - + - \ No newline at end of file diff --git a/IOB-MAN/NLog.xsd b/IOB-MAN/NLog.xsd deleted file mode 100644 index eefeec81..00000000 --- a/IOB-MAN/NLog.xsd +++ /dev/null @@ -1,3656 +0,0 @@ - - - - - - - - - - - - - - - Watch config file for changes and reload automatically. - - - - - Print internal NLog messages to the console. Default value is: false - - - - - Print internal NLog messages to the console error output. Default value is: false - - - - - Write internal NLog messages to the specified file. - - - - - Log level threshold for internal log messages. Default value is: Info. - - - - - Global log level threshold for application log messages. Messages below this level won't be logged. - - - - - Throw an exception when there is an internal error. Default value is: false. Not recommend to set to true in production! - - - - - Throw an exception when there is a configuration error. If not set, determined by throwExceptions. - - - - - Gets or sets a value indicating whether Variables should be kept on configuration reload. Default value is: false. - - - - - Write internal NLog messages to the System.Diagnostics.Trace. Default value is: false. - - - - - Write timestamps for internal NLog messages. Default value is: true. - - - - - Use InvariantCulture as default culture instead of CurrentCulture. Default value is: false. - - - - - Perform message template parsing and formatting of LogEvent messages (true = Always, false = Never, empty = Auto Detect). Default value is: empty. - - - - - - - - - - - - - - Make all targets within this section asynchronous (creates additional threads but the calling thread isn't blocked by any target writes). - - - - - - - - - - - - - - - - - Prefix for targets/layout renderers/filters/conditions loaded from this assembly. - - - - - Load NLog extensions from the specified file (*.dll) - - - - - Load NLog extensions from the specified assembly. Assembly name should be fully qualified. - - - - - - - - - - Filter on the name of the logger. May include wildcard characters ('*' or '?'). - - - - - Comma separated list of levels that this rule matches. - - - - - Minimum level that this rule matches. - - - - - Maximum level that this rule matches. - - - - - Level that this rule matches. - - - - - Comma separated list of target names. - - - - - Ignore further rules if this one matches. - - - - - Enable this rule. Note: disabled rules aren't available from the API. - - - - - Rule identifier to allow rule lookup with Configuration.FindRuleByName and Configuration.RemoveRuleByName. - - - - - - - - - - - - - - - Default action if none of the filters match. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the file to be included. You could use * wildcard. The name is relative to the name of the current config file. - - - - - Ignore any errors in the include file. - - - - - - - - Variable value. Note, the 'value' attribute has precedence over this one. - - - - - - Variable name. - - - - - Variable value. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Number of log events that should be processed in a batch by the lazy writer thread. - - - - - Whether to use the locking queue, instead of a lock-free concurrent queue The locking queue is less concurrent when many logger threads, but reduces memory allocation - - - - - Limit of full s to write before yielding into Performance is better when writing many small batches, than writing a single large batch - - - - - Action to be taken when the lazy writer thread request queue count exceeds the set limit. - - - - - Limit on the number of requests in the lazy writer thread request queue. - - - - - Time in milliseconds to sleep between batches. (1 or less means trigger on new activity) - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - Delay the flush until the LogEvent has been confirmed as written - - - - - Condition expression. Log events who meet this condition will cause a flush on the wrapped target. - - - - - Only flush when LogEvent matches condition. Ignore explicit-flush, config-reload-flush and shutdown-flush - - - - - Name of the target. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Number of log events to be buffered. - - - - - Timeout (in milliseconds) after which the contents of buffer will be flushed if there's no write in the specified period of time. Use -1 to disable timed flushes. - - - - - Action to take if the buffer overflows. - - - - - Indicates whether to use sliding timeout. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Encoding to be used. - - - - - Instance of that is used to format log messages. - - - - - End of line value if a newline is appended at the end of log message . - - - - - Maximum message size in bytes. - - - - - Indicates whether to append newline at the end of log message. - - - - - Get or set the SSL/TLS protocols. Default no SSL/TLS is used. Currently only implemented for TCP. - - - - - Network address. - - - - - Size of the connection cache (number of connections which are kept alive). - - - - - The number of seconds a connection will remain idle before the first keep-alive probe is sent - - - - - Maximum queue size. - - - - - Maximum current connections. 0 = no maximum. - - - - - Action that should be taken if the will be more connections than . - - - - - Action that should be taken if the message is larger than maxMessageSize. - - - - - Indicates whether to keep connection open whenever possible. - - - - - NDLC item separator. - - - - - Indicates whether to include source info (file name and line number) in the information sent over the network. - - - - - Renderer for log4j:event logger-xml-attribute (Default ${logger}) - - - - - Indicates whether to include NLog-specific extensions to log4j schema. - - - - - Indicates whether to include contents of the stack. - - - - - Indicates whether to include stack contents. - - - - - Indicates whether to include dictionary contents. - - - - - Indicates whether to include dictionary contents. - - - - - Indicates whether to include call site (class and method name) in the information sent over the network. - - - - - Option to include all properties from the log events - - - - - AppInfo field. By default it's the friendly name of the current AppDomain. - - - - - NDC item separator. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Layout that should be use to calculate the value for the parameter. - - - - - Viewer parameter name. - - - - - Whether an attribute with empty value should be included in the output - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Text to be rendered. - - - - - Header. - - - - - Footer. - - - - - Indicates whether to auto-check if the console is available. - Disables console writing if Environment.UserInteractive = False (Windows Service) - Disables console writing if Console Standard Input is not available (Non-Console-App) - - - - - Enables output using ANSI Color Codes - - - - - The encoding for writing messages to the . - - - - - Indicates whether the error stream (stderr) should be used instead of the output stream (stdout). - - - - - Indicates whether to auto-flush after - - - - - Indicates whether to auto-check if the console has been redirected to file - Disables coloring logic when System.Console.IsOutputRedirected = true - - - - - Indicates whether to use default row highlighting rules. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Condition that must be met in order to set the specified foreground and background color. - - - - - Background color. - - - - - Foreground color. - - - - - - - - - - - - - - - - - Compile the ? This can improve the performance, but at the costs of more memory usage. If false, the Regex Cache is used. - - - - - Condition that must be met before scanning the row for highlight of words - - - - - Indicates whether to ignore case when comparing texts. - - - - - Regular expression to be matched. You must specify either text or regex. - - - - - Text to be matched. You must specify either text or regex. - - - - - Indicates whether to match whole words only. - - - - - Background color. - - - - - Foreground color. - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Text to be rendered. - - - - - Header. - - - - - Footer. - - - - - Indicates whether to auto-flush after - - - - - Indicates whether to auto-check if the console is available - Disables console writing if Environment.UserInteractive = False (Windows Service) - Disables console writing if Console Standard Input is not available (Non-Console-App) - - - - - The encoding for writing messages to the . - - - - - Indicates whether to send the log messages to the standard error instead of the standard output. - - - - - Whether to enable batch writing using char[]-buffers, instead of using - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Obsolete - value will be ignored! The logging code always runs outside of transaction. Gets or sets a value indicating whether to use database transactions. Some data providers require this. - - - - - Indicates whether to keep the database connection open between the log events. - - - - - Name of the database provider. - - - - - Database password. If the ConnectionString is not provided this value will be used to construct the "Password=" part of the connection string. - - - - - Database host name. If the ConnectionString is not provided this value will be used to construct the "Server=" part of the connection string. - - - - - Database user name. If the ConnectionString is not provided this value will be used to construct the "User ID=" part of the connection string. - - - - - Name of the connection string (as specified in <connectionStrings> configuration section. - - - - - Connection string. When provided, it overrides the values specified in DBHost, DBUserName, DBPassword, DBDatabase. - - - - - Database name. If the ConnectionString is not provided this value will be used to construct the "Database=" part of the connection string. - - - - - Connection string using for installation and uninstallation. If not provided, regular ConnectionString is being used. - - - - - Configures isolated transaction batch writing. If supported by the database, then it will improve insert performance. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - Text of the SQL command to be run on each log level. - - - - - Type of the SQL command to be run on each log level. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Convert format of the property value - - - - - Culture used for parsing property string-value for type-conversion - - - - - Value to assign on the object-property - - - - - Name for the object-property - - - - - Type of the object-property - - - - - - - - - - - - - - Type of the command. - - - - - Connection string to run the command against. If not provided, connection string from the target is used. - - - - - Indicates whether to ignore failures. - - - - - Command text. - - - - - - - - - - - - - - - - - - - Database parameter name. - - - - - Layout that should be use to calculate the value for the parameter. - - - - - Database parameter DbType. - - - - - Database parameter size. - - - - - Database parameter precision. - - - - - Database parameter scale. - - - - - Type of the parameter. - - - - - Whether empty value should translate into DbNull. Requires database column to allow NULL values. - - - - - Convert format of the database parameter value. - - - - - Culture used for parsing parameter string-value for type-conversion - - - - - - - - - - - - - - - - Name of the target. - - - - - Text to be rendered. - - - - - Header. - - - - - Footer. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - Name of the target. - - - - - Layout used to format log messages. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Layout used to format log messages. - - - - - Layout that renders event Category. - - - - - Optional entry type. When not set, or when not convertible to then determined by - - - - - Layout that renders event ID. - - - - - Name of the Event Log to write to. This can be System, Application or any user-defined name. - - - - - Name of the machine on which Event Log service is running. - - - - - Maximum Event log size in kilobytes. - - - - - Message length limit to write to the Event Log. - - - - - Value to be used as the event Source. - - - - - Action to take if the message is larger than the option. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Indicates whether to return to the first target after any successful write. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Text to be rendered. - - - - - Header. - - - - - Footer. - - - - - File encoding. - - - - - Line ending mode. - - - - - Maximum days of archive files that should be kept. - - - - - Indicates whether to compress archive files into the zip archive format. - - - - - Way file archives are numbered. - - - - - Name of the file to be used for an archive. - - - - - Is the an absolute or relative path? - - - - - Indicates whether to automatically archive log files every time the specified time passes. - - - - - Size in bytes above which log files will be automatically archived. Warning: combining this with isn't supported. We cannot create multiple archive files, if they should have the same name. Choose: - - - - - Maximum number of archive files that should be kept. - - - - - Indicates whether the footer should be written only when the file is archived. - - - - - Maximum number of log file names that should be stored as existing. - - - - - Indicates whether to delete old log file on startup. - - - - - File attributes (Windows only). - - - - - Indicates whether to create directories if they do not exist. - - - - - Cleanup invalid values in a filename, e.g. slashes in a filename. If set to true, this can impact the performance of massive writes. If set to false, nothing gets written when the filename is wrong. - - - - - Value of the file size threshold to archive old log file on startup. - - - - - Indicates whether to archive old log file on startup. - - - - - Value specifying the date format to use when archiving files. - - - - - Indicates whether to enable log file(s) to be deleted. - - - - - Indicates whether to write BOM (byte order mark) in created files - - - - - Indicates whether to replace file contents on each write instead of appending log message at the end. - - - - - Indicates whether file creation calls should be synchronized by a system global mutex. - - - - - Gets or set a value indicating whether a managed file stream is forced, instead of using the native implementation. - - - - - Is the an absolute or relative path? - - - - - Name of the file to write to. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - Indicates whether concurrent writes to the log file by multiple processes on different network hosts. - - - - - Maximum number of seconds that files are kept open. If this number is negative the files are not automatically closed after a period of inactivity. - - - - - Number of files to be kept open. Setting this to a higher value may improve performance in a situation where a single File target is writing to many files (such as splitting by level or by logger). - - - - - Indicates whether to keep log file open instead of opening and closing it on each logging event. - - - - - Whether or not this target should just discard all data that its asked to write. Mostly used for when testing NLog Stack except final write - - - - - Indicates whether concurrent writes to the log file by multiple processes on the same host. - - - - - Number of times the write is appended on the file before NLog discards the log message. - - - - - Delay in milliseconds to wait before attempting to write to the file again. - - - - - Log file buffer size in bytes. - - - - - Maximum number of seconds before open files are flushed. If this number is negative or zero the files are not flushed by timer. - - - - - Indicates whether to automatically flush the file buffers after each log message. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Condition expression. Log events who meet this condition will be forwarded to the wrapped target. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Windows domain name to change context to. - - - - - Required impersonation level. - - - - - Type of the logon provider. - - - - - Logon Type. - - - - - User account password. - - - - - Indicates whether to revert to the credentials of the process instead of impersonating another user. - - - - - Username to change context to. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Interval in which messages will be written up to the number of messages. - - - - - Maximum allowed number of messages written per . - - - - - Name of the target. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Endpoint address. - - - - - Name of the endpoint configuration in WCF configuration file. - - - - - Indicates whether to use a WCF service contract that is one way (fire and forget) or two way (request-reply) - - - - - Client ID. - - - - - Indicates whether to include per-event properties in the payload sent to the server. - - - - - Indicates whether to use binary message encoding. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - Layout that should be use to calculate the value for the parameter. - - - - - Name of the parameter. - - - - - Type of the parameter. - - - - - Type of the parameter. Obsolete alias for - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Text to be rendered. - - - - - Header. - - - - - Footer. - - - - - Indicates whether NewLine characters in the body should be replaced with tags. - - - - - Priority used for sending mails. - - - - - Encoding to be used for sending e-mail. - - - - - BCC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). - - - - - CC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). - - - - - Indicates whether to add new lines between log entries. - - - - - Indicates whether to send message as HTML instead of plain text. - - - - - Sender's email address (e.g. joe@domain.com). - - - - - Mail message body (repeated for each log message send in one mail). - - - - - Mail subject. - - - - - Recipients' email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com). - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - Indicates the SMTP client timeout. - - - - - SMTP Server to be used for sending. - - - - - SMTP Authentication mode. - - - - - Username used to connect to SMTP server (used when SmtpAuthentication is set to "basic"). - - - - - Password used to authenticate against SMTP server (used when SmtpAuthentication is set to "basic"). - - - - - Indicates whether SSL (secure sockets layer) should be used when communicating with SMTP server. - - - - - Port number that SMTP Server is listening on. - - - - - Indicates whether the default Settings from System.Net.MailSettings should be used. - - - - - Folder where applications save mail messages to be processed by the local SMTP server. - - - - - Specifies how outgoing email messages will be handled. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Layout used to format log messages. - - - - - Max number of items to have in memory - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Class name. - - - - - Method name. The method must be public and static. Use the AssemblyQualifiedName , https://msdn.microsoft.com/en-us/library/system.type.assemblyqualifiedname(v=vs.110).aspx e.g. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Layout used to format log messages. - - - - - Encoding to be used. - - - - - End of line value if a newline is appended at the end of log message . - - - - - Maximum message size in bytes. - - - - - Indicates whether to append newline at the end of log message. - - - - - Network address. - - - - - Size of the connection cache (number of connections which are kept alive). - - - - - The number of seconds a connection will remain idle before the first keep-alive probe is sent - - - - - Indicates whether to keep connection open whenever possible. - - - - - Maximum current connections. 0 = no maximum. - - - - - Maximum queue size. - - - - - Action that should be taken if the will be more connections than . - - - - - Action that should be taken if the message is larger than maxMessageSize. - - - - - Get or set the SSL/TLS protocols. Default no SSL/TLS is used. Currently only implemented for TCP. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Encoding to be used. - - - - - Instance of that is used to format log messages. - - - - - End of line value if a newline is appended at the end of log message . - - - - - Maximum message size in bytes. - - - - - Indicates whether to append newline at the end of log message. - - - - - Get or set the SSL/TLS protocols. Default no SSL/TLS is used. Currently only implemented for TCP. - - - - - Network address. - - - - - Size of the connection cache (number of connections which are kept alive). - - - - - The number of seconds a connection will remain idle before the first keep-alive probe is sent - - - - - Maximum queue size. - - - - - Maximum current connections. 0 = no maximum. - - - - - Action that should be taken if the will be more connections than . - - - - - Action that should be taken if the message is larger than maxMessageSize. - - - - - Indicates whether to keep connection open whenever possible. - - - - - NDLC item separator. - - - - - Indicates whether to include source info (file name and line number) in the information sent over the network. - - - - - Renderer for log4j:event logger-xml-attribute (Default ${logger}) - - - - - Indicates whether to include NLog-specific extensions to log4j schema. - - - - - Indicates whether to include contents of the stack. - - - - - Indicates whether to include stack contents. - - - - - Indicates whether to include dictionary contents. - - - - - Indicates whether to include dictionary contents. - - - - - Indicates whether to include call site (class and method name) in the information sent over the network. - - - - - Option to include all properties from the log events - - - - - AppInfo field. By default it's the friendly name of the current AppDomain. - - - - - NDC item separator. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - Name of the target. - - - - - Layout used to format log messages. - - - - - Indicates whether to perform layout calculation. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - Name of the target. - - - - - Layout used to format log messages. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Indicates whether performance counter should be automatically created. - - - - - Name of the performance counter category. - - - - - Counter help text. - - - - - Name of the performance counter. - - - - - Performance counter type. - - - - - The value by which to increment the counter. - - - - - Performance counter instance name. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Default filter to be applied when no specific rule matches. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - Condition to be tested. - - - - - Resulting filter to be applied when the condition matches. - - - - - - - - - - - - - Name of the target. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - Name of the target. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - Number of times to repeat each log message. - - - - - - - - - - - - - - - - - Name of the target. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - Number of retries that should be attempted on the wrapped target in case of a failure. - - - - - Time to wait between retries in milliseconds. - - - - - - - - - - - - - - - Name of the target. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - Name of the target. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Layout used to format log messages. - - - - - Forward to (Instead of ) - - - - - Always use independent of - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name of the target. - - - - - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit - - - - - Should we include the BOM (Byte-order-mark) for UTF? Influences the property. This will only work for UTF-8. - - - - - Web service method name. Only used with Soap. - - - - - Web service namespace. Only used with Soap. - - - - - Protocol to be used when calling web service. - - - - - Custom proxy address, include port separated by a colon - - - - - Encoding. - - - - - Web service URL. - - - - - Value of the User-agent HTTP header. - - - - - Value whether escaping be done according to the old NLog style (Very non-standard) - - - - - Value whether escaping be done according to Rfc3986 (Supports Internationalized Resource Identifiers - IRIs) - - - - - Indicates whether to pre-authenticate the HttpWebRequest (Requires 'Authorization' in parameters) - - - - - Name of the root XML element, if POST of XML document chosen. If so, this property must not be null. (see and ). - - - - - (optional) root namespace of the XML document, if POST of XML document chosen. (see and ). - - - - - Proxy configuration when calling web service - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Footer layout. - - - - - Header layout. - - - - - Body layout (can be repeated multiple times). - - - - - Custom column delimiter value (valid when ColumnDelimiter is set to 'Custom'). - - - - - Column delimiter. - - - - - Quote Character. - - - - - Quoting mode. - - - - - Indicates whether CVS should include header. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Layout of the column. - - - - - Name of the column. - - - - - Override of Quoting mode - - - - - - - - - - - - - - - - - - - - - - Should forward slashes be escaped? If true, / will be converted to \/ - - - - - Option to render the empty object value {} - - - - - Option to suppress the extra spaces in the output json - - - - - Option to exclude null/empty properties from the log event (as JSON) - - - - - List of property names to exclude when is true - - - - - Option to include all properties from the log event (as JSON) - - - - - Indicates whether to include contents of the dictionary. - - - - - Indicates whether to include contents of the dictionary. - - - - - Indicates whether to include contents of the dictionary. - - - - - How far should the JSON serializer follow object references before backing off - - - - - - - - - - - - - - - - - Layout that will be rendered as the attribute's value. - - - - - Name of the attribute. - - - - - Determines whether or not this attribute will be Json encoded. - - - - - Should forward slashes be escaped? If true, / will be converted to \/ - - - - - Indicates whether to escape non-ascii characters - - - - - Whether an attribute with empty value should be included in the output - - - - - - - - - - - - - - Footer layout. - - - - - Header layout. - - - - - Body layout (can be repeated multiple times). - - - - - - - - - - - - - - - - - - - - - Option to include all properties from the log events - - - - - Indicates whether to include call site (class and method name) in the information sent over the network. - - - - - Indicates whether to include contents of the dictionary. - - - - - Indicates whether to include contents of the dictionary. - - - - - Indicates whether to include contents of the stack. - - - - - Indicates whether to include contents of the stack. - - - - - Indicates whether to include source info (file name and line number) in the information sent over the network. - - - - - - - - - - - - - - Layout text. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - List of property names to exclude when is true - - - - - Option to include all properties from the log event (as XML) - - - - - Indicates whether to include contents of the dictionary. - - - - - Indicates whether to include contents of the dictionary. - - - - - How far should the XML serializer follow object references before backing off - - - - - XML element name to use for rendering IList-collections items - - - - - XML attribute name to use when rendering property-key When null (or empty) then key-attribute is not included - - - - - XML element name to use when rendering properties - - - - - XML attribute name to use when rendering property-value When null (or empty) then value-attribute is not included and value is formatted as XML-element-value - - - - - Name of the root XML element - - - - - Value inside the root XML element - - - - - Whether a ElementValue with empty value should be included in the output - - - - - Auto indent and create new lines - - - - - Determines whether or not this attribute will be Xml encoded. - - - - - - - - - - - - - - - Layout that will be rendered as the attribute's value. - - - - - Name of the attribute. - - - - - Determines whether or not this attribute will be Xml encoded. - - - - - Whether an attribute with empty value should be included in the output - - - - - - - - - - - - - - - - - - - - - - - - - Determines whether or not this attribute will be Xml encoded. - - - - - Name of the element - - - - - Value inside the element - - - - - Whether a ElementValue with empty value should be included in the output - - - - - Auto indent and create new lines - - - - - List of property names to exclude when is true - - - - - Option to include all properties from the log event (as XML) - - - - - Indicates whether to include contents of the dictionary. - - - - - Indicates whether to include contents of the dictionary. - - - - - How far should the XML serializer follow object references before backing off - - - - - XML element name to use for rendering IList-collections items - - - - - XML attribute name to use when rendering property-key When null (or empty) then key-attribute is not included - - - - - XML element name to use when rendering properties - - - - - XML attribute name to use when rendering property-value When null (or empty) then value-attribute is not included and value is formatted as XML-element-value - - - - - - - - - - - - - Action to be taken when filter matches. - - - - - Condition expression. - - - - - - - - - - - - - - - - - - - - - - - - - - Action to be taken when filter matches. - - - - - Indicates whether to ignore case when comparing strings. - - - - - Layout to be used to filter log messages. - - - - - Substring to be matched. - - - - - - - - - - - - - - - - - Action to be taken when filter matches. - - - - - String to compare the layout to. - - - - - Indicates whether to ignore case when comparing strings. - - - - - Layout to be used to filter log messages. - - - - - - - - - - - - - - - - - Action to be taken when filter matches. - - - - - Indicates whether to ignore case when comparing strings. - - - - - Layout to be used to filter log messages. - - - - - Substring to be matched. - - - - - - - - - - - - - - - - - Action to be taken when filter matches. - - - - - String to compare the layout to. - - - - - Indicates whether to ignore case when comparing strings. - - - - - Layout to be used to filter log messages. - - - - - - - - - - - - - - - - - - - - - - - - Action to be taken when filter matches. - - - - - Default number of unique filter values to expect, will automatically increase if needed - - - - - Applies the configured action to the initial logevent that starts the timeout period. Used to configure that it should ignore all events until timeout. - - - - - Layout to be used to filter log messages. - - - - - Max number of unique filter values to expect simultaneously - - - - - Max length of filter values, will truncate if above limit - - - - - How long before a filter expires, and logging is accepted again - - - - - Default buffer size for the internal buffers - - - - - Reuse internal buffers, and doesn't have to constantly allocate new buffers - - - - - Append FilterCount to the when an event is no longer filtered - - - - - Insert FilterCount value into when an event is no longer filtered - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/IOB-MAN/packages.config b/IOB-MAN/packages.config index fc4b5a6f..a8424f5c 100644 --- a/IOB-MAN/packages.config +++ b/IOB-MAN/packages.config @@ -1,31 +1,33 @@  - - + + + + - - - - - - - - - + + + + + + + + - - - - + + + + + - + @@ -38,4 +40,5 @@ + \ No newline at end of file diff --git a/IOB-UT-NEXT/DataExport.cs b/IOB-UT-NEXT/DataExport.cs index 42c6cb82..c422549b 100644 --- a/IOB-UT-NEXT/DataExport.cs +++ b/IOB-UT-NEXT/DataExport.cs @@ -14,8 +14,8 @@ namespace IOB_UT_NEXT /// Effettua salvataggio in file di un generico oggetto in formato CSV /// /// - /// - /// + /// Lista oggetti da esportare + /// Percorso file di output /// Indica se scrivere header ad inizio CSV /// Separatore da impiegare (default ";") /// @@ -34,7 +34,6 @@ namespace IOB_UT_NEXT lines.Add(header); } var valueLines = reportData.Select(row => string.Join($"{separator}", fieldList.Split(separator).Select(a => row.GetType().GetProperty(a).GetValue(row, null)))); - //var valueLines = reportData.Select(row => string.Join(";", header.Split(';').Select(a => row.GetType().GetProperty(a).GetValue(row, null)))); lines.AddRange(valueLines); File.WriteAllLines(path, lines.ToArray()); answ = true; @@ -43,5 +42,57 @@ namespace IOB_UT_NEXT { } return answ; } + + /// + /// Effettua salvataggio in file di un generico oggetto in formato Fixed width + /// + /// + /// Lista oggetti da esportare + /// Percorso file di output + /// Vettore delle larghezze richieste + /// + public static bool SaveFixedWidth(List reportData, string path, Dictionary widthList, Dictionary fieldLPad, Dictionary numDecReq) + { + bool answ = false; + var lines = new List(); + try + { + IEnumerable props = TypeDescriptor.GetProperties(typeof(T)).OfType(); + var elencoValori = props.ToList(); + foreach (var dataRow in reportData) + { + string currRow = ""; + // processo 1:1 x width... + foreach (var item in widthList) + { + string currValue = dataRow.GetType().GetProperty(item.Key).GetValue(dataRow, null).ToString(); + // se ha un num decimali specifico richiesto esegue... + if (numDecReq.ContainsKey(item.Key)) + { + string nDec = $"N{numDecReq[item.Key]}"; + decimal rawVal = 0; + decimal.TryParse(currValue, out rawVal); + currValue = rawVal.ToString(nDec); + } + if (currValue.Length > item.Value) + { + currValue = currValue.Substring(0, item.Value); + } + // se ha un LPad richiesto esegue... + if (fieldLPad.ContainsKey(item.Key)) + { + currValue = currValue.PadLeft(item.Value, fieldLPad[item.Key]); + } + currRow += string.Format($"{{0,-{item.Value}}}", currValue); + } + lines.Add(currRow); + } + File.WriteAllLines(path, lines.ToArray()); + answ = true; + } + catch + { } + return answ; + } } } diff --git a/IOB-UT-NEXT/DataModel/Fimat.cs b/IOB-UT-NEXT/DataModel/Fimat.cs index b8293102..8bb738a0 100644 --- a/IOB-UT-NEXT/DataModel/Fimat.cs +++ b/IOB-UT-NEXT/DataModel/Fimat.cs @@ -122,11 +122,12 @@ namespace IOB_UT_NEXT.DataModel #region Public Properties public string CodMag { get; set; } = ""; - public string FileRef { get; set; } = ""; public string ColourCode { get; set; } = ""; public string Description { get; set; } = ""; - public DateTime DtRif { get; set; } = DateTime.Now; + public string UM { get; set; } = ""; public double WeightKgProc { get; set; } = 0; + public DateTime DtRif { get; set; } = DateTime.Now; + //public string FileRef { get; set; } = ""; #endregion Public Properties } @@ -164,10 +165,28 @@ namespace IOB_UT_NEXT.DataModel /// public string codMag { get; set; } = ""; + /// + /// Modalità export: + /// csv / FixWidth + /// + public string mode { get; set; } = ""; + /// /// Rapporti di conversione x gli item indicati /// public Dictionary convRatio { get; set; } = new Dictionary(); + /// + /// Lunghezza fissa campi + /// + public Dictionary fieldLength { get; set; } = new Dictionary(); + /// + /// Numero decimali campo + /// + public Dictionary fieldNDec { get; set; } = new Dictionary(); + /// + /// Padding left (OVE necessari) + /// + public Dictionary fieldLPad { get; set; } = new Dictionary(); } [XmlRoot(ElementName = "DesData")] diff --git a/IOB-UT-NEXT/DataQueue.cs b/IOB-UT-NEXT/DataQueue.cs new file mode 100644 index 00000000..b8b698f1 --- /dev/null +++ b/IOB-UT-NEXT/DataQueue.cs @@ -0,0 +1,129 @@ +using StackExchange.Redis; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Linq; + +namespace IOB_UT_NEXT +{ + /// + /// Classe gestione code, a seconda della conf come LIST redis o come concurrent queue in memoria + /// + public class DataQueue + { + #region Public Fields + + public int Count = 0; + + #endregion Public Fields + + #region Public Constructors + + public DataQueue(string codIOB, string qName, bool useRedis) + { + UseRedis = useRedis; + CodIOB = codIOB; + QueueName = qName; + KeyName = redisMan.redHash($"IOB:QUEUE:{CodIOB}:{QueueName}"); + } + + #endregion Public Constructors + + #region Public Methods + + /// + /// Accodamento elemento + /// + /// + public void Enqueue(string item) + { + if (UseRedis) + { + redisMan.redQueuePush(KeyName, item); + Count = (int)redisMan.redQueueCount(KeyName); + } + else + { + MemQueue.Enqueue(item); + Count = MemQueue.Count; + } + } + + /// + /// Lista string degli elementi in coda, svuotando la coda + /// + /// + public List ToList() + { + List answ = new List(); + if (UseRedis) + { + Count = (int)redisMan.redQueueCount(KeyName); + // ciclo x prendere tutti... + while (Count > 0) + { + answ.Add(redisMan.redQueuePop(KeyName)); + Count = (int)redisMan.redQueueCount(KeyName); + } + } + else + { + answ = MemQueue.ToList(); + Count = MemQueue.Count; + } + return answ; + } + + /// + /// Recupera 1 record dalla coda... + /// + /// + /// + public bool TryDequeue(out string result) + { + bool fatto = false; + if (UseRedis) + { + result = redisMan.redQueuePop(KeyName); + Count = (int)redisMan.redQueueCount(KeyName); + fatto = true; + } + else + { + fatto = MemQueue.TryDequeue(out result); + Count = MemQueue.Count; + } + return fatto; + } + + #endregion Public Methods + + #region Private Fields + + private string CodIOB = "NA"; + + private RedisKey KeyName = "NA"; + + /// + /// Coda modalità memoria locale + /// + private ConcurrentQueue MemQueue = new ConcurrentQueue(); + + private string QueueName = "NA"; + + /// + /// Indica se usare redis come datastore vs memoria + /// + private bool UseRedis = false; + + #endregion Private Fields + + #region Private Properties + + /// + /// Oggetto connessione REDIS + /// + private RedisIobCache redisMan { get; set; } = new RedisIobCache(); + + #endregion Private Properties + } +} \ No newline at end of file diff --git a/IOB-UT-NEXT/IOB-UT-NEXT.csproj b/IOB-UT-NEXT/IOB-UT-NEXT.csproj index 2572969c..9f585c85 100644 --- a/IOB-UT-NEXT/IOB-UT-NEXT.csproj +++ b/IOB-UT-NEXT/IOB-UT-NEXT.csproj @@ -74,9 +74,12 @@ prompt MinimumRecommendedRules.ruleset + + true + - - ..\packages\SharpZipLib.1.3.1\lib\net45\ICSharpCode.SharpZipLib.dll + + ..\packages\SharpZipLib.1.4.2\lib\netstandard2.0\ICSharpCode.SharpZipLib.dll ..\packages\MapoSDK.6.14.2304.1209\lib\MapoSDK.dll @@ -88,13 +91,13 @@ ..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll - ..\packages\NLog.5.1.2\lib\net46\NLog.dll + ..\packages\NLog.5.2.3\lib\net46\NLog.dll - ..\packages\Pipelines.Sockets.Unofficial.2.2.2\lib\net461\Pipelines.Sockets.Unofficial.dll + ..\packages\Pipelines.Sockets.Unofficial.2.2.8\lib\net461\Pipelines.Sockets.Unofficial.dll - ..\packages\StackExchange.Redis.2.6.80\lib\net461\StackExchange.Redis.dll + ..\packages\StackExchange.Redis.2.6.122\lib\net461\StackExchange.Redis.dll @@ -102,17 +105,17 @@ - - ..\packages\System.Diagnostics.PerformanceCounter.6.0.0\lib\net461\System.Diagnostics.PerformanceCounter.dll + + ..\packages\System.Diagnostics.PerformanceCounter.6.0.1\lib\net461\System.Diagnostics.PerformanceCounter.dll - + ..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll - - ..\packages\System.IO.Pipelines.6.0.0\lib\net461\System.IO.Pipelines.dll + + ..\packages\System.IO.Pipelines.6.0.3\lib\net461\System.IO.Pipelines.dll - - ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll + + ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll @@ -143,6 +146,7 @@ + diff --git a/IOB-UT-NEXT/RedisMan.cs b/IOB-UT-NEXT/RedisMan.cs index c449f531..826a85f3 100644 --- a/IOB-UT-NEXT/RedisMan.cs +++ b/IOB-UT-NEXT/RedisMan.cs @@ -629,29 +629,6 @@ namespace IOB_UT_NEXT } return answ; } - /// - /// RIMUOVE un singolo valore (riga) dalla hash - /// - /// - /// - /// - public string redRemoveHashField(string hashKey, string hashField) - { - string answ = ""; - // cerco se ci sia valore in redis... - try - { - RedisKey chiave = hashKey; - RedisValue campo = hashField; - RedisValue valOut = cache.HashDelete(chiave, campo); - answ = valOut.ToString(); - } - catch (Exception exc) - { - Logging.Instance.Error($"redRemoveHashField{Environment.NewLine}{exc}"); - } - return answ; - } /// /// Nome della variabile HASH da utilizzare (dato CodModulo / Server / DB impiegato da @@ -752,6 +729,60 @@ namespace IOB_UT_NEXT return answ; } + /// + /// Conteggio elementi in QUEUE (FIFO) + /// + /// + /// + public long redQueueCount(RedisKey queueName) + { + return cache.ListLength(queueName); + } + + /// + /// Recupero valore in QUEUE (FIFO) + /// + /// + /// + public RedisValue redQueuePop(RedisKey queueName) + { + return cache.ListLeftPop(queueName); + } + + /// + /// Scrittura valore in QUEUE (FIFO) + /// + /// + /// + public void redQueuePush(RedisKey queueName, RedisValue value) + { + cache.ListRightPush(queueName, value); + } + + /// + /// RIMUOVE un singolo valore (riga) dalla hash + /// + /// + /// + /// + public string redRemoveHashField(string hashKey, string hashField) + { + string answ = ""; + // cerco se ci sia valore in redis... + try + { + RedisKey chiave = hashKey; + RedisValue campo = hashField; + RedisValue valOut = cache.HashDelete(chiave, campo); + answ = valOut.ToString(); + } + catch (Exception exc) + { + Logging.Instance.Error($"redRemoveHashField{Environment.NewLine}{exc}"); + } + return answ; + } + /// /// Salvataggio di una hash di valori /// @@ -930,6 +961,36 @@ namespace IOB_UT_NEXT return answ; } + /// + /// Conteggio elementi in QUEUE (LIFO) + /// + /// + /// + public long redStackCount(RedisKey queueName) + { + return cache.ListLength(queueName); + } + + /// + /// Recupero valore in STACK (LIFO) + /// + /// + /// + public RedisValue redStackPop(RedisKey stackName) + { + return cache.ListRightPop(stackName); + } + + /// + /// Scrittura valore in STACK (LIFO) + /// + /// + /// + public void redStackPush(RedisKey stackName, RedisValue value) + { + cache.ListRightPush(stackName, value); + } + /// /// Resetta (elimina) un contatore in Redis /// @@ -980,7 +1041,8 @@ namespace IOB_UT_NEXT } // invio notifica tramite il canale richiesto - messageDisp.Publish(notifyChannel, message); + RedisChannel pubNotifyChannel = new RedisChannel(notifyChannel, RedisChannel.PatternMode.Literal); + messageDisp.Publish(pubNotifyChannel, message); fatto = true; // restituisco! return fatto; diff --git a/IOB-UT-NEXT/app.config b/IOB-UT-NEXT/app.config index 1b1d33ee..15273954 100644 --- a/IOB-UT-NEXT/app.config +++ b/IOB-UT-NEXT/app.config @@ -3,29 +3,17 @@ - - + + - - - - - - + + - - - - - - - - @@ -34,6 +22,22 @@ + + + + + + + + + + + + + + + + diff --git a/IOB-UT-NEXT/baseUtils.cs b/IOB-UT-NEXT/baseUtils.cs index c1bab73f..9ad2a84e 100644 --- a/IOB-UT-NEXT/baseUtils.cs +++ b/IOB-UT-NEXT/baseUtils.cs @@ -22,6 +22,11 @@ namespace IOB_UT_NEXT /// public static DateTime dtVetoPing = DateTime.Now; + /// + /// Indicazione VETO accodamento INGRESSI/EVENTI sino alla data-ora indicata + /// + public static DateTime dtVetoQueueIN = DateTime.Now; + /// /// Indicazione VETO invio a server sino alla data-ora indicata /// diff --git a/IOB-UT-NEXT/packages.config b/IOB-UT-NEXT/packages.config index 81fe0a2c..f566da31 100644 --- a/IOB-UT-NEXT/packages.config +++ b/IOB-UT-NEXT/packages.config @@ -3,15 +3,15 @@ - - - - + + + + - + - - + + diff --git a/IOB-UT/app.config b/IOB-UT/app.config index 84887076..f3ed3d89 100644 --- a/IOB-UT/app.config +++ b/IOB-UT/app.config @@ -1,19 +1,5 @@  - - - - - - - - - - - - - - \ No newline at end of file diff --git a/IOB-WIN-NEXT/AdapterForm.cs b/IOB-WIN-NEXT/AdapterForm.cs index f579b1be..349db428 100644 --- a/IOB-WIN-NEXT/AdapterForm.cs +++ b/IOB-WIN-NEXT/AdapterForm.cs @@ -1576,6 +1576,7 @@ namespace IOB_WIN_NEXT optPar = optParRead, versIOB = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(), codIOB = fIni.ReadString("IOB", "IOB_NAME", CurrIOB), + EnableRedisQueue = bool.Parse(fIni.ReadString("IOB", "EnableRedisQueue", "false")), disableExeTask = bool.Parse(fIni.ReadString("IOB", "DIS_EXE_TASK", "false")), disableStateCh = bool.Parse(fIni.ReadString("IOB", "DIS_STATE_CH", "false")), filenameIOB = CurrIOB, diff --git a/IOB-WIN-NEXT/App.config b/IOB-WIN-NEXT/App.config index 9f401684..2b122620 100644 --- a/IOB-WIN-NEXT/App.config +++ b/IOB-WIN-NEXT/App.config @@ -111,15 +111,21 @@ - - + + + + + + + + - + @@ -130,12 +136,44 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + @@ -178,4 +216,4 @@ - \ No newline at end of file + diff --git a/IOB-WIN-NEXT/DATA/CONF/IMI_PAMA_392.ini b/IOB-WIN-NEXT/DATA/CONF/IMI_PAMA_392.ini index a37620f4..e24c4d98 100644 --- a/IOB-WIN-NEXT/DATA/CONF/IMI_PAMA_392.ini +++ b/IOB-WIN-NEXT/DATA/CONF/IMI_PAMA_392.ini @@ -73,6 +73,7 @@ SyncStatePwd=viadante16 SyncStateCTout= VetoReadSec=2 VetoSyncSec=10 +;FullPodlUrl=true ; clock base (da 10ms) timerIntMs=20 diff --git a/IOB-WIN-NEXT/DATA/CONF/IMI_SOITAAB_Z2342_01.ini b/IOB-WIN-NEXT/DATA/CONF/IMI_SOITAAB_Z2342_01.ini index b5b8266a..3c53fb69 100644 --- a/IOB-WIN-NEXT/DATA/CONF/IMI_SOITAAB_Z2342_01.ini +++ b/IOB-WIN-NEXT/DATA/CONF/IMI_SOITAAB_Z2342_01.ini @@ -77,6 +77,7 @@ SyncStatePwd=viadante16 SyncStateCTout= VetoReadSec=2 VetoSyncSec=10 +FullPodlUrl=true ; clock base (da 10ms) timerIntMs=20 diff --git a/IOB-WIN-NEXT/DATA/CONF/MAIN.ini b/IOB-WIN-NEXT/DATA/CONF/MAIN.ini index 0bb02ea1..bf64683c 100644 --- a/IOB-WIN-NEXT/DATA/CONF/MAIN.ini +++ b/IOB-WIN-NEXT/DATA/CONF/MAIN.ini @@ -57,6 +57,7 @@ CLI_INST=SteamWareSim ;STARTLIST=SIMUL_02 ;NB: mettere copy always ai file di conf x fare test... -STARTLIST=BAGLIETTO_CIMOLAI_01 +;STARTLIST=SIMUL_01 +STARTLIST=PING MAXCNC=10 \ No newline at end of file diff --git a/IOB-WIN-NEXT/DATA/CONF/PING.ini b/IOB-WIN-NEXT/DATA/CONF/PING.ini index 73cfa8b0..dcf81672 100644 --- a/IOB-WIN-NEXT/DATA/CONF/PING.ini +++ b/IOB-WIN-NEXT/DATA/CONF/PING.ini @@ -2,13 +2,16 @@ [IOB] CNCTYPE=PingWatchdog PING_MS_TIMEOUT=500 +;IOB_NAME=SIMUL_09 +IOB_NAME=SIMUL_01 [MACHINE] VENDOR=STEAMWARE MODEL=WATCHDOG [CNC] -IP=10.74.83.112 +IP=10.74.83.183 +;IP=10.74.82.253 PORT=0000 [SERVER] @@ -31,6 +34,7 @@ MAX_COUNTER_BLINK = 15 BLINK_FILT=0 [OPTPAR] +VETO_QUEUE_IN=15 AUTO_CHANGE_ODL=false POWEROFF_TIMEOUT_SEC=60 diff --git a/IOB-WIN-NEXT/DATA/CONF/SIMUL_01.ini b/IOB-WIN-NEXT/DATA/CONF/SIMUL_01.ini index 34da0ae4..1980a398 100644 --- a/IOB-WIN-NEXT/DATA/CONF/SIMUL_01.ini +++ b/IOB-WIN-NEXT/DATA/CONF/SIMUL_01.ini @@ -3,6 +3,7 @@ CNCTYPE=SIMULA PING_MS_TIMEOUT=500 MinDeltaSec=5 +EnableRedisQueue=true [MACHINE] VENDOR=STEAMWARE @@ -91,10 +92,12 @@ FTP_LOC_DIR=temp\csv FTP_REM_DIR= CSV_ADD_HEADER=true -; conf file import -FILE_IMPORT_FOLDER=c:\temp\import -FILE_IMPORT_TYPE=*.xlsx -FILE_ARCHIVE_FOLDER=c:\temp\import\archive - [BRANCH] -NAME=master \ No newline at end of file +NAME=master + +; Tags manuali +[TAGS] +Customer=Steamware +HostOS=WIN +HostName=IOB-WIN-SIMULA +HostAddr=10.74.82.76 diff --git a/IOB-WIN-NEXT/DATA/CONF/SIMUL_01.json b/IOB-WIN-NEXT/DATA/CONF/SIMUL_01.json index 06269024..e6057ae6 100644 --- a/IOB-WIN-NEXT/DATA/CONF/SIMUL_01.json +++ b/IOB-WIN-NEXT/DATA/CONF/SIMUL_01.json @@ -84,16 +84,21 @@ "maxVal": 1500 } }, - "fileDecod": { - "Product": 3, - "Variety": 9, - "Supplier": 8, - "ExtDoc": 2, - "DateRif": 14, - "QtyTot": 22, - "NumPack": 21, - "NumPed": 17, - "PackPed": 18, - "PesoPack": 20 + "optKVP": { + "hasRecipe": true, + "maxPodlQty": 530, + "useLocalRecipe": true, + "path-locBase": "C:\\MesData\\", + "path-00-Arch": "ArchivioRicette\\FIMAT", + "path-01-Temp": "01-Temp\\FIMAT", + "path-02-Sent": "02-Inviate\\FIMAT", + "path-03-Recv": "03-Ricevute\\FIMAT", + "path-04-remReq": "Y:\\", + "path-05-remExe": "C:\\MesData\\Remote\\Dosed", + "path-06-remRec": "R:\\", + "path-outReport": "C:\\MesData\\Report", + "path-confSetup": "C:\\MesData\\Setup\\setupConsumi.json", + "replace-": "{{PODL}}", + "replace-": "Kg{{Qty}} | {{Note}}" } } \ No newline at end of file diff --git a/IOB-WIN-NEXT/DATA/CONF/SIMUL_02.ini b/IOB-WIN-NEXT/DATA/CONF/SIMUL_02.ini index 8a671de6..b3048dce 100644 --- a/IOB-WIN-NEXT/DATA/CONF/SIMUL_02.ini +++ b/IOB-WIN-NEXT/DATA/CONF/SIMUL_02.ini @@ -3,6 +3,7 @@ CNCTYPE=SIMULA PING_MS_TIMEOUT=500 MinDeltaSec=5 +EnableRedisQueue=true [MACHINE] VENDOR=STEAMWARE @@ -80,6 +81,7 @@ TC_MAX_INCR=5 MAX_PZ_INCR_PERC=1000 ; conf parametri memoria READ/WRITE PARAM_CONF=SIMUL_02.json + ;conf test FTP FTP_SERVER=ftp.steamware.net FTP_USER=testftpuser @@ -90,4 +92,11 @@ FTP_LOC_DIR=temp\csv FTP_REM_DIR= [BRANCH] -NAME=master \ No newline at end of file +NAME=master + +; Tags manuali +[TAGS] +Customer=Steamware +HostOS=WIN +HostName=IOB-WIN-SIMULA +HostAddr=10.74.82.76 diff --git a/IOB-WIN-NEXT/DATA/CONF/SIMUL_02.json b/IOB-WIN-NEXT/DATA/CONF/SIMUL_02.json index 90281f1d..dbb74d4d 100644 --- a/IOB-WIN-NEXT/DATA/CONF/SIMUL_02.json +++ b/IOB-WIN-NEXT/DATA/CONF/SIMUL_02.json @@ -83,35 +83,5 @@ "minVal": 0, "maxVal": 1500 } - }, - "fileDecod": { - "Product": 2, - "Variety": 3, - "Supplier": 4, - "ExtDoc": 0, - "DateRif": 1, - "QtyTot": 15, - "NumPack": 14, - "NumPed": 11, - "PackPed": 12, - "PesoPack": 13 - }, - "optKVP": { - "hasRecipe": true, - "maxPodlQty": 530, - "useLocalRecipe": true, - "path-locBase": "C:\\MesData\\Local", - "path-remBase": "C:\\MesData\\Remote", - "path-00-Arch": "ArchivioRicette\\FIMAT", - "path-01-Temp": "01-Temp\\FIMAT", - "path-02-Sent": "02-Inviate\\FIMAT", - "path-03-Recv": "03-Ricevute\\FIMAT", - "path-04-remReq": "C:\\MesData\\Remote\\Queue2", - "path-05-remExe": "C:\\MesData\\Remote\\Dosed", - "path-06-remRec": "C:\\MesData\\Remote\\Recipes", - "path-outReport": "C:\\MesData\\Report", - "path-confSetup": "C:\\MesData\\Setup\\setupConsumi.json", - "replace-": "{{PODL}}", - "replace-": "Kg{{Qty}} | {{Note}}" } } \ No newline at end of file diff --git a/IOB-WIN-NEXT/DATA/CONF/SIMUL_03.ini b/IOB-WIN-NEXT/DATA/CONF/SIMUL_03.ini index 0765968a..71b21636 100644 --- a/IOB-WIN-NEXT/DATA/CONF/SIMUL_03.ini +++ b/IOB-WIN-NEXT/DATA/CONF/SIMUL_03.ini @@ -3,6 +3,7 @@ CNCTYPE=SIMULA PING_MS_TIMEOUT=500 MinDeltaSec=5 +EnableRedisQueue=true [MACHINE] VENDOR=STEAMWARE @@ -34,7 +35,7 @@ BLINK_FILT=0 [OPTPAR] AUTO_CHANGE_ODL=true -AUTO_SNAPSHOT_DOSSIER=true +AUTO_SNAPSHOT_DOSSIER=false CHANGE_ODL_HOURS=24 CHANGE_ODL_IDLE_MIN=0 ;PZCOUNT_MODE=STD.[PAR/MEM].info|BIT.indice @@ -92,4 +93,11 @@ FTP_REM_DIR= [BRANCH] -NAME=master \ No newline at end of file +NAME=master + +; Tags manuali +[TAGS] +Customer=Steamware +HostOS=WIN +HostName=IOB-WIN-SIMULA +HostAddr=10.74.82.76 diff --git a/IOB-WIN-NEXT/DATA/CONF/SIMUL_04.ini b/IOB-WIN-NEXT/DATA/CONF/SIMUL_04.ini index 5d7221d0..ef546d14 100644 --- a/IOB-WIN-NEXT/DATA/CONF/SIMUL_04.ini +++ b/IOB-WIN-NEXT/DATA/CONF/SIMUL_04.ini @@ -3,6 +3,7 @@ CNCTYPE=SIMULA PING_MS_TIMEOUT=500 MinDeltaSec=5 +EnableRedisQueue=true [MACHINE] VENDOR=STEAMWARE @@ -33,7 +34,7 @@ BLINK_FILT=0 [OPTPAR] AUTO_CHANGE_ODL=true -AUTO_SNAPSHOT_DOSSIER=true +AUTO_SNAPSHOT_DOSSIER=false CHANGE_ODL_HOURS=24 CHANGE_ODL_IDLE_MIN=0 ;PZCOUNT_MODE=STD.[PAR/MEM].info|BIT.indice @@ -90,4 +91,11 @@ FTP_LOC_DIR=temp\csv FTP_REM_DIR= [BRANCH] -NAME=master \ No newline at end of file +NAME=master + +; Tags manuali +[TAGS] +Customer=Steamware +HostOS=WIN +HostName=IOB-WIN-SIMULA +HostAddr=10.74.82.76 diff --git a/IOB-WIN-NEXT/DATA/CONF/SIMUL_05.ini b/IOB-WIN-NEXT/DATA/CONF/SIMUL_05.ini index 93377cfc..c56a41e7 100644 --- a/IOB-WIN-NEXT/DATA/CONF/SIMUL_05.ini +++ b/IOB-WIN-NEXT/DATA/CONF/SIMUL_05.ini @@ -3,6 +3,7 @@ CNCTYPE=SIMULA PING_MS_TIMEOUT=500 MinDeltaSec=5 +EnableRedisQueue=true [MACHINE] VENDOR=STEAMWARE @@ -33,7 +34,7 @@ BLINK_FILT=0 [OPTPAR] AUTO_CHANGE_ODL=true -AUTO_SNAPSHOT_DOSSIER=true +AUTO_SNAPSHOT_DOSSIER=false CHANGE_ODL_HOURS=24 CHANGE_ODL_IDLE_MIN=0 ;PZCOUNT_MODE=STD.[PAR/MEM].info|BIT.indice @@ -90,4 +91,11 @@ FTP_LOC_DIR=temp\csv FTP_REM_DIR= [BRANCH] -NAME=master \ No newline at end of file +NAME=master + +; Tags manuali +[TAGS] +Customer=Steamware +HostOS=WIN +HostName=IOB-WIN-SIMULA +HostAddr=10.74.82.76 diff --git a/IOB-WIN-NEXT/DATA/CONF/SIMUL_06.ini b/IOB-WIN-NEXT/DATA/CONF/SIMUL_06.ini index 20df0ebb..20fdb9ba 100644 --- a/IOB-WIN-NEXT/DATA/CONF/SIMUL_06.ini +++ b/IOB-WIN-NEXT/DATA/CONF/SIMUL_06.ini @@ -3,6 +3,7 @@ CNCTYPE=SIMULA PING_MS_TIMEOUT=500 MinDeltaSec=5 +EnableRedisQueue=true [MACHINE] VENDOR=STEAMWARE @@ -33,7 +34,7 @@ BLINK_FILT=0 [OPTPAR] AUTO_CHANGE_ODL=true -AUTO_SNAPSHOT_DOSSIER=true +AUTO_SNAPSHOT_DOSSIER=false CHANGE_ODL_HOURS=24 CHANGE_ODL_IDLE_MIN=0 ;PZCOUNT_MODE=STD.[PAR/MEM].info|BIT.indice @@ -90,4 +91,11 @@ FTP_LOC_DIR=temp\csv FTP_REM_DIR= [BRANCH] -NAME=master \ No newline at end of file +NAME=master + +; Tags manuali +[TAGS] +Customer=Steamware +HostOS=WIN +HostName=IOB-WIN-SIMULA +HostAddr=10.74.82.76 diff --git a/IOB-WIN-NEXT/DATA/CONF/SIMUL_07.ini b/IOB-WIN-NEXT/DATA/CONF/SIMUL_07.ini index fd7a8f3b..5b79c55a 100644 --- a/IOB-WIN-NEXT/DATA/CONF/SIMUL_07.ini +++ b/IOB-WIN-NEXT/DATA/CONF/SIMUL_07.ini @@ -3,6 +3,7 @@ CNCTYPE=SIMULA PING_MS_TIMEOUT=500 MinDeltaSec=5 +EnableRedisQueue=true [MACHINE] VENDOR=STEAMWARE @@ -33,7 +34,7 @@ BLINK_FILT=0 [OPTPAR] AUTO_CHANGE_ODL=true -AUTO_SNAPSHOT_DOSSIER=true +AUTO_SNAPSHOT_DOSSIER=false CHANGE_ODL_HOURS=24 CHANGE_ODL_IDLE_MIN=0 ;PZCOUNT_MODE=STD.[PAR/MEM].info|BIT.indice @@ -91,4 +92,11 @@ FTP_REM_DIR= [BRANCH] -NAME=master \ No newline at end of file +NAME=master + +; Tags manuali +[TAGS] +Customer=Steamware +HostOS=WIN +HostName=IOB-WIN-SIMULA +HostAddr=10.74.82.76 diff --git a/IOB-WIN-NEXT/DATA/CONF/SIMUL_08.ini b/IOB-WIN-NEXT/DATA/CONF/SIMUL_08.ini index d5a25c56..0903fd79 100644 --- a/IOB-WIN-NEXT/DATA/CONF/SIMUL_08.ini +++ b/IOB-WIN-NEXT/DATA/CONF/SIMUL_08.ini @@ -3,6 +3,7 @@ CNCTYPE=SIMULA PING_MS_TIMEOUT=500 MinDeltaSec=5 +EnableRedisQueue=true [MACHINE] VENDOR=STEAMWARE @@ -33,7 +34,7 @@ BLINK_FILT=0 [OPTPAR] AUTO_CHANGE_ODL=false -AUTO_SNAPSHOT_DOSSIER=true +AUTO_SNAPSHOT_DOSSIER=false CHANGE_ODL_HOURS=48 CHANGE_ODL_IDLE_MIN=10 ;PZCOUNT_MODE=STD.[PAR/MEM].info|BIT.indice @@ -90,4 +91,11 @@ FTP_LOC_DIR=temp\csv FTP_REM_DIR= [BRANCH] -NAME=master \ No newline at end of file +NAME=master + +; Tags manuali +[TAGS] +Customer=Steamware +HostOS=WIN +HostName=IOB-WIN-SIMULA +HostAddr=10.74.82.76 diff --git a/IOB-WIN-NEXT/DATA/CONF/SIM_DP_01.ini b/IOB-WIN-NEXT/DATA/CONF/SIM_DP_01.ini index 4b87c12f..743cc9cf 100644 --- a/IOB-WIN-NEXT/DATA/CONF/SIM_DP_01.ini +++ b/IOB-WIN-NEXT/DATA/CONF/SIM_DP_01.ini @@ -3,6 +3,7 @@ CNCTYPE=SIMULA PING_MS_TIMEOUT=500 MinDeltaSec=5 +EnableRedisQueue=true [MACHINE] VENDOR=STEAMWARE @@ -50,7 +51,7 @@ PER_BASE=10500 SIM_PZCNT=10|3 SIM_ALARM=1000|20 SIM_MANU=50|6 -; 1 = indica che la macchina è multi --> allo scadere del contapezzo gestisce ANCHE il giro tavola sui bit relativi +; 1 = indica che la macchina è multi --> allo scadere del contapezzo gestisce ANCHE il giro tavola sui bit relativi IS_MULTI=1 ; indica gestione e simulazione bit 5 --> slow/emergenza SIM_SLOW=3500|20 @@ -58,7 +59,7 @@ SIM_SLOW=3500|20 SIM_WUCD=8000|20 ; indica gestione e simulazione bit 7 --> emergenza SIM_EMRG=4000|10 -; indica simulazione delle funzionalità power ON/ OFF +; indica simulazione delle funzionalità power ON/ OFF SIM_POW_ON_OFF=true T_ON=6 T_OFF=22 @@ -74,5 +75,22 @@ SIM_MATR_OPR=1 ; conf parametri memoria READ/WRITE PARAM_CONF=SIM_DP_01.json +;conf test FTP +FTP_SERVER=ftp.steamware.net +FTP_USER=testftpuser +FTP_PWD=we4reFromB3rghem! +FTP_CERT= +FTP_SKIP=TRUE +FTP_LOC_DIR=temp\csv +FTP_REM_DIR= +CSV_ADD_HEADER=true + [BRANCH] -NAME=master \ No newline at end of file +NAME=master + +; Tags manuali +[TAGS] +Customer=Steamware +HostOS=WIN +HostName=IOB-WIN-SIMULA +HostAddr=10.74.82.76 diff --git a/IOB-WIN-NEXT/DATA/CONF/SIM_DP_01.json b/IOB-WIN-NEXT/DATA/CONF/SIM_DP_01.json index 482f00ef..c3f23224 100644 --- a/IOB-WIN-NEXT/DATA/CONF/SIM_DP_01.json +++ b/IOB-WIN-NEXT/DATA/CONF/SIM_DP_01.json @@ -1,99 +1,87 @@ { - "mMapWrite": { - "setArt": { - "name": "setArt", - "description": "Articolo", - "memAddr": "DB150.DBB12", - "tipoMem": "String", - "index": 12, - "size": 20 + "mMapWrite": { + "setArt": { + "name": "setArt", + "description": "Articolo", + "memAddr": "DB150.DBB12", + "tipoMem": "String", + "index": 12, + "size": 20 + }, + "setComm": { + "name": "setComm", + "description": "Commessa", + "memAddr": "DB150.DBB32", + "tipoMem": "String", + "index": 32, + "size": 20 + }, + "setPzComm": { + "name": "setPzComm", + "description": "Qta Richiesta", + "memAddr": "DB150.DBB8", + "tipoMem": "Int", + "index": 8, + "size": 4 + }, + "forceSetPzCount": { + "name": "forceSetPzCount", + "description": "Imposta Qta", + "memAddr": "DB150.DBB8", + "tipoMem": "Int", + "index": 8, + "size": 4 + } }, - "setComm": { - "name": "setComm", - "description": "Commessa", - "memAddr": "DB150.DBB32", - "tipoMem": "String", - "index": 32, - "size": 20 - }, - "setPzComm": { - "name": "setPzComm", - "description": "Qta Richiesta", - "memAddr": "DB150.DBB8", - "tipoMem": "Int", - "index": 8, - "size": 4 - }, - "forceSetPzCount": { - "name": "forceSetPzCount", - "description": "Imposta Qta", - "memAddr": "DB150.DBB8", - "tipoMem": "Int", - "index": 8, - "size": 4 + "mMapRead": { + "TEMP_01": { + "name": "TEMP_01", + "description": "Temperatura 01", + "tipoMem": "Real", + "minVal": 18, + "maxVal": 24 + }, + "POWER_01": { + "name": "POWER_01", + "description": "Potenza impianto", + "tipoMem": "Int", + "minVal": 40, + "maxVal": 80 + }, + "FEED_OVER": { + "name": "FEED_OVER", + "description": "FEED override", + "tipoMem": "Int", + "minVal": 0, + "maxVal": 100 + }, + "RAPID_OVER": { + "name": "RAPID_OVER", + "description": "RAPID override", + "tipoMem": "Int", + "minVal": 50, + "maxVal": 120 + }, + "POS_X": { + "name": "POS_X", + "description": "Asse X", + "tipoMem": "Int", + "minVal": -2000, + "maxVal": 2000 + }, + "POS_Y": { + "name": "POS_Y", + "description": "Asse Y", + "tipoMem": "Int", + "minVal": 0, + "maxVal": 2000 + }, + "POS_Z": { + "name": "POS_Z", + "description": "Asse Z", + "tipoMem": "Int", + "minVal": 0, + "maxVal": 1500 + } } - }, - "mMapRead": { - "TEMP_01": { - "name": "TEMP_01", - "description": "Temperatura 01", - "tipoMem": "Real", - "minVal": 18, - "maxVal": 24 - }, - "POWER_01": { - "name": "POWER_01", - "description": "Potenza impianto", - "tipoMem": "Int", - "minVal": 40, - "maxVal": 80 - }, - "FEED_OVER": { - "name": "FEED_OVER", - "description": "FEED override", - "tipoMem": "Int", - "minVal": 0, - "maxVal": 100 - }, - "RAPID_OVER": { - "name": "RAPID_OVER", - "description": "RAPID override", - "tipoMem": "Int", - "minVal": 50, - "maxVal": 120 - }, - "POS_X": { - "name": "POS_X", - "description": "Asse X", - "tipoMem": "Int", - "minVal": -2000, - "maxVal": 2000 - }, - "POS_Y": { - "name": "POS_Y", - "description": "Asse Y", - "tipoMem": "Int", - "minVal": 0, - "maxVal": 2000 - }, - "POS_Z": { - "name": "POS_Z", - "description": "Asse Z", - "tipoMem": "Int", - "minVal": 0, - "maxVal": 1500 - } - }, - "fileDecod": { - "Product": 2, - "Variety": 3, - "Supplier": 4, - "ExtDoc": 0, - "DateRif": 1, - "QtyTot": 15, - "NumPack": 14, - "NumPed": 11, - "PackPed": 12, - "PesoPack": 13 - } } \ No newline at end of file diff --git a/IOB-WIN-NEXT/DATA/CONF/SIM_DP_02.ini b/IOB-WIN-NEXT/DATA/CONF/SIM_DP_02.ini index 265e84b4..de87997b 100644 --- a/IOB-WIN-NEXT/DATA/CONF/SIM_DP_02.ini +++ b/IOB-WIN-NEXT/DATA/CONF/SIM_DP_02.ini @@ -3,6 +3,7 @@ CNCTYPE=SIMULA PING_MS_TIMEOUT=500 MinDeltaSec=5 +EnableRedisQueue=true [MACHINE] VENDOR=STEAMWARE @@ -50,7 +51,7 @@ PER_BASE=10400 SIM_PZCNT=10|2 SIM_ALARM=1000|20 SIM_MANU=50|6 -; 1 = indica che la macchina è multi --> allo scadere del contapezzo gestisce ANCHE il giro tavola sui bit relativi +; 1 = indica che la macchina � multi --> allo scadere del contapezzo gestisce ANCHE il giro tavola sui bit relativi IS_MULTI=1 ; indica gestione e simulazione bit 5 --> slow/emergenza SIM_SLOW=6500|20 @@ -58,7 +59,7 @@ SIM_SLOW=6500|20 SIM_WUCD=8000|20 ; indica gestione e simulazione bit 7 --> emergenza SIM_EMRG=4000|10 -; indica simulazione delle funzionalità power ON/ OFF +; indica simulazione delle funzionalit� power ON/ OFF SIM_POW_ON_OFF=false T_ON=6 T_OFF=22 @@ -72,7 +73,24 @@ SIM_DICH=262|1 SIM_MATR_OPR=1 ; conf parametri memoria READ/WRITE -PARAM_CONF=SIM_DP_01.json +PARAM_CONF=SIM_DP_02.json + +;conf test FTP +FTP_SERVER=ftp.steamware.net +FTP_USER=testftpuser +FTP_PWD=we4reFromB3rghem! +FTP_CERT= +FTP_SKIP=TRUE +FTP_LOC_DIR=temp\csv +FTP_REM_DIR= +CSV_ADD_HEADER=true [BRANCH] -NAME=master \ No newline at end of file +NAME=master + +; Tags manuali +[TAGS] +Customer=Steamware +HostOS=WIN +HostName=IOB-WIN-SIMULA +HostAddr=10.74.82.76 diff --git a/IOB-WIN-NEXT/DATA/CONF/SIM_DP_02.json b/IOB-WIN-NEXT/DATA/CONF/SIM_DP_02.json index 482f00ef..c3f23224 100644 --- a/IOB-WIN-NEXT/DATA/CONF/SIM_DP_02.json +++ b/IOB-WIN-NEXT/DATA/CONF/SIM_DP_02.json @@ -1,99 +1,87 @@ { - "mMapWrite": { - "setArt": { - "name": "setArt", - "description": "Articolo", - "memAddr": "DB150.DBB12", - "tipoMem": "String", - "index": 12, - "size": 20 + "mMapWrite": { + "setArt": { + "name": "setArt", + "description": "Articolo", + "memAddr": "DB150.DBB12", + "tipoMem": "String", + "index": 12, + "size": 20 + }, + "setComm": { + "name": "setComm", + "description": "Commessa", + "memAddr": "DB150.DBB32", + "tipoMem": "String", + "index": 32, + "size": 20 + }, + "setPzComm": { + "name": "setPzComm", + "description": "Qta Richiesta", + "memAddr": "DB150.DBB8", + "tipoMem": "Int", + "index": 8, + "size": 4 + }, + "forceSetPzCount": { + "name": "forceSetPzCount", + "description": "Imposta Qta", + "memAddr": "DB150.DBB8", + "tipoMem": "Int", + "index": 8, + "size": 4 + } }, - "setComm": { - "name": "setComm", - "description": "Commessa", - "memAddr": "DB150.DBB32", - "tipoMem": "String", - "index": 32, - "size": 20 - }, - "setPzComm": { - "name": "setPzComm", - "description": "Qta Richiesta", - "memAddr": "DB150.DBB8", - "tipoMem": "Int", - "index": 8, - "size": 4 - }, - "forceSetPzCount": { - "name": "forceSetPzCount", - "description": "Imposta Qta", - "memAddr": "DB150.DBB8", - "tipoMem": "Int", - "index": 8, - "size": 4 + "mMapRead": { + "TEMP_01": { + "name": "TEMP_01", + "description": "Temperatura 01", + "tipoMem": "Real", + "minVal": 18, + "maxVal": 24 + }, + "POWER_01": { + "name": "POWER_01", + "description": "Potenza impianto", + "tipoMem": "Int", + "minVal": 40, + "maxVal": 80 + }, + "FEED_OVER": { + "name": "FEED_OVER", + "description": "FEED override", + "tipoMem": "Int", + "minVal": 0, + "maxVal": 100 + }, + "RAPID_OVER": { + "name": "RAPID_OVER", + "description": "RAPID override", + "tipoMem": "Int", + "minVal": 50, + "maxVal": 120 + }, + "POS_X": { + "name": "POS_X", + "description": "Asse X", + "tipoMem": "Int", + "minVal": -2000, + "maxVal": 2000 + }, + "POS_Y": { + "name": "POS_Y", + "description": "Asse Y", + "tipoMem": "Int", + "minVal": 0, + "maxVal": 2000 + }, + "POS_Z": { + "name": "POS_Z", + "description": "Asse Z", + "tipoMem": "Int", + "minVal": 0, + "maxVal": 1500 + } } - }, - "mMapRead": { - "TEMP_01": { - "name": "TEMP_01", - "description": "Temperatura 01", - "tipoMem": "Real", - "minVal": 18, - "maxVal": 24 - }, - "POWER_01": { - "name": "POWER_01", - "description": "Potenza impianto", - "tipoMem": "Int", - "minVal": 40, - "maxVal": 80 - }, - "FEED_OVER": { - "name": "FEED_OVER", - "description": "FEED override", - "tipoMem": "Int", - "minVal": 0, - "maxVal": 100 - }, - "RAPID_OVER": { - "name": "RAPID_OVER", - "description": "RAPID override", - "tipoMem": "Int", - "minVal": 50, - "maxVal": 120 - }, - "POS_X": { - "name": "POS_X", - "description": "Asse X", - "tipoMem": "Int", - "minVal": -2000, - "maxVal": 2000 - }, - "POS_Y": { - "name": "POS_Y", - "description": "Asse Y", - "tipoMem": "Int", - "minVal": 0, - "maxVal": 2000 - }, - "POS_Z": { - "name": "POS_Z", - "description": "Asse Z", - "tipoMem": "Int", - "minVal": 0, - "maxVal": 1500 - } - }, - "fileDecod": { - "Product": 2, - "Variety": 3, - "Supplier": 4, - "ExtDoc": 0, - "DateRif": 1, - "QtyTot": 15, - "NumPack": 14, - "NumPed": 11, - "PackPed": 12, - "PesoPack": 13 - } } \ No newline at end of file diff --git a/IOB-WIN-NEXT/DATA/CONF/SIM_PIZ03.ini b/IOB-WIN-NEXT/DATA/CONF/SIM_PIZ03.ini index 5770f716..929fef01 100644 --- a/IOB-WIN-NEXT/DATA/CONF/SIM_PIZ03.ini +++ b/IOB-WIN-NEXT/DATA/CONF/SIM_PIZ03.ini @@ -72,4 +72,11 @@ MAX_PZ_INCR_PERC=1000 PARAM_CONF=SIM_PIZ00.json [BRANCH] -NAME=master \ No newline at end of file +NAME=master + +; Tags manuali +[TAGS] +Customer=Steamware +HostOS=WIN +HostName=IOB-WIN-SIMULA +HostAddr=10.74.82.76 diff --git a/IOB-WIN-NEXT/DATA/CONF/SIM_PIZ04.ini b/IOB-WIN-NEXT/DATA/CONF/SIM_PIZ04.ini index 5770f716..929fef01 100644 --- a/IOB-WIN-NEXT/DATA/CONF/SIM_PIZ04.ini +++ b/IOB-WIN-NEXT/DATA/CONF/SIM_PIZ04.ini @@ -72,4 +72,11 @@ MAX_PZ_INCR_PERC=1000 PARAM_CONF=SIM_PIZ00.json [BRANCH] -NAME=master \ No newline at end of file +NAME=master + +; Tags manuali +[TAGS] +Customer=Steamware +HostOS=WIN +HostName=IOB-WIN-SIMULA +HostAddr=10.74.82.76 diff --git a/IOB-WIN-NEXT/DATA/CONF/SIM_PIZ05.ini b/IOB-WIN-NEXT/DATA/CONF/SIM_PIZ05.ini index 5770f716..929fef01 100644 --- a/IOB-WIN-NEXT/DATA/CONF/SIM_PIZ05.ini +++ b/IOB-WIN-NEXT/DATA/CONF/SIM_PIZ05.ini @@ -72,4 +72,11 @@ MAX_PZ_INCR_PERC=1000 PARAM_CONF=SIM_PIZ00.json [BRANCH] -NAME=master \ No newline at end of file +NAME=master + +; Tags manuali +[TAGS] +Customer=Steamware +HostOS=WIN +HostName=IOB-WIN-SIMULA +HostAddr=10.74.82.76 diff --git a/IOB-WIN-NEXT/DATA/CONF/SIM_PIZ08.ini b/IOB-WIN-NEXT/DATA/CONF/SIM_PIZ08.ini index 5770f716..929fef01 100644 --- a/IOB-WIN-NEXT/DATA/CONF/SIM_PIZ08.ini +++ b/IOB-WIN-NEXT/DATA/CONF/SIM_PIZ08.ini @@ -72,4 +72,11 @@ MAX_PZ_INCR_PERC=1000 PARAM_CONF=SIM_PIZ00.json [BRANCH] -NAME=master \ No newline at end of file +NAME=master + +; Tags manuali +[TAGS] +Customer=Steamware +HostOS=WIN +HostName=IOB-WIN-SIMULA +HostAddr=10.74.82.76 diff --git a/IOB-WIN-NEXT/DATA/CONF/STEL_200.json b/IOB-WIN-NEXT/DATA/CONF/STEL_200.json index ed501c75..7e751010 100644 --- a/IOB-WIN-NEXT/DATA/CONF/STEL_200.json +++ b/IOB-WIN-NEXT/DATA/CONF/STEL_200.json @@ -1,153 +1,168 @@ { - "BrowseFullVal": "ns=4;i=5001", - "BrowseNSIndex": 4, - "BrowseValue": 5001, - "keyPartCount": "tomes_17_partial_prod", - "keyPartReq": "tomach_6_quantity", - "keyPartId": "", - "keyProgName": "", - "keyRunMode": "", - "pingAsPowerOn": false, - "condWork": [{ - "keyName": "tomes_5_autom", - "targetValue": "True" - }], - "condPowerOn": { - "checkMode": "AND", - "checkList": [{ - "keyName": "tomes_2_mach_on", - "targetValue": "True" - }] - }, - "condReady": { - "checkMode": "AND", - "checkList": [] - }, - "condManual": { - "checkMode": "AND", - "checkList": [{ - "keyName": "tomes_6_manual", - "targetValue": "True" - }] - }, - "condEStop": { - "checkMode": "AND", - "checkList": [] - }, - "condError": { - "checkMode": "AND", - "checkList": [{ - "keyName": "tomes_7_alarm", - "targetValue": "True" - }] - }, - "condCountEnabled": { - "checkMode": "AND", - "checkList": [] - }, - "condWarmUpCoolDown": { - "checkMode": "OR", - "checkList": [] - }, - "condWarning": { - "checkMode": "AND", - "checkList": [{ - "keyName": "tomes_8_warning", - "targetValue": "True" - }] - }, - "condSetup": { - "checkMode": "AND", - "checkList": [{ - "keyName": "tomes_3_setup", - "targetValue": "True" - }] - }, - "fluxLogVeto": [ - "tomes_1_Watchdog" - ], - "itemTranslation": { - "avail": "Machine Available", - "rstat": "Execution Mode", - "mode": "Controller Mode", - "ncprog": "Program Name", - "tomes_13_good_prod": "Pezzi Prodotta", - "tomach_6_quantity": "Qta Richiesta", - "fdovrd": "PATH FEED OVERRIDE", - "rovrd": "PATH RAPID OVERRIDE" - }, - "paramsEndThresh": { - "InvDDone": 50 - }, - "mMapWrite": { - "setPzComm": { - "name": "setPzComm", - "description": "Qty", - "tipoMem": "Int", - "memAddr": "ns=4;s=tomach_6_quantity", - "index": 0, - "size": 4 - }, - "setComm": { - "name": "setComm", - "description": "Commessa", - "tipoMem": "String", - "memAddr": "ns=4;s=tomach_4_prod_order", - "index": 0, - "size": 24 - }, - "setArt": { - "name": "setArt", - "description": "Articolo", - "tipoMem": "String", - "memAddr": "ns=4;s=tomach_3_code_die", - "index": 0, - "size": 24 - } - }, - "subscribedItems": [ - "ns=4;s=tomes_1_Watchdog", - "ns=4;s=tomes_2_mach_on", - "ns=4;s=tomes_3_setup", - "ns=4;s=tomes_4_impulse", - "ns=4;s=tomes_5_autom", - "ns=4;s=tomes_6_manual", - "ns=4;s=tomes_7_alarm", - "ns=4;s=tomes_8_warning", - "ns=4;s=tomes_10_cycle_life", - "ns=4;s=tomes_11_ack_new_order", - "ns=4;s=tomes_13_good_prod", - "ns=4;s=tomes_14_bad_prod_calipso", - "ns=4;s=tomes_15_bad_prod_startup", - "ns=4;s=tomes_16_bad_prod_stop", - "ns=4;s=tomes_17_partial_prod", - "ns=4;s=tomes_18_total_prod", - "ns=4;s=tomes_20_code_die", - "ns=4;s=tomes_21_order", - "ns=4;s=tomach_1_watchdog", - "ns=4;s=tomach_2_new_prod", - "ns=4;s=tomach_3_code_die", - "ns=4;s=tomach_4_prod_order", - "ns=4;s=tomach_6_quantity" - ], - "WatchDog": { - "IsEnabled": true, - "MemConfRead": "ns=4;s=tomes_1_Watchdog", - "MemConfWrite": "ns=4;s=tomach_1_watchdog", - "MaxVal": 9999 - }, - "SetupConf": { - "SetupMode": "MECOLPRESS", - "EnableAdvSetup": false, - "checkParList": { - "tomach_3_code_die": "tomes_20_code_die", - "tomach_4_prod_order": "tomes_21_order" - }, - "writeParAction": [{ - "TargetParam": "ns=4;s=tomach_2_new_prod", - "TargetValEqual": 0, - "TargetValNotEqual": 1, - "DisablePzCountNotEqual": true - }] + "BrowseFullVal": "ns=4;i=5001", + "BrowseNSIndex": 4, + "BrowseValue": 5001, + "keyPartCount": "tomes_17_partial_prod", + "keyPartReq": "tomach_6_quantity", + "keyPartId": "", + "keyProgName": "", + "keyRunMode": "", + "pingAsPowerOn": false, + "condWork": [ + { + "keyName": "tomes_5_autom", + "targetValue": "True" } + ], + "condPowerOn": { + "checkMode": "AND", + "checkList": [ + { + "keyName": "tomes_2_mach_on", + "targetValue": "True" + } + ] + }, + "condReady": { + "checkMode": "AND", + "checkList": [] + }, + "condManual": { + "checkMode": "AND", + "checkList": [ + { + "keyName": "tomes_6_manual", + "targetValue": "True" + } + ] + }, + "condEStop": { + "checkMode": "AND", + "checkList": [] + }, + "condError": { + "checkMode": "AND", + "checkList": [ + { + "keyName": "tomes_7_alarm", + "targetValue": "True" + } + ] + }, + "condCountEnabled": { + "checkMode": "AND", + "checkList": [] + }, + "condWarmUpCoolDown": { + "checkMode": "OR", + "checkList": [], + "negateValue": true + }, + "condWarning": { + "checkMode": "AND", + "checkList": [ + { + "keyName": "tomes_8_warning", + "targetValue": "True" + } + ] + }, + "condSetup": { + "checkMode": "AND", + "checkList": [ + { + "keyName": "tomes_3_setup", + "targetValue": "True" + } + ] + }, + "fluxLogVeto": [ + "tomes_1_Watchdog" + ], + "itemTranslation": { + "avail": "Machine Available", + "rstat": "Execution Mode", + "mode": "Controller Mode", + "ncprog": "Program Name", + "tomes_13_good_prod": "Pezzi Prodotta", + "tomach_6_quantity": "Qta Richiesta", + "fdovrd": "PATH FEED OVERRIDE", + "rovrd": "PATH RAPID OVERRIDE" + }, + "paramsEndThresh": { + "InvDDone": 50 + }, + "mMapWrite": { + "setPzComm": { + "name": "setPzComm", + "description": "Qty", + "tipoMem": "Int", + "memAddr": "ns=4;s=tomach_6_quantity", + "index": 0, + "size": 4 + }, + "setComm": { + "name": "setComm", + "description": "Commessa", + "tipoMem": "String", + "memAddr": "ns=4;s=tomach_4_prod_order", + "index": 0, + "size": 24 + }, + "setArt": { + "name": "setArt", + "description": "Articolo", + "tipoMem": "String", + "memAddr": "ns=4;s=tomach_3_code_die", + "index": 0, + "size": 24 + } + }, + "subscribedItems": [ + "ns=4;s=tomes_1_Watchdog", + "ns=4;s=tomes_2_mach_on", + "ns=4;s=tomes_3_setup", + "ns=4;s=tomes_4_impulse", + "ns=4;s=tomes_5_autom", + "ns=4;s=tomes_6_manual", + "ns=4;s=tomes_7_alarm", + "ns=4;s=tomes_8_warning", + "ns=4;s=tomes_10_cycle_life", + "ns=4;s=tomes_11_ack_new_order", + "ns=4;s=tomes_13_good_prod", + "ns=4;s=tomes_14_bad_prod_calipso", + "ns=4;s=tomes_15_bad_prod_startup", + "ns=4;s=tomes_16_bad_prod_stop", + "ns=4;s=tomes_17_partial_prod", + "ns=4;s=tomes_18_total_prod", + "ns=4;s=tomes_20_code_die", + "ns=4;s=tomes_21_order", + "ns=4;s=tomach_1_watchdog", + "ns=4;s=tomach_2_new_prod", + "ns=4;s=tomach_3_code_die", + "ns=4;s=tomach_4_prod_order", + "ns=4;s=tomach_6_quantity" + ], + "WatchDog": { + "IsEnabled": true, + "MemConfRead": "ns=4;s=tomes_1_Watchdog", + "MemConfWrite": "ns=4;s=tomach_1_watchdog", + "MaxVal": 9999 + }, + "SetupConf": { + "SetupMode": "MECOLPRESS", + "EnableAdvSetup": false, + "checkParList": { + "tomach_3_code_die": "tomes_20_code_die", + "tomach_4_prod_order": "tomes_21_order" + }, + "writeParAction": [ + { + "TargetParam": "ns=4;s=tomach_2_new_prod", + "TargetValEqual": 0, + "TargetValNotEqual": 1, + "DisablePzCountNotEqual": true + } + ] + } } \ No newline at end of file diff --git a/IOB-WIN-NEXT/DATA/MES_Setup/setupConsumi.json b/IOB-WIN-NEXT/DATA/MES_Setup/setupConsumi.json new file mode 100644 index 00000000..4376eeaf --- /dev/null +++ b/IOB-WIN-NEXT/DATA/MES_Setup/setupConsumi.json @@ -0,0 +1,31 @@ +{ + "addHeader": false, + "numDec": 2, + "codMag": "CH5", + "mode": "FixWidth", + "convRatio": { + "PCW0215": 0.455, + "BLU": 0.769, + "NERO": 0.714, + "ROSSO": 0.625, + "ULTRAPHO": 1.000, + "PRINTWHI": 0.571, + "GIALLORO": 0.645, + "COLANVIO": 1.000, + "GARTIT": 1.00 + }, + "fieldLength": { + "CodMag": 3, + "ColourCode": 8, + "Description": 6, + "UM": 2, + "WeightKgProc": 8, + "DtRif": 10 + }, + "fieldNDec": { + "WeightKgProc": "2" + }, + "fieldLPad": { + "WeightKgProc": "0" + } +} \ No newline at end of file diff --git a/IOB-WIN-NEXT/FodyWeavers.xml b/IOB-WIN-NEXT/FodyWeavers.xml new file mode 100644 index 00000000..5029e706 --- /dev/null +++ b/IOB-WIN-NEXT/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/IOB-WIN-NEXT/FodyWeavers.xsd b/IOB-WIN-NEXT/FodyWeavers.xsd new file mode 100644 index 00000000..05e92c11 --- /dev/null +++ b/IOB-WIN-NEXT/FodyWeavers.xsd @@ -0,0 +1,141 @@ + + + + + + + + + + + + A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks + + + + + A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks. + + + + + A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks + + + + + A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks. + + + + + A list of unmanaged 32 bit assembly names to include, delimited with line breaks. + + + + + A list of unmanaged 64 bit assembly names to include, delimited with line breaks. + + + + + The order of preloaded assemblies, delimited with line breaks. + + + + + + This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file. + + + + + Controls if .pdbs for reference assemblies are also embedded. + + + + + Controls if runtime assemblies are also embedded. + + + + + Controls whether the runtime assemblies are embedded with their full path or only with their assembly name. + + + + + Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option. + + + + + As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off. + + + + + Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code. + + + + + Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior. + + + + + A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with | + + + + + A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |. + + + + + A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with | + + + + + A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with |. + + + + + A list of unmanaged 32 bit assembly names to include, delimited with |. + + + + + A list of unmanaged 64 bit assembly names to include, delimited with |. + + + + + The order of preloaded assemblies, delimited with |. + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/IOB-WIN-NEXT/IOB-WIN-NEXT.csproj b/IOB-WIN-NEXT/IOB-WIN-NEXT.csproj index 1f3ce04f..b5ba74d0 100644 --- a/IOB-WIN-NEXT/IOB-WIN-NEXT.csproj +++ b/IOB-WIN-NEXT/IOB-WIN-NEXT.csproj @@ -1,5 +1,6 @@  + @@ -12,7 +13,7 @@ IOB-WIN-NEXT v4.6.2 512 - false + true false @@ -94,8 +95,8 @@ MinimumRecommendedRules.ruleset - - ..\packages\Autoupdater.NET.Official.1.7.0\lib\net45\AutoUpdater.NET.dll + + ..\packages\Autoupdater.NET.Official.1.8.4\lib\net45\AutoUpdater.NET.dll ..\packages\Portable.BouncyCastle.1.9.0\lib\net40\BouncyCastle.Crypto.dll @@ -103,6 +104,9 @@ ..\EgwProxy.MultiCncLib\ExtLib\CndexLinkDotNet.dll + + ..\packages\Costura.Fody.5.7.0\lib\netstandard1.0\Costura.dll + ..\packages\EasyModbusTCP.5.6.0\lib\net40\EasyModbus.dll @@ -110,10 +114,10 @@ ..\packages\EgwProxy.Ftp.3.6.2210.1815\lib\EgwProxy.Ftp.dll - ..\packages\EgwProxy.Icoel.3.6.2210.1815\lib\EgwProxy.Icoel.dll + ..\packages\EgwProxy.Icoel.3.6.2309.708\lib\EgwProxy.Icoel.dll - ..\packages\EgwProxy.Icoel.3.6.2210.1815\lib\EgwProxy.Icoel.DataLayer.dll + ..\packages\EgwProxy.Icoel.3.6.2309.708\lib\EgwProxy.Icoel.DataLayer.dll ..\packages\EgwProxy.MultiCncLib.3.6.2207.1211\lib\EgwProxy.MultiCncLib.dll @@ -149,6 +153,29 @@ ..\packages\Microsoft.Extensions.Logging.Abstractions.2.1.0\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll + + ..\packages\Microsoft.IdentityModel.Abstractions.6.19.0\lib\net461\Microsoft.IdentityModel.Abstractions.dll + + + ..\packages\Microsoft.IdentityModel.Logging.6.19.0\lib\net461\Microsoft.IdentityModel.Logging.dll + + + ..\packages\Microsoft.IdentityModel.Tokens.6.19.0\lib\net461\Microsoft.IdentityModel.Tokens.dll + + + ..\packages\Microsoft.Web.WebView2.1.0.1938.49\lib\net45\Microsoft.Web.WebView2.Core.dll + + + ..\packages\Microsoft.Web.WebView2.1.0.1938.49\lib\net45\Microsoft.Web.WebView2.WinForms.dll + + + ..\packages\Microsoft.Web.WebView2.1.0.1938.49\lib\net45\Microsoft.Web.WebView2.Wpf.dll + + + ..\packages\Microsoft.Win32.Primitives.4.3.0\lib\net46\Microsoft.Win32.Primitives.dll + True + True + ..\packages\MTConnect.NET.2.9.1.28314\lib\net40\MTConnect-NET.dll @@ -156,7 +183,7 @@ ..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll - ..\packages\NLog.5.1.2\lib\net46\NLog.dll + ..\packages\NLog.5.2.3\lib\net46\NLog.dll ..\packages\OmronFinsTCP.Net.3.0.0.0\lib\net40\OmronFinsTCP.Net.dll @@ -182,30 +209,137 @@ ..\packages\S7netplus.0.1.9\lib\net45\S7.Net.dll + + ..\packages\System.AppContext.4.3.0\lib\net46\System.AppContext.dll + True + True + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + + ..\packages\System.Console.4.3.0\lib\net46\System.Console.dll + True + True + + + ..\packages\System.Diagnostics.DiagnosticSource.4.3.0\lib\net46\System.Diagnostics.DiagnosticSource.dll + + + ..\packages\System.Diagnostics.Tracing.4.3.0\lib\net462\System.Diagnostics.Tracing.dll + True + True + + + ..\packages\System.Drawing.Common.7.0.0\lib\net462\System.Drawing.Common.dll + ..\packages\System.Formats.Asn1.6.0.0\lib\net461\System.Formats.Asn1.dll + + ..\packages\System.Globalization.Calendars.4.3.0\lib\net46\System.Globalization.Calendars.dll + True + True + - - - ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll + + ..\packages\System.IO.4.3.0\lib\net462\System.IO.dll + True + True + + + ..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll + True + True + + + + ..\packages\System.IO.Compression.ZipFile.4.3.0\lib\net46\System.IO.Compression.ZipFile.dll + True + True + + + ..\packages\System.IO.FileSystem.4.3.0\lib\net46\System.IO.FileSystem.dll + True + True + + + ..\packages\System.IO.FileSystem.Primitives.4.3.0\lib\net46\System.IO.FileSystem.Primitives.dll + True + True + + + ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll + + ..\packages\System.Net.Http.4.3.0\lib\net46\System.Net.Http.dll + True + True + + + ..\packages\System.Net.Sockets.4.3.0\lib\net46\System.Net.Sockets.dll + True + True + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + ..\packages\System.Reflection.4.3.0\lib\net462\System.Reflection.dll + True + True + + + ..\packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll + True + True + ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + ..\packages\System.Runtime.Extensions.4.3.0\lib\net462\System.Runtime.Extensions.dll + True + True + + + ..\packages\System.Runtime.InteropServices.4.3.0\lib\net462\System.Runtime.InteropServices.dll + True + True + + + ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll + True + True + + + ..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net461\System.Security.Cryptography.Algorithms.dll + True + True + + + ..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll + True + True + + + ..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll + True + True + + + ..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll + True + True + @@ -222,11 +356,16 @@ + + ..\packages\System.Xml.ReaderWriter.4.3.0\lib\net46\System.Xml.ReaderWriter.dll + True + True + ..\ExtLibs\AdsApi\.NET\v4.0.30319\TwinCAT.Ads.dll - ..\packages\Selenium.WebDriver.4.5.1\lib\net46\WebDriver.dll + ..\packages\Selenium.WebDriver.4.12.4\lib\netstandard2.0\WebDriver.dll @@ -350,6 +489,7 @@ + Always @@ -551,7 +691,9 @@ - + + Always + @@ -588,7 +730,9 @@ - + + Always + @@ -612,7 +756,9 @@ - + + Always + @@ -747,12 +893,6 @@ true - - - {90512e12-29fc-460d-94cc-648c2a072dbd} - IOB-UT-NEXT - - @@ -778,6 +918,12 @@ + + + {90512e12-29fc-460d-94cc-648c2a072dbd} + IOB-UT-NEXT + + "$(ProjectDir)setupTgt.bat" "$(ConfigurationName)" "$(ProjectDir)" @@ -786,7 +932,6 @@ - "$(ProjectDir)postBuildTgt.bat" "$(ConfigurationName)" "$(TargetDir)" @@ -797,17 +942,26 @@ - - - - + + + + + + + + + - - - - + + + + + + + + \ No newline at end of file diff --git a/IOB-WIN-NEXT/Iob/Fanuc.cs b/IOB-WIN-NEXT/Iob/Fanuc.cs index c2853ec5..24b85354 100644 --- a/IOB-WIN-NEXT/Iob/Fanuc.cs +++ b/IOB-WIN-NEXT/Iob/Fanuc.cs @@ -933,6 +933,7 @@ namespace IOB_WIN_NEXT.Iob // refresh stato allarmi!!! if (connectionOk) { + queueInEnabCurr = true; dtAvvioAdp = DateTime.Now; if (adpRunning) { @@ -996,6 +997,7 @@ namespace IOB_WIN_NEXT.Iob { lgError("IMPOSSIBILE effettuare disconnessione: Connessione non disponibile..."); } + queueInEnabCurr = false; } #endregion Public Methods diff --git a/IOB-WIN-NEXT/Iob/Generic.cs b/IOB-WIN-NEXT/Iob/Generic.cs index 5c62a04e..51849c36 100644 --- a/IOB-WIN-NEXT/Iob/Generic.cs +++ b/IOB-WIN-NEXT/Iob/Generic.cs @@ -209,33 +209,39 @@ namespace IOB_WIN_NEXT.Iob /// /// Coda valori ALLARMI ove gestiti... /// - public ConcurrentQueue QueueAlarm = new ConcurrentQueue(); + public DataQueue QueueAlarm = new DataQueue("000", "QueueAlarm", false); + //public ConcurrentQueue QueueAlarm = new ConcurrentQueue(); /// /// Oggetto della coda degli elementi letti di tipo FluxLog (e non ancora trasmessi) /// - public ConcurrentQueue QueueFLog = new ConcurrentQueue(); + public DataQueue QueueFLog = new DataQueue("000", "QueueFLog", false); + //public ConcurrentQueue QueueFLog = new ConcurrentQueue(); /// /// Oggetto della coda degli elementi letti (e non ancora trasmessi) /// - public ConcurrentQueue QueueIN = new ConcurrentQueue(); + public DataQueue QueueIN = new DataQueue("000", "QueueIN", false); + //public ConcurrentQueue QueueIN = new ConcurrentQueue(); /// /// Coda valori MESSAGGI/EVENTI (da non sottocampionare come samples)... /// - public ConcurrentQueue QueueMessages = new ConcurrentQueue(); + public DataQueue QueueMessages = new DataQueue("000", "QueueMessages", false); + //public ConcurrentQueue QueueMessages = new ConcurrentQueue(); /// /// Oggetto della coda degli elementi di tipo RawTransf (e non ancora trasmessi) /// NB: sono salvati serializzati come stringhe /// - public ConcurrentQueue QueueRawTransf = new ConcurrentQueue(); + public DataQueue QueueRawTransf = new DataQueue("000", "QueueRawTransf", false); + //public ConcurrentQueue QueueRawTransf = new ConcurrentQueue(); /// /// Coda valori LOG UTENTE (da non sottocampionare come samples)... /// - public ConcurrentQueue QueueULog = new ConcurrentQueue(); + public DataQueue QueueULog = new DataQueue("000", "QueueULog", false); + //public ConcurrentQueue QueueULog = new ConcurrentQueue(); /// /// alias booleano false = R @@ -312,6 +318,9 @@ namespace IOB_WIN_NEXT.Iob // configurazione... cIobConf = IOBConf; + // imposto le code! + QueueIN = new DataQueue(cIobConf.codIOB, "QueueIN", cIobConf.EnableRedisQueue); + lastConnectTry = DateTime.Now; // aggiungo nel logger IDX Macchina @@ -328,6 +337,9 @@ namespace IOB_WIN_NEXT.Iob // checkLogDir x shrink! checkShrinkDir(); + // imposto veto invio per i prossimi sec + dtVetoQueueIN = DateTime.Now.AddSeconds(vetoQueueIn); + lgInfoStartup($"Impostato veto QUEUE-IN a {vetoQueueIn}s | fino alle {dtVetoQueueIN:yyyy.MM.dd HH:mm:ss}"); // concluso! lgInfoStartup("Istanziata classe preliminare IOBGeneric"); } @@ -387,6 +399,30 @@ namespace IOB_WIN_NEXT.Iob } } + /// + /// Indicazione VETO accodamento valori INGRESSI/EVENTI sino alla data-ora indicata + /// + public static DateTime dtVetoQueueIN + { + get + { + return utils.dtVetoQueueIN; + } + set + { + utils.dtVetoQueueIN = value; + } + } + + protected bool queueInEnabCurr { get; set; } = false; + /// + /// Verifica veto coda QueueIN ed aggiorna abilitazione su variabile + /// + protected void checkVetoQueueIn() + { + queueInEnabCurr = dtVetoQueueIN < DateTime.Now; + } + /// /// Indicazione VETO invio a server sino alla data-ora indicata /// @@ -1687,6 +1723,7 @@ namespace IOB_WIN_NEXT.Iob /// public void accodaSigIN(ref newDisplayData currDispData) { + DateTime adesso = DateTime.Now; // mostro dati variati letti... displayInData(ref currDispData); // verifico veto a invio status macchina @@ -1697,22 +1734,31 @@ namespace IOB_WIN_NEXT.Iob } else { - // --> accodo (valore già formattato)! - QueueIN.Enqueue(qEncodeIN); - // loggo! - lgTrace(string.Format("[QUEUE-IN] {0}", qEncodeIN)); - } - // aggiorno counters ed eventuale reset - nReadFilt++; - if (nReadFilt > int.MaxValue - 1) - { - nReadFilt = 0; // per evitare buffer overflow... - } + // verifico non sia in veto invio iniziale... + if (queueInEnabCurr) + { + // --> accodo (valore già formattato)! + QueueIN.Enqueue(qEncodeIN); + // loggo! + lgDebug($"[QUEUE-IN] {qEncodeIN}"); + } + else + { + lgDebug($"[VETO FOR QUEUE-IN] | {qEncodeIN} - MESSAGE NOT SENT | {adesso:yyyyMMdd_HHmmss}"); + checkVetoQueueIn(); + } + // aggiorno counters ed eventuale reset + nReadFilt++; + if (nReadFilt > int.MaxValue - 1) + { + nReadFilt = 0; // per evitare buffer overflow... + } - counterSigIN++; - if (counterSigIN > 9999) - { - counterSigIN = 0; + counterSigIN++; + if (counterSigIN > 9999) + { + counterSigIN = 0; + } } } @@ -2093,6 +2139,8 @@ namespace IOB_WIN_NEXT.Iob return valTransl; } + + /// /// effettua recupero dati ed invio valori modificati... /// @@ -2730,7 +2778,6 @@ namespace IOB_WIN_NEXT.Iob lgTrace("Richiesta processAutoDossier"); string IOB_MULTI_CNAME = ""; string[] elencoMulti = null; - string fullUrl = ""; if (isMulti) { // devo chiamare cambio ODL x OGNI tavola: mi servono i parametri opzionali... @@ -3070,7 +3117,7 @@ namespace IOB_WIN_NEXT.Iob // resetto tutti i valori BYTE IN/PREV/OUT... così invio macchina spenta... B_input = 0; B_output = 0; - B_previous = 0; + B_previous = -1; accodaSigIN(ref currDispData); // update controllo lastDisconnCheck = DateTime.Now; @@ -3837,6 +3884,10 @@ namespace IOB_WIN_NEXT.Iob // aggiungo altri defaults setDefaults(resetQueue); adpTryRestart = true; + // sistemo altri check avvio + queueInEnabCurr = false; + dtVetoQueueIN = DateTime.Now.AddSeconds(vetoQueueIn); + lgInfoStartup($"Impostato veto QUEUE-IN a {vetoQueueIn}s | fino alle {dtVetoQueueIN:yyyy.MM.dd HH:mm:ss}"); lgDebug("startAdapter completed"); } @@ -3850,7 +3901,8 @@ namespace IOB_WIN_NEXT.Iob /// indica se sia richeisto di SVUOTARE le code delle info public virtual void stopAdapter(bool tryRestart, bool forceDequeue) { - if (forceDequeue) + // controllo che non ci sia redis queue altrimenti NON forza svuotamento... + if (forceDequeue && !cIobConf.EnableRedisQueue) { // svuoto le code dei valori letti e non ancora trasmessi... parentForm.displayTaskAndLog("[CLOSING] Svuotamento FORZATO coda segnali...", true); @@ -3887,7 +3939,8 @@ namespace IOB_WIN_NEXT.Iob // invio sendDataBlock(urlType.FLog, listaValori); // svuoto! - QueueFLog = new ConcurrentQueue(); + QueueFLog = new DataQueue(cIobConf.codIOB, "QueueFLog", cIobConf.EnableRedisQueue); + //QueueFLog = new ConcurrentQueue(); } } // HO FINITO invio di FLog... @@ -3926,7 +3979,8 @@ namespace IOB_WIN_NEXT.Iob // invio sendDataBlock(urlType.ULog, listaValori); // svuoto! - QueueULog = new ConcurrentQueue(); + QueueULog = new DataQueue(cIobConf.codIOB, "QueueULog", cIobConf.EnableRedisQueue); + //QueueULog = new ConcurrentQueue(); } } } @@ -3989,7 +4043,8 @@ namespace IOB_WIN_NEXT.Iob // invio sendDataBlock(urlType.SignIN, listaValori); // svuoto! - QueueIN = new ConcurrentQueue(); + QueueIN = new DataQueue(cIobConf.codIOB, "QueueIN", cIobConf.EnableRedisQueue); + //QueueIN = new ConcurrentQueue(); } } else @@ -4028,6 +4083,7 @@ namespace IOB_WIN_NEXT.Iob public virtual void tryConnect() { dtAvvioAdp = DateTime.Now; + queueInEnabCurr = true; } /// @@ -4035,6 +4091,7 @@ namespace IOB_WIN_NEXT.Iob /// public virtual void tryDisconnect() { + queueInEnabCurr = false; } /// @@ -4281,7 +4338,7 @@ namespace IOB_WIN_NEXT.Iob /// /// Vettore 32 BIT valori precedenti /// - protected int B_previous; + protected int B_previous = -1; /// /// Num errori check alive @@ -4348,6 +4405,11 @@ namespace IOB_WIN_NEXT.Iob /// protected int[] i_counters; + /// + /// Durata in secondi del divieto accodamento segnali IN alla fase di startup + /// + protected int vetoQueueIn = 1; + /// /// Indica impianto IN SETUP (fino a quando SMETTE di esserlo...) /// @@ -6016,7 +6078,7 @@ namespace IOB_WIN_NEXT.Iob baseUtils.checkDir(zipDir); string zipName = Path.Combine(zipDir, $"{keyReq}.zip"); // gestione report OUT - string reportPath = Path.Combine(reportBasePath, $"{keyReq}.csv"); + string reportPath = Path.Combine(reportBasePath, $"{keyReq}"); // verifico il tipo di attività e procedo switch (valReq) { @@ -7027,12 +7089,12 @@ namespace IOB_WIN_NEXT.Iob /// /// Effettua chiamata MP-IO per tentare chiusura PODL --> ODL specifico /// - /// + /// /// - protected bool tryClosePODL(int IdxPOdl) + protected bool tryClosePODL(int idxPODL) { bool fatto = false; - string fullUrl = $"{urlPODLClose}{IdxPOdl}"; + string fullUrl = $"{urlPODLClose}{idxPODL}"; try { // invio chiamata URL x chiusura ODL su macchina @@ -7041,7 +7103,30 @@ namespace IOB_WIN_NEXT.Iob } catch { } - lgInfo($"Eseguito tryClosePODL per {IdxPOdl} | url: {fullUrl} | esito: {fatto}"); + lgInfo($"Eseguito tryClosePODL per {idxPODL} | url: {fullUrl} | esito: {fatto}"); + return fatto; + } + /// + /// Effettua chiamata MP-IO per tentare chiusura PODL --> ODL specifico + /// + /// + /// + /// + /// + /// + protected bool tryClosePODL(int idxPODL, DateTime dtEve, DateTime dtCurr) + { + bool fatto = false; + string fullUrl = $"{urlPODLClose}{idxPODL}&dtEve={dtEve:yyyyMMddHHmmssfff}&dtCurr={dtCurr:yyyyMMddHHmmssfff}"; + try + { + // invio chiamata URL x chiusura ODL su macchina + string callResp = callUrl(fullUrl, false); + fatto = (callResp != "KO") ? true : false; + } + catch + { } + lgInfo($"Eseguito tryClosePODL per {idxPODL} | url: {fullUrl} | esito: {fatto}"); return fatto; } @@ -7138,10 +7223,34 @@ namespace IOB_WIN_NEXT.Iob protected bool trySetupPODL(int idxPODL) { bool fatto = false; + string fullUrl = $"{urlOLDStartFromPODL}{idxPODL}"; try { // invio chiamata URL x avvio PODL su macchina - string rawSplit = callUrl($"{urlOLDStartFromPODL}{idxPODL}", false); + string rawSplit = callUrl(fullUrl, false); + fatto = (rawSplit != "KO") ? true : false; + } + catch + { } + return fatto; + } + /// + /// Effettua chiamata MP-IO per tentare setup del PODL indicato con indicazioni estese (confirm pezzi, dtEvento, dtCorrente) + /// + /// + /// + /// + /// + /// + protected bool trySetupPODL(int idxPODL, bool doConfirm, DateTime dtEve, DateTime dtCurr) + { + bool fatto = false; + //string format = "yyyyMMddHHmmssfff"; + string fullUrl = $"{urlOLDStartFromPODL}{idxPODL}&doConfirm={doConfirm}&dtEve={dtEve:yyyyMMddHHmmssfff}&dtCurr={dtCurr:yyyyMMddHHmmssfff}"; + try + { + // invio chiamata URL x avvio PODL su macchina + string rawSplit = callUrl(fullUrl, false); fatto = (rawSplit != "KO") ? true : false; } catch @@ -7722,21 +7831,30 @@ namespace IOB_WIN_NEXT.Iob /// private void processAllMemory() { - // init obj display - newDisplayData currDispData = new newDisplayData(); - // in primis SALVO valori previous/precedenti - B_previous = B_output; - // poi faccio lettura NUOVI valori - readAllData(ref currDispData); - // eseguo il filtering dei valori (per i bit "blinking") - filterData(); - // effettuo confronto valori vecchi/nuovi... SE trovo variazione OPPURE se è passato + - // di un timeout di controllo... - if (B_output != B_previous) + //verifico se sia abilitato processing... + if (queueInEnabCurr) { - accodaSigIN(ref currDispData); + // init obj display + newDisplayData currDispData = new newDisplayData(); + // in primis SALVO valori previous/precedenti + B_previous = B_output; + // poi faccio lettura NUOVI valori + readAllData(ref currDispData); + // eseguo il filtering dei valori (per i bit "blinking") + filterData(); + // effettuo confronto valori vecchi/nuovi... SE trovo variazione OPPURE se è passato + + // di un timeout di controllo... + if (B_output != B_previous) + { + accodaSigIN(ref currDispData); + } + raiseRefresh(currDispData); + } + else + { + lgInfo($"VETO on processAllMemory: queueIn disabled"); + checkVetoQueueIn(); } - raiseRefresh(currDispData); } private void processMem2Write() @@ -7871,6 +7989,7 @@ namespace IOB_WIN_NEXT.Iob { // var di base bool fatto = false; + string expMode = "csv"; List ListConsDet = new List(); List ListConsSum = new List(); // file conf x conversioni... @@ -7890,6 +8009,7 @@ namespace IOB_WIN_NEXT.Iob addHeader = currConf.addHeader; numDec = currConf.numDec; codMag = currConf.codMag; + expMode = currConf.mode.ToLower(); } } } @@ -7932,17 +8052,26 @@ namespace IOB_WIN_NEXT.Iob ConsOut colTotal = new ConsOut() { CodMag = codMag, - FileRef = dirName, ColourCode = colore.ColourCode, Description = colore.Description, - DtRif = colore.DtRif, - WeightKgProc = Math.Round(totWeightKg, numDec) + UM = "KG", + WeightKgProc = totWeightKg > 0.01 ? Math.Round(totWeightKg, numDec) : 0.01, + DtRif = colore.DtRif }; ListConsSum.Add(colTotal); } - // infine serializzo x output - fatto = DataExport.SaveToCsv(ListConsSum, reportPath, addHeader); + // infine serializzo x output in base alla modalità richiesta + switch (expMode) + { + case "fixwidth": + fatto = DataExport.SaveFixedWidth(ListConsSum, $"{reportPath}.txt", currConf.fieldLength, currConf.fieldLPad, currConf.fieldNDec); + break; + case "csv": + default: + fatto = DataExport.SaveToCsv(ListConsSum, $"{reportPath}.csv", addHeader); + break; + } } return fatto; } @@ -8055,18 +8184,30 @@ namespace IOB_WIN_NEXT.Iob // svuoto code se richiesto if (resetQueue) { - QueueAlarm = new ConcurrentQueue(); - QueueIN = new ConcurrentQueue(); - QueueFLog = new ConcurrentQueue(); - QueueMessages = new ConcurrentQueue(); - QueueRawTransf = new ConcurrentQueue(); - QueueULog = new ConcurrentQueue(); + QueueAlarm = new DataQueue(cIobConf.codIOB, "QueueAlarm", cIobConf.EnableRedisQueue); + //QueueAlarm = new ConcurrentQueue(); + QueueIN = new DataQueue(cIobConf.codIOB, "QueueIN", cIobConf.EnableRedisQueue); + //QueueIN = new ConcurrentQueue(); + QueueFLog = new DataQueue(cIobConf.codIOB, "QueueFLog", cIobConf.EnableRedisQueue); + //QueueFLog = new ConcurrentQueue(); + QueueMessages = new DataQueue(cIobConf.codIOB, "QueueMessages", cIobConf.EnableRedisQueue); + //QueueMessages = new ConcurrentQueue(); + QueueRawTransf = new DataQueue(cIobConf.codIOB, "QueueRawTransf", cIobConf.EnableRedisQueue); + //QueueRawTransf = new ConcurrentQueue(); + QueueULog = new DataQueue(cIobConf.codIOB, "QueueULog", cIobConf.EnableRedisQueue); + //QueueULog = new ConcurrentQueue(); } // imposto contatori blink a zero... i_counters = new int[32]; lastPeriodicLog = DateTime.Now; // fix parametri generali... enablePrgName = true; + // valore standard divieto accodamento segnali IN + string VETO_QUEUE_IN = getOptPar("VETO_QUEUE_IN"); + if (!string.IsNullOrEmpty(VETO_QUEUE_IN)) + { + int.TryParse(VETO_QUEUE_IN, out vetoQueueIn); + } } private void svuotaCodaContapezzi() @@ -8109,6 +8250,7 @@ namespace IOB_WIN_NEXT.Iob /// private void svuotaCodaFLog() { + bool sendOnMachineOff = false; // controllo se è passato oltre watchdog e non ho inviato nulla --> RE-INVIO (ultimo inviato)!!!! if (DateTime.Now.Subtract(lastWatchDog).TotalSeconds > utils.CRI("watchdogMaxSec")) { @@ -8120,6 +8262,8 @@ namespace IOB_WIN_NEXT.Iob accodaFLog(sVal, qEncodeFLog("WDST", wdStatus)); } lastWatchDog = DateTime.Now; + sendOnMachineOff = true; + lgInfo("Impostato sendOnMachineOff a true"); } // verifico SE la coda abbia dei valori... if (QueueFLog.Count > 0) @@ -8133,7 +8277,7 @@ namespace IOB_WIN_NEXT.Iob string currVal = ""; if (MPOnline) { - if (IobOnline) + if (IobOnline || sendOnMachineOff) { // se ho + di 2 elementi in coda --> uso invio JSON in blocco... if (QueueFLog.Count > 1) @@ -8158,7 +8302,8 @@ namespace IOB_WIN_NEXT.Iob // invio sendDataBlock(urlType.FLog, listaValori); // svuoto! - QueueFLog = new ConcurrentQueue(); + QueueFLog = new DataQueue(cIobConf.codIOB, "QueueFLog", cIobConf.EnableRedisQueue); + //QueueFLog = new ConcurrentQueue(); lastWatchDog = DateTime.Now; } } @@ -8229,7 +8374,8 @@ namespace IOB_WIN_NEXT.Iob if (fatto) { // svuoto se ha okReport! - QueueRawTransf = new ConcurrentQueue(); + QueueRawTransf = new DataQueue(cIobConf.codIOB, "QueueRawTransf", cIobConf.EnableRedisQueue); + //QueueRawTransf = new ConcurrentQueue(); } } } @@ -8290,7 +8436,8 @@ namespace IOB_WIN_NEXT.Iob // invio sendDataBlock(urlType.ULog, listaValori); // svuoto! - QueueULog = new ConcurrentQueue(); + QueueULog = new DataQueue(cIobConf.codIOB, "QueueULog", cIobConf.EnableRedisQueue); + //QueueULog = new ConcurrentQueue(); } } else diff --git a/IOB-WIN-NEXT/Iob/Kawasaki.cs b/IOB-WIN-NEXT/Iob/Kawasaki.cs index f5e94b75..b233dcf1 100644 --- a/IOB-WIN-NEXT/Iob/Kawasaki.cs +++ b/IOB-WIN-NEXT/Iob/Kawasaki.cs @@ -401,6 +401,7 @@ namespace IOB_WIN_NEXT.Iob // verifico se sta girando if (connectionOk) { + queueInEnabCurr = true; if (adpRunning) { lgInfo("Connessione OK"); @@ -462,6 +463,7 @@ namespace IOB_WIN_NEXT.Iob { lgError("IMPOSSIBILE effettuare disconnessione KAWASAKI: Connessione non disponibile..."); } + queueInEnabCurr = false; needRefresh = true; } diff --git a/IOB-WIN-NEXT/Iob/MTConnect.cs b/IOB-WIN-NEXT/Iob/MTConnect.cs index 0eea2ae6..a5777c47 100644 --- a/IOB-WIN-NEXT/Iob/MTConnect.cs +++ b/IOB-WIN-NEXT/Iob/MTConnect.cs @@ -18,8 +18,7 @@ namespace IOB_WIN_NEXT.Iob #region Public Constructors /// - /// Estende l'init della classe base, impiegando il pacchetto Nuget TrackHound - /// https://github.com/TrakHound/MTConnect.NET + /// Estende l'init della classe base, impiegando il pacchetto Nuget TrackHound https://github.com/TrakHound/MTConnect.NET /// /// /// @@ -73,14 +72,21 @@ namespace IOB_WIN_NEXT.Iob public string getDataItemValue(string diKey) { string answ = ""; - try + if (queueInEnabCurr) { - var currDataItem = dataItemMem[diKey]; - answ = currDataItem.value; + try + { + var currDataItem = dataItemMem[diKey]; + answ = currDataItem.value; + } + catch (Exception exc) + { + Logging.Instance.Error($"Errore in getDataItemValue per {diKey}{Environment.NewLine}{exc}"); + } } - catch (Exception exc) + else { - Logging.Instance.Error($"Errore in getDataItemValue per {diKey}{Environment.NewLine}{exc}"); + lgDebug($"[VETO getDataItemValue] | veto attivo alle {DateTime.Now:yyyy.MM.dd HH:mm:ss}"); } return answ; } @@ -101,20 +107,27 @@ namespace IOB_WIN_NEXT.Iob { if (utils.CRB("enableContapezzi")) { - // cerco parametro contapezzi... - string currPzCount = getDataItemValue(mtcParams.keyPartCount); - - if (isVerboseLog) + if (queueInEnabCurr) { - lgInfo($"contapezzi: {mtcParams.keyPartCount} --> {currPzCount}"); + // cerco parametro contapezzi... + string currPzCount = getDataItemValue(mtcParams.keyPartCount); + + if (isVerboseLog) + { + lgInfo($"contapezzi: {mtcParams.keyPartCount} --> {currPzCount}"); + } + + // se ho un contapezzi... processo... + if (!string.IsNullOrEmpty(currPzCount)) + { + int newVal = -1; + Int32.TryParse(currPzCount, out newVal); + contapezziPLC = newVal > -1 ? newVal : contapezziPLC; + } } - - // se ho un contapezzi... processo... - if (!string.IsNullOrEmpty(currPzCount)) + else { - int newVal = -1; - Int32.TryParse(currPzCount, out newVal); - contapezziPLC = newVal > -1 ? newVal : contapezziPLC; + lgDebug($"[VETO processContapezzi] | veto attivo alle {DateTime.Now:yyyy.MM.dd HH:mm:ss}"); } } } @@ -125,24 +138,34 @@ namespace IOB_WIN_NEXT.Iob /// public override void readSemafori(ref newDisplayData currDispData) { - base.readSemafori(ref currDispData); - try + DateTime adesso = DateTime.Now; + lastReadPLC = adesso; + // verifico non sia in veto invio iniziale... + if (queueInEnabCurr) { - if (verboseLog) + try { - lgInfo("inizio read semafori"); + if (verboseLog) + { + lgInfo("inizio read semafori"); + } + + currDispData.semIn = Semaforo.SV; + + // decodifica e gestione + decodeToBaseBitmap(); + reportRawInput(ref currDispData); + } + catch (Exception exc) + { + currDispData.semIn = Semaforo.SR; + lgError($"Eccezione in readSemafori:{Environment.NewLine}{exc}"); } - - currDispData.semIn = Semaforo.SV; - - // decodifica e gestione - decodeToBaseBitmap(); - reportRawInput(ref currDispData); } - catch (Exception exc) + else { - currDispData.semIn = Semaforo.SR; - lgError($"Eccezione in readSemafori:{Environment.NewLine}{exc}"); + lgDebug($"[VETO readSemafori] | veto attivo alle {adesso:yyyy.MM.dd HH:mm:ss}"); + checkVetoQueueIn(); } } @@ -197,6 +220,7 @@ namespace IOB_WIN_NEXT.Iob // refresh stato allarmi!!! if (connectionOk) { + queueInEnabCurr = true; if (adpRunning) { lgInfo("Connessione OK"); @@ -242,25 +266,37 @@ namespace IOB_WIN_NEXT.Iob /// public override void tryDisconnect() { - if (connectionOk) + // verifico che NON sia in fase di avvio MTC... + if (isConnecting && DateTime.Now.Subtract(startConnecting).TotalSeconds < 60) { - string szStatusConnection = ""; - try - { - MTC_ref.Stop(); - connectionOk = false; - lgInfo(szStatusConnection); - lgInfo("Effettuata disconnessione adapter MTC!"); - } - catch (Exception exc) - { - lgFatal(exc, "Errore nella disconnessione dall'adapter MTC"); - } + lgInfo("Disconnessione non effettuata: connessione ancora in corso"); } else { - lgError("IMPOSSIBILE effettuare disconnessione MTC: Connessione non disponibile..."); + lgTrace("Richiesta tryDisconnect"); + if (connectionOk) + { + string szStatusConnection = ""; + try + { + MTC_ref.Stop(); + connectionOk = false; + isConnecting = false; + lgInfo($"conn status: {szStatusConnection}"); + lgInfo("Effettuata disconnessione adapter MTC!"); + } + catch (Exception exc) + { + lgFatal(exc, "Errore nella disconnessione dall'adapter MTC"); + } + } + else + { + lgError("IMPOSSIBILE effettuare disconnessione MTC: Connessione non disponibile..."); + } } + queueInEnabCurr = false; + needRefresh = true; } #endregion Public Methods @@ -338,25 +374,38 @@ namespace IOB_WIN_NEXT.Iob get { bool answ = false; - try + if (queueInEnabCurr) { - if (!string.IsNullOrEmpty(mtcParams.keyEStop)) + try { - string currEStop = getDataItemValue(mtcParams.keyEStop); - answ = (currEStop == "TRIGGERED"); + if (!string.IsNullOrEmpty(mtcParams.keyEStop)) + { + string currEStop = getDataItemValue(mtcParams.keyEStop); + answ = (currEStop == "TRIGGERED"); + } + } + catch (Exception exc) + { + Logging.Instance.Error($"Errore in hasEStopTriggered{Environment.NewLine}{exc}"); } } - catch - { } + else + { + lgDebug($"[VETO hasEStopTriggered] | veto attivo alle {DateTime.Now:yyyy.MM.dd HH:mm:ss}"); + } return answ; } } + protected bool isConnecting { get; set; } = false; + /// /// Parametri specifici MTC /// protected MtcParamConf mtcParams { get; set; } + protected DateTime startConnecting { get; set; } = DateTime.Today; + /// /// URL x salvataggio elenco dataItems MTC /// @@ -482,7 +531,9 @@ namespace IOB_WIN_NEXT.Iob double newVal = 0; if (newValue != null) { +#if false lgTrace($"Richiesta checkSaveSample per {newValue} | id: {newValue.DataItemId} | CDATA: {newValue.CDATA}"); +#endif // verifico in memoria se ho l'oggetto condition ed il suo valore.. if (dataItemMem.ContainsKey(newValue.DataItemId)) { @@ -574,16 +625,16 @@ namespace IOB_WIN_NEXT.Iob { if (document != null) { - lgInfo($"DiscoverySuccessful: discovery per {document.Url}"); + lgInfo($"CurrentSuccessful: discovery per {document.Url}"); if (document.DeviceStreams != null) { - lgInfo($"DiscoverySuccessful: trovati {document.DeviceStreams.Count} streams"); + lgInfo($"CurrentSuccessful: trovati {document.DeviceStreams.Count} streams"); } checkAndSend(document, true); } else { - lgError("StreamsSuccessful ERROR: document è null"); + lgError("CurrentSuccessful ERROR: document è null"); } } @@ -641,15 +692,15 @@ namespace IOB_WIN_NEXT.Iob // invio IN BLOCCO il dataItem serializzati... if (elencoDataItems.Count > 0) { - lgInfo($"STEP 04 invio dati di {elencoDataItems.Count} records"); + lgInfo($"STEP 03 invio dati di {elencoDataItems.Count} records"); sendDataItemsList(elencoDataItems); } hasReadItems = true; - lgInfo($"STEP 05: memorizzati {dataItemMem.Count} oggetti in memoria"); + lgInfo($"STEP 04: memorizzati {dataItemMem.Count} oggetti in memoria"); } else { - lgError("STEP 06 error: document null!"); + lgError("STEP 05 error: document null!"); } } @@ -751,6 +802,7 @@ namespace IOB_WIN_NEXT.Iob /// protected void StreamsSuccessful(MTConnectStreams.Document document) { + lgTrace("STEP 01 StreamsSuccessful reached!"); checkAndSend(document, false); } @@ -909,119 +961,125 @@ namespace IOB_WIN_NEXT.Iob { // init a zero... B_input = 0; - - /* ----------------------------------------------------- - * bitmap MAPO - * B0: POWER_ON - * B1: RUN - * B2: pzCount - * B3: allarme - * B4: manuale - * B5: emergenza (dipende da state machine se riportare 1 = armata/premuta, vedere conf mtcParams.emergencyArmedTrue) - ----------------------------------------------------- */ - - // Controllo booleano PING e POWERON... - string currPowerOn = getDataItemValue(mtcParams.condPowerOn.keyName); - // se valido il check ping lo eseguo... altrimenti lo do x buono - bool isPingOk = (testPingMachine == IPStatus.Success); - - // verifico da target value richiesto... - bool checkPowerOn = (currPowerOn == mtcParams.condPowerOn.targetValue); - - // bit 0 (poweron) imposto a 1 SE pingo o PowerOn=="ON"... - B_input = ((isPingOk && mtcParams.pingAsPowerOn) || checkPowerOn) ? 1 : 0; - - // variabili RUN... - string currRun = getDataItemValue(mtcParams.keyRunMode); - - // controllo RUN MODE preliminare... CABLATO - è GENERALE x MTC - if (currRun == "AUTOMATIC" || currRun == "SEMI_AUTO" || currRun == "SEMI_AUTOMATIC") + if (queueInEnabCurr) { - int numCond = mtcParams.condWork.Count; - int numCondOk = 0; - // cerco nell'elenco delle condizioni che indicano lavora se sono ok faccio +1 conteggio...... - foreach (var item in mtcParams.condWork) + /* ----------------------------------------------------- + * bitmap MAPO + * B0: POWER_ON + * B1: RUN + * B2: pzCount + * B3: allarme + * B4: manuale + * B5: emergenza (dipende da state machine se riportare 1 = armata/premuta, vedere conf mtcParams.emergencyArmedTrue) + ----------------------------------------------------- */ + + // Controllo booleano PING e POWERON... + string currPowerOn = getDataItemValue(mtcParams.condPowerOn.keyName); + // se valido il check ping lo eseguo... altrimenti lo do x buono + bool isPingOk = mtcParams.pingAsPowerOn && (testPingMachine == IPStatus.Success); + + // verifico da target value richiesto... + bool checkPowerOn = (currPowerOn == mtcParams.condPowerOn.targetValue); + + // bit 0 (poweron) imposto a 1 SE pingo o PowerOn=="ON"... + B_input = (isPingOk || checkPowerOn) ? 1 : 0; + + // variabili RUN... + string currRun = getDataItemValue(mtcParams.keyRunMode); + + // controllo RUN MODE preliminare... CABLATO - è GENERALE x MTC + if (currRun == "AUTOMATIC" || currRun == "SEMI_AUTO" || currRun == "SEMI_AUTOMATIC") { - if (getDataItemValue(item.keyName) == item.targetValue) + int numCond = mtcParams.condWork.Count; + int numCondOk = 0; + // cerco nell'elenco delle condizioni che indicano lavora se sono ok faccio +1 conteggio...... + foreach (var item in mtcParams.condWork) { - numCondOk++; + if (getDataItemValue(item.keyName) == item.targetValue) + { + numCondOk++; + } + } + // se tutte condizioni rispettate --> lavora! + if (numCond == numCondOk) + { + // RUN = LAVORA! + B_input += (1 << 1); } } - // se tutte condizioni rispettate --> lavora! - if (numCond == numCondOk) + // se ho almeno 1 allarme E NON SONO IN AUTO --> ALARM! + else if (hasError) { - // RUN = LAVORA! - B_input += (1 << 1); + B_input += (1 << 3); + } + else + { + // se ho run mode != auto --> manual + B_input += (1 << 4); } - } - // se ho almeno 1 allarme E NON SONO IN AUTO --> ALARM! - else if (hasError) - { - B_input += (1 << 3); - } - else - { - // se ho run mode != auto --> manual - B_input += (1 << 4); - } - // emergenza armata da riportare con bit True/ 1 - if (mtcParams.emergencyArmedTrue) - { - //se NON premuta lazo il bit - if (!hasEStopTriggered) + // emergenza armata da riportare con bit True/ 1 + if (mtcParams.emergencyArmedTrue) { - B_input += (1 << 5); - } - } - // emergenza armata da riportare come False/0 (!mtcParams.emergencyArmedTrue) - else - { - // se premuta alzo il bit... - if (hasEStopTriggered) - { - B_input += (1 << 5); - } - } - - DateTime adesso = DateTime.Now; - int vFactor = 1; - // controllo SE HO dati per fare verifiche... - if (string.IsNullOrEmpty(currRun)) - { - // se ho parametro x gestione reset... - if (enableMtcRestart) - { - // controllo se ho ricevuto il current da OLTRE 1 minuto... - if (lastCurrent.AddMinutes(3) < adesso) + //se NON premuta lazo il bit + if (!hasEStopTriggered) { - lastCurrent = adesso; - // stop... - lgInfo("Fermato MTC_ref per mancanza dati current"); - MTC_ref.Stop(); - Thread.Sleep(1000); - // restart - lgInfo("Riavviato MTC_ref per mancanza dati current"); - MTC_ref.Start(); + B_input += (1 << 5); } } + // emergenza armata da riportare come False/0 (!mtcParams.emergencyArmedTrue) + else + { + // se premuta alzo il bit... + if (hasEStopTriggered) + { + B_input += (1 << 5); + } + } + + DateTime adesso = DateTime.Now; + int vFactor = 1; + // controllo SE HO dati per fare verifiche... + if (string.IsNullOrEmpty(currRun)) + { + // se ho parametro x gestione reset... + if (enableMtcRestart) + { + // controllo se ho ricevuto il current da OLTRE 1 minuto... + if (lastCurrent.AddMinutes(3) < adesso) + { + lastCurrent = adesso; + // stop... + lgInfo("Fermato MTC_ref per mancanza dati current"); + MTC_ref.Stop(); + Thread.Sleep(1000); + // restart + lgInfo("Riavviato MTC_ref per mancanza dati current"); + MTC_ref.Start(); + } + } + } + else + { + vFactor = 6; + } + + // solo se non ho veto check + if (vetoCheckStatus < adesso) + { + lgInfo($"Stato variabili: currRun: {currRun}"); + // imposto veto per vetoSeconds... + vetoCheckStatus = adesso.AddSeconds(vetoSeconds * vFactor); + } + // log opzionale! + if (verboseLog) + { + lgInfo($"Trasformazione B_input: {B_input} | currRun = {currRun}"); + } } else { - vFactor = 6; - } - - // solo se non ho veto check - if (vetoCheckStatus < adesso) - { - lgInfo($"Stato variabili: currRun: {currRun}"); - // imposto veto per vetoSeconds... - vetoCheckStatus = adesso.AddSeconds(vetoSeconds * vFactor); - } - // log opzionale! - if (verboseLog) - { - lgInfo($"Trasformazione B_input: {B_input} | currRun = {currRun}"); + lgDebug($"[VETO getDataItemValue] | veto attivo alle {DateTime.Now:yyyy.MM.dd HH:mm:ss}"); } } @@ -1031,6 +1089,8 @@ namespace IOB_WIN_NEXT.Iob /// private short doConnect() { + isConnecting = true; + startConnecting = DateTime.Now; short esitoLink = 0; // reset memoria dataItem.. dataItemMem = new Dictionary(); @@ -1079,6 +1139,7 @@ namespace IOB_WIN_NEXT.Iob } catch { } + isConnecting = false; return esitoLink; } @@ -1232,7 +1293,7 @@ namespace IOB_WIN_NEXT.Iob try { mtcParams = JsonConvert.DeserializeObject(jsonData); - lgInfo($"Decodifica aree MtcParamConf: trovati {mtcParams.paramsEndThresh.Count} valori paramsEndThresh"); + lgInfo($"Decodifica aree MtcParamConf | condPowerOn: {mtcParams.condPowerOn.keyName}={mtcParams.condPowerOn.targetValue} | condWork: {mtcParams.condWork.Count} | keyPartCount: {mtcParams.keyPartCount} | itemTranslation: {mtcParams.itemTranslation.Count} | fluxLogVeto: {mtcParams.fluxLogVeto.Count} | paramsEndThresh: {mtcParams.paramsEndThresh.Count} "); } catch (Exception exc) { diff --git a/IOB-WIN-NEXT/Iob/OSAI.cs b/IOB-WIN-NEXT/Iob/OSAI.cs index 731f291a..10a3a18f 100644 --- a/IOB-WIN-NEXT/Iob/OSAI.cs +++ b/IOB-WIN-NEXT/Iob/OSAI.cs @@ -471,6 +471,7 @@ namespace IOB_WIN_NEXT.Iob if (connectionOk) { dtAvvioAdp = DateTime.Now; + queueInEnabCurr = true; if (adpRunning) { lgInfo("Connessione OK"); @@ -536,6 +537,7 @@ namespace IOB_WIN_NEXT.Iob { lgError("IMPOSSIBILE effettuare disconnessione: Connessione non disponibile..."); } + queueInEnabCurr = false; } #endregion Public Methods diff --git a/IOB-WIN-NEXT/Iob/Omron.cs b/IOB-WIN-NEXT/Iob/Omron.cs index 7f463ba3..5a823283 100644 --- a/IOB-WIN-NEXT/Iob/Omron.cs +++ b/IOB-WIN-NEXT/Iob/Omron.cs @@ -207,6 +207,7 @@ namespace IOB_WIN_NEXT.Iob // refresh stato connessione!!! if (connectionOk) { + queueInEnabCurr = true; if (adpRunning) { lgInfo("Connessione OK"); @@ -271,6 +272,7 @@ namespace IOB_WIN_NEXT.Iob { lgError("IMPOSSIBILE effettuare disconnessione OMRON: Connessione non disponibile..."); } + queueInEnabCurr = false; } #endregion Public Methods diff --git a/IOB-WIN-NEXT/Iob/Simula.cs b/IOB-WIN-NEXT/Iob/Simula.cs index 5e2ce135..c7d112c6 100644 --- a/IOB-WIN-NEXT/Iob/Simula.cs +++ b/IOB-WIN-NEXT/Iob/Simula.cs @@ -156,10 +156,24 @@ namespace IOB_WIN_NEXT.Iob } if (hasRecipe) { - // effettua process ritorno ricette - processRecipeFileRet(); - // eseguo verifica/lancio ricette - RecipeDoProcCons(); + try + { + // effettua process ritorno ricette + processRecipeFileRet(); + } + catch (Exception exc) + { + lgError($"Eccezione in TEST processRecipeFileRet{Environment.NewLine}{exc}"); + } + try + { + // eseguo verifica/lancio ricette + RecipeDoProcCons(); + } + catch (Exception exc) + { + lgError($"Eccezione in TEST RecipeDoProcCons{Environment.NewLine}{exc}"); + } } } diff --git a/IOB-WIN-NEXT/IobBeckhoff/Beckhoff.cs b/IOB-WIN-NEXT/IobBeckhoff/Beckhoff.cs index 56b3e36c..f76d6205 100644 --- a/IOB-WIN-NEXT/IobBeckhoff/Beckhoff.cs +++ b/IOB-WIN-NEXT/IobBeckhoff/Beckhoff.cs @@ -118,6 +118,7 @@ namespace IOB_WIN_NEXT.IobBeckhoff { setEventHandler(); readCurrVal(); + queueInEnabCurr = true; } lgInfo($"Connected: {connectionOk}"); } @@ -134,6 +135,7 @@ namespace IOB_WIN_NEXT.IobBeckhoff AdsCli.dispose(); } connectionOk = false; + queueInEnabCurr = false; } #endregion Public Methods diff --git a/IOB-WIN-NEXT/IobConfiguration.cs b/IOB-WIN-NEXT/IobConfiguration.cs index a5f406a6..84fbabca 100644 --- a/IOB-WIN-NEXT/IobConfiguration.cs +++ b/IOB-WIN-NEXT/IobConfiguration.cs @@ -60,6 +60,11 @@ namespace IOB_WIN_NEXT /// public bool disableExeTask { get; set; } = false; + /// + /// Indica se le code vadano gestite su redis o meno + /// + public bool EnableRedisQueue { get; set; } = false; + /// /// Indica che sono disabilitate le fasi controllo stato/semafori (tipicamente x impianti /// con PLC "suddivisi", PLC + HMI) diff --git a/IOB-WIN-NEXT/IobFile/FileEurom63.cs b/IOB-WIN-NEXT/IobFile/FileEurom63.cs index ca28132e..ceb5c237 100644 --- a/IOB-WIN-NEXT/IobFile/FileEurom63.cs +++ b/IOB-WIN-NEXT/IobFile/FileEurom63.cs @@ -413,6 +413,7 @@ namespace IOB_WIN_NEXT.IobFile var nextLevel = Eurom63.ComLevel.IsConnected; var connectSession = confE63.ActiveSessions[0]; processSession(nextLevel, ref connectSession); + queueInEnabCurr = true; } /// @@ -421,6 +422,7 @@ namespace IOB_WIN_NEXT.IobFile public override void tryDisconnect() { connectionOk = false; + queueInEnabCurr = false; try { abortPrevJob(); diff --git a/IOB-WIN-NEXT/IobFile/FileGen.cs b/IOB-WIN-NEXT/IobFile/FileGen.cs index 1556a21a..7f1ccea7 100644 --- a/IOB-WIN-NEXT/IobFile/FileGen.cs +++ b/IOB-WIN-NEXT/IobFile/FileGen.cs @@ -199,6 +199,7 @@ namespace IOB_WIN_NEXT.IobFile connectionOk = Directory.Exists(BaseDir); if (connectionOk) { + queueInEnabCurr = true; #if false try { @@ -225,6 +226,7 @@ namespace IOB_WIN_NEXT.IobFile public override void tryDisconnect() { connectionOk = false; + queueInEnabCurr = false; try { #if false diff --git a/IOB-WIN-NEXT/IobFile/IobFileSoitaab.cs b/IOB-WIN-NEXT/IobFile/IobFileSoitaab.cs index 8aee27e4..e165f522 100644 --- a/IOB-WIN-NEXT/IobFile/IobFileSoitaab.cs +++ b/IOB-WIN-NEXT/IobFile/IobFileSoitaab.cs @@ -2,6 +2,7 @@ using IOB_UT_NEXT; using MapoSDK; using Newtonsoft.Json; +using OpenQA.Selenium; using System; using System.Collections.Generic; using System.IO; @@ -57,7 +58,9 @@ namespace IOB_WIN_NEXT.IobFile } } catch (Exception exc) - { } + { + lgError($"Eccezione in IobFileSoitaab{Environment.NewLine}{exc}"); + } lastPING = DateTime.Now.AddHours(-1); } @@ -158,6 +161,7 @@ namespace IOB_WIN_NEXT.IobFile // refresh stato connessione!!! if (connectionOk) { + queueInEnabCurr = true; if (adpRunning) { lgInfo($"Connessione OK alla folder {logDirPath}"); @@ -198,6 +202,7 @@ namespace IOB_WIN_NEXT.IobFile { // registro solo che è disconnesso connectionOk = false; + queueInEnabCurr = false; } #endregion Public Methods @@ -525,14 +530,23 @@ namespace IOB_WIN_NEXT.IobFile int valInt = decodeSoitaabLog(sLog2send.valString); string currVal = getEncodSigLog(sLog2send.dtRif, valInt, counterSigIN); - // --> accodo (valore già formattato)! - QueueIN.Enqueue(currVal); - // loggo! - lgTrace(string.Format("[QUEUE-IN] {0}", currVal)); - counterSigIN++; - if (counterSigIN > 9999) + // verifico non sia in veto invio iniziale... + if (queueInEnabCurr) { - counterSigIN = 0; + // --> accodo (valore già formattato)! + QueueIN.Enqueue(currVal); + // loggo! + lgTrace(string.Format("[QUEUE-IN] {0}", currVal)); + counterSigIN++; + if (counterSigIN > 9999) + { + counterSigIN = 0; + } + } + else + { + lgDebug($"[VETO FOR QUEUE-IN] | {currVal} - MESSAGE NOT SENT | {adesso:yyyyMMdd_HHmmss}"); + checkVetoQueueIn(); } } diff --git a/IOB-WIN-NEXT/IobModbusTCP/ModbusTCP.cs b/IOB-WIN-NEXT/IobModbusTCP/ModbusTCP.cs index d4ce44e0..3e955be1 100644 --- a/IOB-WIN-NEXT/IobModbusTCP/ModbusTCP.cs +++ b/IOB-WIN-NEXT/IobModbusTCP/ModbusTCP.cs @@ -523,6 +523,7 @@ namespace IOB_WIN_NEXT.IobModbusTCP // refresh stato allarmi!!! if (connectionOk) { + queueInEnabCurr = true; lgInfo($"Connessione OK: {connectionOk}"); if (adpRunning) { @@ -582,6 +583,7 @@ namespace IOB_WIN_NEXT.IobModbusTCP } } connectionOk = false; + queueInEnabCurr = false; // resetto last ping... lastPING = DateTime.Now.AddMinutes(-1); } diff --git a/IOB-WIN-NEXT/IobNet/IcoelSoap.cs b/IOB-WIN-NEXT/IobNet/IcoelSoap.cs index b26f9036..ae821569 100644 --- a/IOB-WIN-NEXT/IobNet/IcoelSoap.cs +++ b/IOB-WIN-NEXT/IobNet/IcoelSoap.cs @@ -282,6 +282,7 @@ namespace IOB_WIN_NEXT.IobNet // refresh stato connessione!!! if (connectionOk) { + queueInEnabCurr = true; if (adpRunning) { lgInfo("Connessione OK"); @@ -320,6 +321,7 @@ namespace IOB_WIN_NEXT.IobNet { // registro solo che è disconnesso connectionOk = false; + queueInEnabCurr = false; } #endregion Public Methods diff --git a/IOB-WIN-NEXT/IobNet/Ping.cs b/IOB-WIN-NEXT/IobNet/Ping.cs index 519606c9..24506c67 100644 --- a/IOB-WIN-NEXT/IobNet/Ping.cs +++ b/IOB-WIN-NEXT/IobNet/Ping.cs @@ -1,6 +1,7 @@ using IOB_UT_NEXT; using MapoSDK; using System; +using System.Linq; using System.Net.NetworkInformation; namespace IOB_WIN_NEXT.IobNet @@ -9,10 +10,7 @@ namespace IOB_WIN_NEXT.IobNet { #region Public Constructors - /// - /// Estende l'init della classe base - /// - /// + /// Estende l'init della classe base public Ping(AdapterForm caller, IobConfiguration IOBConf) : base(caller, IOBConf) { lgInfo("NEW IobPing (WatchDog)"); @@ -21,11 +19,16 @@ namespace IOB_WIN_NEXT.IobNet lastPzCountSend = adesso; lastWarnODL = adesso; vetoCheckStatus = adesso; + // 2023.09.05 imposto anche primo ping e check disconnected... + lastPING = adesso; + lastDisconnCheck = adesso; var POWEROFF_TIMEOUT_SEC = getOptPar("POWEROFF_TIMEOUT_SEC"); if (!string.IsNullOrEmpty(POWEROFF_TIMEOUT_SEC)) { int.TryParse(POWEROFF_TIMEOUT_SEC, out PoweroffTimeoutSec); } + // fix coda ping + PingQueue = new DataQueue("000", "PingQueue", false); lgDebug($"L'adapter effettuera' PING di controllo all'indirizzo {cIobConf.cncPingAddr} per forzare stato poweroff dopo {PoweroffTimeoutSec} sec"); } @@ -56,8 +59,8 @@ namespace IOB_WIN_NEXT.IobNet } /// - /// Effettua lettura semafori principale - /// Parametri da aggiornare x display in form + /// Effettua lettura semafori principale Parametri da + /// aggiornare x display in form /// public override void readSemafori(ref newDisplayData currDispData) { @@ -68,10 +71,16 @@ namespace IOB_WIN_NEXT.IobNet // in primis salvo data ping comunque... lastPING = DateTime.Now; + // salvo esito ping + bool pingOK = testPingMachine == IPStatus.Success; + addTest(pingOK); + // se passa il ping faccio il resto... - if (testPingMachine == IPStatus.Success) + if (pingStatusOk()) { connectionOk = true; + lastReadPLC = DateTime.Now; + lastWatchDog = DateTime.Now; } else { @@ -96,15 +105,30 @@ namespace IOB_WIN_NEXT.IobNet } } + public override void startAdapter(bool resetQueue) + { + base.startAdapter(resetQueue); + // 2023.09.05 imposto anche primo ping e check disconnected... + DateTime adesso = DateTime.Now; + lastWatchDog = adesso; + //lastPING = adesso; + lastReadPLC = adesso; + lastDisconnCheck = adesso; + // faccio un primo check POST ritardo + tryConnect(); + } + /// /// Override connessione /// public override void tryConnect() { bool doLog = (verboseLog || periodicLog); - lgDebug("PING: tryConnect step 01"); + lgDebug($"PING: tryConnect step 01 | connectionOk: {connectionOk}"); if (!connectionOk) { + //// resetto coda... + //PingQueue = new DataQueue("000", "PingQueue", false); // controllo che il ping sia stato tentato almeno pingTestSec fa... if (DateTime.Now.Subtract(lastPING).TotalSeconds > utils.CRI("pingTestSec")) { @@ -114,18 +138,23 @@ namespace IOB_WIN_NEXT.IobNet } lgDebug("PING: tryConnect step 04"); + lgDebug("PING: Reset PingQueue"); + + bool pingOK = testPingMachine == IPStatus.Success; + addTest(pingOK); + // se passa il ping faccio il resto... - if (testPingMachine == IPStatus.Success) + if (pingStatusOk()) { // in primis salvo data ping... lastPING = DateTime.Now; connectionOk = true; + queueInEnabCurr = true; lgInfo("PING OK"); } else { // loggo no risposta ping ... - connectionOk = false; lgError("PING KO"); } } @@ -139,12 +168,23 @@ namespace IOB_WIN_NEXT.IobNet { lgInfo("Richiesta disconnessione adapter PING!"); connectionOk = false; + queueInEnabCurr = false; } #endregion Public Methods #region Protected Fields + /// + /// Dimensione coda di ping x valutazione + /// + protected int maxQueuePing = 11; + + /// + /// Coda degli esiti di ping x calcolo stato macchina + /// + protected DataQueue PingQueue = new DataQueue("000", "PingQueue", false); + protected int PoweroffTimeoutSec = 100; /// @@ -153,5 +193,49 @@ namespace IOB_WIN_NEXT.IobNet protected DateTime vetoCheckStatus = DateTime.Now; #endregion Protected Fields + + #region Protected Methods + + protected void addTest(bool pingOk) + { + int score = pingOk ? 1 : 0; + // controllo: se era spenta e risulta ping ok --> reset coda! + if (B_input == 0 && pingOk) + { + B_input = 1; + PingQueue = new DataQueue("000", "PingQueue", false); + lgTrace($"PingQueue resetted on addTest"); + } + PingQueue.Enqueue($"{score}"); + while (PingQueue.Count > maxQueuePing) + { + string res = ""; + PingQueue.TryDequeue(out res); + } + } + + /// calcola status ping: + /// - se ha < 50% coda richiesta --> true + /// - se ha > 50% del max coda --> true se èmaggior parte a 1 (true) + protected bool pingStatusOk() + { + bool answ = true; + int numVal = PingQueue.Count; + if (numVal > maxQueuePing / 2) + { + var listaValori = PingQueue.ToList(); + int numOk = listaValori.Where(x => x == "1").Count(); + int numKo = numVal - numOk; + answ = numOk >= numKo; + lgTrace($"PING ok per: {numOk} > {numKo}"); + } + else + { + lgTrace("PING ok per mancanza dati minimi test"); + } + return answ; + } + + #endregion Protected Methods } } \ No newline at end of file diff --git a/IOB-WIN-NEXT/IobNet/WebPageScrap.cs b/IOB-WIN-NEXT/IobNet/WebPageScrap.cs index 20b461e8..d1ae3b44 100644 --- a/IOB-WIN-NEXT/IobNet/WebPageScrap.cs +++ b/IOB-WIN-NEXT/IobNet/WebPageScrap.cs @@ -203,6 +203,7 @@ namespace IOB_WIN_NEXT.IobNet connectionOk = (testPingMachine == IPStatus.Success); if (connectionOk) { + queueInEnabCurr = true; try { //var t = TaskEx.Run(() => startDriver()); @@ -229,6 +230,7 @@ namespace IOB_WIN_NEXT.IobNet public override void tryDisconnect() { connectionOk = false; + queueInEnabCurr = false; try { // in primis chiudo driver... diff --git a/IOB-WIN-NEXT/IobOpc/OpcUa.cs b/IOB-WIN-NEXT/IobOpc/OpcUa.cs index f8291839..586899fe 100644 --- a/IOB-WIN-NEXT/IobOpc/OpcUa.cs +++ b/IOB-WIN-NEXT/IobOpc/OpcUa.cs @@ -109,7 +109,7 @@ namespace IOB_WIN_NEXT.IobOpc lastPzCountSend = adesso; lastWarnODL = adesso; lastCurrent = adesso; - lgTrace($"Aggiornato IobOpcUa.lastCurrent: {lastCurrent}"); + lgTrace($"Aggiornato IobOpcUa.lastCurrent: {lastCurrent}"); // ora leggo il file di conf specifico.... string jsonFileName = getOptPar("OPC_PARAM_CONF"); if (!string.IsNullOrEmpty(jsonFileName)) @@ -543,10 +543,10 @@ namespace IOB_WIN_NEXT.IobOpc parentForm.commPlcActive = false; // connesso se esito == 1... connectionOk = (esitoLink == 1); - //connectionOk = true; // refresh stato allarmi!!! if (connectionOk) { + queueInEnabCurr = true; if (adpRunning) { lgInfo("Connessione OK"); @@ -618,6 +618,7 @@ namespace IOB_WIN_NEXT.IobOpc { lgDebug("IMPOSSIBILE effettuare disconnessione OpcUa: Connessione non disponibile..."); } + queueInEnabCurr = false; } #endregion Public Methods diff --git a/IOB-WIN-NEXT/IobSiemens/Siemens.cs b/IOB-WIN-NEXT/IobSiemens/Siemens.cs index 1312b883..38bf79dd 100644 --- a/IOB-WIN-NEXT/IobSiemens/Siemens.cs +++ b/IOB-WIN-NEXT/IobSiemens/Siemens.cs @@ -1032,6 +1032,7 @@ namespace IOB_WIN_NEXT.IobSiemens // refresh stato allarmi!!! if (connectionOk) { + queueInEnabCurr = true; if (adpRunning) { lgInfo($"Connessione OK: {connectionOk} | adpRunning: {adpRunning}"); @@ -1080,6 +1081,7 @@ namespace IOB_WIN_NEXT.IobSiemens { currPLC.Close(); connectionOk = false; + queueInEnabCurr = false; lgInfo(szStatusConnection); lgInfo("Effettuata disconnessione adapter SIEMENS!"); } diff --git a/IOB-WIN-NEXT/IobSql/IcoelDb.cs b/IOB-WIN-NEXT/IobSql/IcoelDb.cs index af9d0b2b..c7ae6c9b 100644 --- a/IOB-WIN-NEXT/IobSql/IcoelDb.cs +++ b/IOB-WIN-NEXT/IobSql/IcoelDb.cs @@ -207,6 +207,7 @@ namespace IOB_WIN_NEXT.IobSql // refresh stato connessione!!! if (connectionOk) { + queueInEnabCurr = true; if (adpRunning) { lgInfo("Connessione OK"); @@ -246,6 +247,7 @@ namespace IOB_WIN_NEXT.IobSql { // registro solo che è disconnesso connectionOk = false; + queueInEnabCurr = false; } #endregion Public Methods diff --git a/IOB-WIN-NEXT/IobSql/SqlServLantek.cs b/IOB-WIN-NEXT/IobSql/SqlServLantek.cs index 0d052fa3..1f991c4a 100644 --- a/IOB-WIN-NEXT/IobSql/SqlServLantek.cs +++ b/IOB-WIN-NEXT/IobSql/SqlServLantek.cs @@ -14,7 +14,7 @@ namespace IOB_WIN_NEXT.IobSql { /// /// Adapter specializzato per LANTEK e le chiamate tramite DB per i dati - /// - PODL (ordini MES --> MACCHINA) + /// - PODL (ordini MES --> MACCHINA) /// - ProdLog (da NestingDaLantek + RigheNestingDaLantek) /// @@ -37,6 +37,7 @@ namespace IOB_WIN_NEXT.IobSql string SyncStateCTout = getOptPar("SyncStateCTout"); string VetoReadSec = getOptPar("VetoReadSec"); string VetoSyncSec = getOptPar("VetoSyncSec"); + string sFullPodlUrl = getOptPar("FullPodlUrl"); setupSpecialParams(); @@ -55,6 +56,10 @@ namespace IOB_WIN_NEXT.IobSql { int.TryParse(VetoSyncSec, out VetoSyncDbSec); } + if (!string.IsNullOrEmpty(sFullPodlUrl)) + { + bool.TryParse(sFullPodlUrl, out FullPodlUrl); + } // avvio DB controller dbProxy = new DbController(connSyncState); @@ -291,6 +296,7 @@ namespace IOB_WIN_NEXT.IobSql // refresh stato connessione!!! if (connectionOk) { + queueInEnabCurr = true; if (adpRunning) { lgInfo("Connessione OK"); @@ -330,12 +336,14 @@ namespace IOB_WIN_NEXT.IobSql { // registro solo che è disconnesso connectionOk = false; + queueInEnabCurr = false; } #endregion Public Methods #region Protected Fields + protected bool FullPodlUrl = false; protected int vetoReadDbSec = 3; protected int VetoSyncDbSec = 20; @@ -469,13 +477,31 @@ namespace IOB_WIN_NEXT.IobSql { foreach (var sLog2send in data2send) { - // se il record è apertura PODL chiamo apertura - - trySetupPODL(0); - - // se il record è chiusura PODL chiamo chiusura... DOPO aver cercato PODL - // --> ODL - tryClosePODL(0); + if (sLog2send.Action == "StartOrd") + { + if (FullPodlUrl) + { + // se il record è apertura PODL chiamo apertura + trySetupPODL(sLog2send.IdxPodl, true, sLog2send.DtEve, DateTime.Now); + } + else + { + trySetupPODL(0); + } + } + else if (sLog2send.Action == "EndOrd") + { + // se il record è chiusura PODL chiamo chiusura... DOPO aver cercato + // PODL --> ODL + if (FullPodlUrl) + { + tryClosePODL(sLog2send.IdxPodl, sLog2send.DtEve, DateTime.Now); + } + else + { + tryClosePODL(0); + } + } } } diff --git a/IOB-WIN-NEXT/IobSql/SqlServPama.cs b/IOB-WIN-NEXT/IobSql/SqlServPama.cs index 82f9163c..c1f9d8c6 100644 --- a/IOB-WIN-NEXT/IobSql/SqlServPama.cs +++ b/IOB-WIN-NEXT/IobSql/SqlServPama.cs @@ -37,6 +37,7 @@ namespace IOB_WIN_NEXT.IobSql string SyncStateCTout = getOptPar("SyncStateCTout"); string VetoReadSec = getOptPar("VetoReadSec"); string VetoSyncSec = getOptPar("VetoSyncSec"); + string sFullPodlUrl = getOptPar("FullPodlUrl"); string connSyncState = $"data source={SyncStateServ};initial catalog={SyncStateDb};persist security info=True;user id={SyncStateUser};password={SyncStatePwd};MultipleActiveResultSets=True;App=IOB-WIN-NEXT"; @@ -53,6 +54,10 @@ namespace IOB_WIN_NEXT.IobSql { int.TryParse(VetoSyncSec, out VetoSyncDbSec); } + if (!string.IsNullOrEmpty(sFullPodlUrl)) + { + bool.TryParse(sFullPodlUrl, out FullPodlUrl); + } // eccezione: NON TROVA EntityFramework 6.0.0 o successivo... why?!? dbProxy = new DbController(connSyncState); @@ -293,6 +298,7 @@ namespace IOB_WIN_NEXT.IobSql // refresh stato connessione!!! if (connectionOk) { + queueInEnabCurr = true; if (adpRunning) { lgInfo("Connessione OK"); @@ -332,12 +338,14 @@ namespace IOB_WIN_NEXT.IobSql { // registro solo che è disconnesso connectionOk = false; + queueInEnabCurr = false; } #endregion Public Methods #region Protected Fields + protected bool FullPodlUrl = false; protected int vetoReadDbSec = 3; protected int VetoSyncDbSec = 20; @@ -536,25 +544,33 @@ namespace IOB_WIN_NEXT.IobSql { foreach (var sLog2send in data2send) { - // se il record è apertura PODL chiamo apertura - - trySetupPODL(0); - - // se il record è chiusura PODL chiamo chiusura... - // DOPO aver cercato PODL --> ODL - tryClosePODL(0); -#if false - 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) + if (sLog2send.Action == "StartOrd") { - counterSigIN = 0; + if (FullPodlUrl) + { + // se il record è apertura PODL chiamo apertura + trySetupPODL(sLog2send.IdxPodl); + //trySetupPODL(sLog2send.IdxPodl, true, sLog2send.DtEve, DateTime.Now); + } + else + { + trySetupPODL(0); + } + } + else if (sLog2send.Action == "EndOrd") + { + // se il record è chiusura PODL chiamo chiusura... DOPO aver cercato + // PODL --> ODL + if (FullPodlUrl) + { + tryClosePODL(sLog2send.IdxPodl); + //tryClosePODL(sLog2send.IdxPodl, sLog2send.DtEve, DateTime.Now); + } + else + { + tryClosePODL(0); + } } -#endif } } @@ -625,14 +641,23 @@ namespace IOB_WIN_NEXT.IobSql 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) + // verifico non sia in veto invio iniziale... + if (queueInEnabCurr) { - counterSigIN = 0; + // --> accodo (valore già formattato)! + QueueIN.Enqueue(currVal); + // loggo! + lgTrace(string.Format("[QUEUE-IN] {0}", currVal)); + counterSigIN++; + if (counterSigIN > 9999) + { + counterSigIN = 0; + } + } + else + { + lgDebug($"[VETO FOR QUEUE-IN] | {currVal} - MESSAGE NOT SENT | {adesso:yyyyMMdd_HHmmss}"); + checkVetoQueueIn(); } } } diff --git a/IOB-WIN-NEXT/MainForm.cs b/IOB-WIN-NEXT/MainForm.cs index 6e867f05..aec6ac27 100644 --- a/IOB-WIN-NEXT/MainForm.cs +++ b/IOB-WIN-NEXT/MainForm.cs @@ -47,22 +47,29 @@ namespace IOB_WIN_NEXT // salvo aprametri avvio... saveArgs(args); // continuo iNIT!!! - InitializeComponent(); - myInit(); - if (args != null) + try { - if (args.Length > 0) + InitializeComponent(); + myInit(); + if (args != null) { - lgInfo("Argomenti di avvio:"); - foreach (var item in myArgs) + if (args.Length > 0) { - lgInfo(item); + lgInfo("Argomenti di avvio:"); + foreach (var item in myArgs) + { + lgInfo(item); + } + } + else + { + lgInfo("NESSUN Argomento di avvio trovato"); } } - else - { - lgInfo("NESSUN Argomento di avvio trovato"); - } + } + catch(Exception exc) + { + lgError($"Errore in avvio MainForm:{Environment.NewLine}{exc}"); } } diff --git a/IOB-WIN-NEXT/Program.cs b/IOB-WIN-NEXT/Program.cs index 562de392..621d64c5 100644 --- a/IOB-WIN-NEXT/Program.cs +++ b/IOB-WIN-NEXT/Program.cs @@ -16,12 +16,7 @@ namespace IOB_WIN_NEXT { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - try - { - Application.Run(new MainForm(args)); - } - catch - { } + Application.Run(new MainForm(args)); } #endregion Private Methods diff --git a/IOB-WIN-NEXT/Properties/Settings.Designer.cs b/IOB-WIN-NEXT/Properties/Settings.Designer.cs index 9e4e3008..6e913356 100644 --- a/IOB-WIN-NEXT/Properties/Settings.Designer.cs +++ b/IOB-WIN-NEXT/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace IOB_WIN_NEXT.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.1.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.7.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); diff --git a/IOB-WIN-NEXT/packages.config b/IOB-WIN-NEXT/packages.config index 0b984b3f..14f4d644 100644 --- a/IOB-WIN-NEXT/packages.config +++ b/IOB-WIN-NEXT/packages.config @@ -1,39 +1,91 @@  - + + - + + - + + + + + + + + - + - - - - - + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/IOB-WIN-NEXT/postBuildTgt.bat b/IOB-WIN-NEXT/postBuildTgt.bat index 740d4abd..39e366e6 100644 --- a/IOB-WIN-NEXT/postBuildTgt.bat +++ b/IOB-WIN-NEXT/postBuildTgt.bat @@ -39,8 +39,9 @@ if %1 == "Remote_DEBUG" goto RemoteDebug :Release REM INIZIO eliminando i files pdb del /S %2"*.pdb"" +del /S %2"*.xml"" del /S %2"lib/*.pdb"" -echo Release: eliminato pdb!!! +echo Release: eliminato pdb + xml!!! goto END :Debug diff --git a/TestClientMan/IobManComm/IobManComm.csproj b/TestClientMan/IobManComm/IobManComm.csproj index b0fb1852..a1b3f7ca 100644 --- a/TestClientMan/IobManComm/IobManComm.csproj +++ b/TestClientMan/IobManComm/IobManComm.csproj @@ -55,7 +55,7 @@ ..\packages\System.Diagnostics.PerformanceCounter.5.0.0\lib\net461\System.Diagnostics.PerformanceCounter.dll - + ..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll diff --git a/TestClientMan/IobManComm/app.config b/TestClientMan/IobManComm/app.config index e69d1fcf..7bfe8a14 100644 --- a/TestClientMan/IobManComm/app.config +++ b/TestClientMan/IobManComm/app.config @@ -4,7 +4,7 @@ - + diff --git a/TestClientMan/TestClientMan/App.config b/TestClientMan/TestClientMan/App.config index 960744d0..3306ae92 100644 --- a/TestClientMan/TestClientMan/App.config +++ b/TestClientMan/TestClientMan/App.config @@ -8,7 +8,7 @@ - + diff --git a/TestClientMan/TestClientVB/App.config b/TestClientMan/TestClientVB/App.config index dd73f870..f938ae90 100644 --- a/TestClientMan/TestClientVB/App.config +++ b/TestClientMan/TestClientVB/App.config @@ -7,7 +7,7 @@ - + diff --git a/TestClientMan/TestClientVB/TestClientVB.vbproj b/TestClientMan/TestClientVB/TestClientVB.vbproj index e4a654e3..b509f594 100644 --- a/TestClientMan/TestClientVB/TestClientVB.vbproj +++ b/TestClientMan/TestClientVB/TestClientVB.vbproj @@ -76,7 +76,7 @@ ..\packages\IobManComm.0.9.2210.2716\lib\System.Diagnostics.PerformanceCounter.dll - + ..\packages\IobManComm.0.9.2210.2716\lib\System.IO.Compression.dll