diff --git a/IOB-OPC-UA/Applications/ClientControls.Net4/Common/Client/AttrributesListViewCtrl.cs b/IOB-OPC-UA/Applications/ClientControls.Net4/Common/Client/AttrributesListViewCtrl.cs
index 4ee2569..137ada8 100644
--- a/IOB-OPC-UA/Applications/ClientControls.Net4/Common/Client/AttrributesListViewCtrl.cs
+++ b/IOB-OPC-UA/Applications/ClientControls.Net4/Common/Client/AttrributesListViewCtrl.cs
@@ -37,6 +37,7 @@ using System.Windows.Forms;
using Opc.Ua;
using Opc.Ua.Client;
using System.IO;
+using System.Text.RegularExpressions;
namespace Opc.Ua.Client.Controls
{
@@ -108,11 +109,24 @@ namespace Opc.Ua.Client.Controls
public void ReadAttributes(NodeId nodeId, bool showProperties)
{
AttributesLV.Items.Clear();
-
-
// effettua check preliminarei folder out...
string outPath = Path.Combine(Directory.GetCurrentDirectory(), "trace");
- string expFile = Path.Combine(outPath, $"{nodeId}.txt".Replace("=", "_").Replace(";", "_"));
+ string nodePath = $"{nodeId}.txt".Replace("=", "_")
+ .Replace(";", "_")
+ .Replace("|", "_")
+ .Replace("/", "_")
+ .Replace("\\", "_")
+ .Replace("(", "_")
+ .Replace(")", "_");
+
+
+ // 2023.11.25 fix caratteri invalidi
+ string regexSearch = new string(Path.GetInvalidFileNameChars()) + new string(Path.GetInvalidPathChars());
+ Regex r = new Regex(string.Format("[{0}]", Regex.Escape(regexSearch)));
+ nodePath = r.Replace(nodePath, "");
+
+ string expFile = Path.Combine(outPath, nodePath);
+
Directory.CreateDirectory(outPath);
StringBuilder sb = new StringBuilder();
@@ -210,7 +224,12 @@ namespace Opc.Ua.Client.Controls
// export finale su file proprietà...
string nodeData = sb.ToString();
- File.WriteAllText(expFile, nodeData);
+ try
+ {
+ File.WriteAllText(expFile, nodeData);
+ }
+ catch
+ { }
}
#endregion
diff --git a/IOB-OPC-UA/Applications/ClientControls.Net4/Common/Client/BrowseTreeViewCtrl.cs b/IOB-OPC-UA/Applications/ClientControls.Net4/Common/Client/BrowseTreeViewCtrl.cs
index 411695f..8b82d49 100644
--- a/IOB-OPC-UA/Applications/ClientControls.Net4/Common/Client/BrowseTreeViewCtrl.cs
+++ b/IOB-OPC-UA/Applications/ClientControls.Net4/Common/Client/BrowseTreeViewCtrl.cs
@@ -38,6 +38,7 @@ using System.Text;
using System.Windows.Forms;
using Opc.Ua;
using Opc.Ua.Client;
+using System.Threading;
namespace Opc.Ua.Client.Controls
{
@@ -332,6 +333,9 @@ namespace Opc.Ua.Client.Controls
///
private void BrowseTV_AfterSelect(object sender, TreeViewEventArgs e)
{
+ // metto una pausa casuale 50-150 ms...
+ Random rnd = new Random();
+ Thread.Sleep(rnd.Next(50, 150));
try
{
m_selectedNodeId = null;
diff --git a/IOB-OPC-UA/Applications/ConsoleReferenceSubscriber/ConsoleReferenceSubscriber.csproj b/IOB-OPC-UA/Applications/ConsoleReferenceSubscriber/ConsoleReferenceSubscriber.csproj
deleted file mode 100644
index 51ade0d..0000000
--- a/IOB-OPC-UA/Applications/ConsoleReferenceSubscriber/ConsoleReferenceSubscriber.csproj
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
- $(AppTargetFrameWorks)
- ConsoleReferenceSubscriber
- Exe
- ConsoleReferenceSubscriber
- OPC Foundation
- .NET Console Reference Subscriber
- Copyright © 2004-2020 OPC Foundation, Inc
- Quickstarts.ConsoleReferenceSubscriber
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/IOB-OPC-UA/Applications/ConsoleReferenceSubscriber/Program.cs b/IOB-OPC-UA/Applications/ConsoleReferenceSubscriber/Program.cs
deleted file mode 100644
index 7e76fae..0000000
--- a/IOB-OPC-UA/Applications/ConsoleReferenceSubscriber/Program.cs
+++ /dev/null
@@ -1,952 +0,0 @@
-/* ========================================================================
- * Copyright (c) 2005-2020 The OPC Foundation, Inc. All rights reserved.
- *
- * OPC Foundation MIT License 1.00
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following
- * conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * The complete license agreement can be found here:
- * http://opcfoundation.org/License/MIT/1.00/
- * ======================================================================*/
-
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using Mono.Options;
-using Opc.Ua;
-using Opc.Ua.PubSub;
-using Opc.Ua.PubSub.Configuration;
-using Opc.Ua.PubSub.Encoding;
-using Opc.Ua.PubSub.PublishedData;
-using Opc.Ua.PubSub.Transport;
-
-namespace Quickstarts.ConsoleReferenceSubscriber
-{
- public static class Program
- {
- public const ushort NamespaceIndexSimple = 2;
- public const ushort NamespaceIndexAllTypes = 3;
-
- // constant DateTime that represents the initial time when the metadata for the configuration was created
- private static DateTime kTimeOfConfiguration = new DateTime(2021, 5, 1, 0, 0, 0, DateTimeKind.Utc);
- private const string kDisplaySeparator = "------------------------------------------------";
-
- private static object m_lock = new object();
-
- public static void Main(string[] args)
- {
- Console.WriteLine("OPC UA Console Reference Subscriber");
-
- // command line options
- bool showHelp = false;
- bool useMqttJson = true;
- bool useMqttUadp = false;
- bool useUdpUadp = false;
- string subscriberUrl = null;
-
- Mono.Options.OptionSet options = new Mono.Options.OptionSet {
- { "h|help", "Show usage information", v => showHelp = v != null },
- { "m|mqtt_json", "Use MQTT with Json encoding Profile. This is the default option.", v => useMqttJson = v != null },
- { "p|mqtt_uadp", "Use MQTT with UADP encoding Profile.", v => useMqttUadp = v != null },
- { "u|udp_uadp", "Use UDP with UADP encoding Profile", v => useUdpUadp = v != null },
- { "url|subscriber_url=", "Subscriber Url Address", v => subscriberUrl = v},
- };
-
- IList extraArgs = null;
- try
- {
- extraArgs = options.Parse(args);
- if (extraArgs.Count > 0)
- {
- foreach (string extraArg in extraArgs)
- {
- Console.WriteLine("Error: Unknown option: {0}", extraArg);
- showHelp = true;
- }
- }
- }
- catch (OptionException e)
- {
- Console.WriteLine(e.Message);
- showHelp = true;
- }
-
- if (showHelp)
- {
- Console.WriteLine("Usage: dotnet ConsoleReferenceSubscriber.dll [OPTIONS]");
- Console.WriteLine();
-
- Console.WriteLine("Options:");
- options.WriteOptionDescriptions(Console.Out);
- return;
- }
- try
- {
- InitializeLog();
-
- PubSubConfigurationDataType pubSubConfiguration = null;
- if (useUdpUadp)
- {
- // set default UDP Subscriber Url to local multicast if not sent in args.
- if (string.IsNullOrEmpty(subscriberUrl))
- {
- subscriberUrl = "opc.udp://239.0.0.1:4840";
- }
-
- // Create configuration using UDP protocol and UADP Encoding
- pubSubConfiguration = CreateSubscriberConfiguration_UdpUadp(subscriberUrl);
- Console.WriteLine("The Pubsub Connection was initialized using UDP & UADP Profile.");
- }
- else
- {
- // set default MQTT Broker Url to localhost if not sent in args.
- if (string.IsNullOrEmpty(subscriberUrl))
- {
- subscriberUrl = "mqtt://localhost:1883";
- }
-
- if (useMqttUadp)
- {
- // Create configuration using MQTT protocol and UADP Encoding
- pubSubConfiguration = CreateSubscriberConfiguration_MqttUadp(subscriberUrl);
- Console.WriteLine("The PubSub Connection was initialized using MQTT & UADP Profile.");
- }
- else
- {
- // Create configuration using MQTT protocol and JSON Encoding
- pubSubConfiguration = CreateSubscriberConfiguration_MqttJson(subscriberUrl);
- Console.WriteLine("The PubSub Connection was initialized using MQTT & JSON Profile.");
- }
- }
-
- // Create the UA Publisher application
- using (UaPubSubApplication uaPubSubApplication = UaPubSubApplication.Create(pubSubConfiguration))
- {
- // Subscribte to RawDataReceived event
- uaPubSubApplication.RawDataReceived += UaPubSubApplication_RawDataReceived;
-
- // Subscribte to DataReceived event
- uaPubSubApplication.DataReceived += UaPubSubApplication_DataReceived;
-
- // Subscribte to MetaDataReceived event
- uaPubSubApplication.MetaDataReceived += UaPubSubApplication_MetaDataDataReceived;
-
- uaPubSubApplication.ConfigurationUpdating += UaPubSubApplication_ConfigurationUpdating;
-
- // Start the publisher
- uaPubSubApplication.Start();
-
- Console.WriteLine("Subscriber Started. Press Ctrl-C to exit...");
-
- ManualResetEvent quitEvent = new ManualResetEvent(false);
- try
- {
- Console.CancelKeyPress += (sender, eArgs) => {
- quitEvent.Set();
- eArgs.Cancel = true;
- };
- }
- catch
- {
- }
-
- // wait for timeout or Ctrl-C
- quitEvent.WaitOne();
- }
-
- Console.WriteLine("Program ended.");
- Console.WriteLine("Press any key to finish...");
- Console.ReadKey();
- }
- catch (Exception ex)
- {
- Console.WriteLine(ex.Message);
- }
- }
-
-
-
- #region Private Methods
- ///
- /// Handler for event.
- ///
- ///
- ///
- private static void UaPubSubApplication_RawDataReceived(object sender, RawDataReceivedEventArgs e)
- {
- lock (m_lock)
- {
- Console.WriteLine("RawDataReceived bytes:{0}, Source:{1}, TransportProtocol:{2}, MessageMapping:{3}",
- e.Message.Length, e.Source, e.TransportProtocol, e.MessageMapping);
-
- Console.WriteLine(kDisplaySeparator);
- }
- }
-
- ///
- /// Handler for event.
- ///
- ///
- ///
- private static void UaPubSubApplication_DataReceived(object sender, SubscribedDataEventArgs e)
- {
- lock (m_lock)
- {
- Console.WriteLine("DataReceived event:");
-
- if (e.NetworkMessage is UadpNetworkMessage)
- {
- Console.WriteLine("UADP Network DataSetMessage ({0} DataSets): Source={1}, SequenceNumber={2}",
- e.NetworkMessage.DataSetMessages.Count, e.Source, ((UadpNetworkMessage)e.NetworkMessage).SequenceNumber);
- }
- else if (e.NetworkMessage is JsonNetworkMessage)
- {
- Console.WriteLine("JSON Network DataSetMessage ({0} DataSets): Source={1}, MessageId={2}",
- e.NetworkMessage.DataSetMessages.Count, e.Source, ((JsonNetworkMessage)e.NetworkMessage).MessageId);
- }
-
- foreach (UaDataSetMessage dataSetMessage in e.NetworkMessage.DataSetMessages)
- {
- DataSet dataSet = dataSetMessage.DataSet;
- Console.WriteLine("\tDataSet.Name={0}, DataSetWriterId={1}, SequenceNumber={2}", dataSet.Name, dataSet.DataSetWriterId, dataSetMessage.SequenceNumber);
-
- for (int i = 0; i < dataSet.Fields.Length; i++)
- {
- Console.WriteLine("\t\tTargetNodeId:{0}, Attribute:{1}, Value:{2}",
- dataSet.Fields[i].TargetNodeId, dataSet.Fields[i].TargetAttribute, dataSetMessage.DataSet.Fields[i].Value);
- }
- }
- Console.WriteLine(kDisplaySeparator);
- }
- }
-
- ///
- /// Handler for event.
- ///
- ///
- ///
- private static void UaPubSubApplication_MetaDataDataReceived(object sender, SubscribedDataEventArgs e)
- {
- lock (m_lock)
- {
- Console.WriteLine("MetaDataDataReceived event:");
- if (e.NetworkMessage is JsonNetworkMessage)
- {
- Console.WriteLine("JSON Network MetaData Message: Source={0}, PublisherId={1}, DataSetWriterId={2} Fields count={3}\n",
- e.Source,
- ((JsonNetworkMessage)e.NetworkMessage).PublisherId,
- ((JsonNetworkMessage)e.NetworkMessage).DataSetWriterId,
- e.NetworkMessage.DataSetMetaData.Fields.Count);
- }
- if (e.NetworkMessage is UadpNetworkMessage)
- {
- Console.WriteLine("UADP Network MetaData Message: Source={0}, PublisherId={1}, DataSetWriterId={2} Fields count={3}\n",
- e.Source,
- ((UadpNetworkMessage)e.NetworkMessage).PublisherId,
- ((UadpNetworkMessage)e.NetworkMessage).DataSetWriterId,
- e.NetworkMessage.DataSetMetaData.Fields.Count);
- }
-
- Console.WriteLine("\tMetaData.Name={0}, MajorVersion={1} MinorVersion={2}",
- e.NetworkMessage.DataSetMetaData.Name,
- e.NetworkMessage.DataSetMetaData.ConfigurationVersion.MajorVersion,
- e.NetworkMessage.DataSetMetaData.ConfigurationVersion.MinorVersion);
-
- foreach (FieldMetaData metaDataField in e.NetworkMessage.DataSetMetaData.Fields)
- {
- Console.WriteLine("\t\t{0, -20} DataType:{1, 10}, ValueRank:{2, 5}", metaDataField.Name, metaDataField.DataType, metaDataField.ValueRank);
- }
- Console.WriteLine(kDisplaySeparator);
- }
- }
-
- ///
- /// Handler for
- ///
- ///
- ///
- private static void UaPubSubApplication_ConfigurationUpdating(object sender, ConfigurationUpdatingEventArgs e)
- {
- Console.WriteLine("The UaPubSubApplication.ConfigurationUpdating event was triggered for part: {0} for {1}, With new value: {2}",
- e.ChangedProperty, e.Parent.GetType().Name, e.NewValue.GetType().Name);
- Console.WriteLine(kDisplaySeparator);
- }
-
- ///
- /// Creates a Subscriber PubSubConfiguration object for UDP & UADP programmatically.
- ///
- ///
- private static PubSubConfigurationDataType CreateSubscriberConfiguration_UdpUadp(string urlAddress)
- {
- // Define a PubSub connection with PublisherId 1
- PubSubConnectionDataType pubSubConnection1 = new PubSubConnectionDataType();
- pubSubConnection1.Name = "Subscriber Connection UDP UADP";
- pubSubConnection1.Enabled = true;
- pubSubConnection1.PublisherId = (UInt16)1;
- pubSubConnection1.TransportProfileUri = Profiles.PubSubUdpUadpTransport;
- NetworkAddressUrlDataType address = new NetworkAddressUrlDataType();
- // Specify the local Network interface name to be used
- // e.g. address.NetworkInterface = "Ethernet";
- // Leave empty to subscribe on all available local interfaces.
- address.NetworkInterface = String.Empty;
- address.Url = urlAddress;
- pubSubConnection1.Address = new ExtensionObject(address);
-
- // configure custoom DicoveryAddress for Dicovery messages
- pubSubConnection1.TransportSettings = new ExtensionObject() {
- Body = new DatagramConnectionTransportDataType() {
- DiscoveryAddress = new ExtensionObject() {
- Body = new NetworkAddressUrlDataType() {
- Url = "opc.udp://224.0.2.15:4840"
- }
- }
- }
- };
-
- #region Define ReaderGroup1
- ReaderGroupDataType readerGroup1 = new ReaderGroupDataType();
- readerGroup1.Name = "ReaderGroup 1";
- readerGroup1.Enabled = true;
- readerGroup1.MaxNetworkMessageSize = 1500;
- readerGroup1.MessageSettings = new ExtensionObject(new ReaderGroupMessageDataType());
- readerGroup1.TransportSettings = new ExtensionObject(new ReaderGroupTransportDataType());
-
- #region Define DataSetReader 'Simple' for PublisherId = (UInt16)1, DataSetWriterId = 1
- DataSetReaderDataType dataSetReaderSimple = new DataSetReaderDataType();
- dataSetReaderSimple.Name = "Reader 1 UDP UADP";
- dataSetReaderSimple.PublisherId = (UInt16)1;
- dataSetReaderSimple.WriterGroupId = 0;
- dataSetReaderSimple.DataSetWriterId = 1;
- dataSetReaderSimple.Enabled = true;
- dataSetReaderSimple.DataSetFieldContentMask = (uint)DataSetFieldContentMask.RawData;
- dataSetReaderSimple.KeyFrameCount = 1;
- dataSetReaderSimple.TransportSettings = new ExtensionObject(new DataSetReaderTransportDataType());
-
- UadpDataSetReaderMessageDataType uadpDataSetReaderMessage = new UadpDataSetReaderMessageDataType() {
- GroupVersion = 0,
- NetworkMessageNumber = 0,
- NetworkMessageContentMask = (uint)(uint)(UadpNetworkMessageContentMask.PublisherId
- | UadpNetworkMessageContentMask.GroupHeader
- | UadpNetworkMessageContentMask.WriterGroupId
- | UadpNetworkMessageContentMask.GroupVersion
- | UadpNetworkMessageContentMask.NetworkMessageNumber
- | UadpNetworkMessageContentMask.SequenceNumber),
- DataSetMessageContentMask = (uint)(UadpDataSetMessageContentMask.Status | UadpDataSetMessageContentMask.SequenceNumber),
- };
- dataSetReaderSimple.MessageSettings = new ExtensionObject(uadpDataSetReaderMessage);
-
- // Create and set DataSetMetaData for DataSet Simple
- DataSetMetaDataType simpleMetaData = CreateDataSetMetaDataSimple();
- dataSetReaderSimple.DataSetMetaData = simpleMetaData;
- // Create and set SubscribedDataSet
- TargetVariablesDataType subscribedDataSet = new TargetVariablesDataType();
- subscribedDataSet.TargetVariables = new FieldTargetDataTypeCollection();
- foreach (var fieldMetaData in simpleMetaData.Fields)
- {
- subscribedDataSet.TargetVariables.Add(new FieldTargetDataType() {
- DataSetFieldId = fieldMetaData.DataSetFieldId,
- TargetNodeId = new NodeId(fieldMetaData.Name, NamespaceIndexSimple),
- AttributeId = Attributes.Value,
- OverrideValueHandling = OverrideValueHandling.OverrideValue,
- OverrideValue = new Variant(TypeInfo.GetDefaultValue(fieldMetaData.DataType, (int)ValueRanks.Scalar))
- });
- }
-
- dataSetReaderSimple.SubscribedDataSet = new ExtensionObject(subscribedDataSet);
-
- #endregion
-
- readerGroup1.DataSetReaders.Add(dataSetReaderSimple);
-
- #region Define DataSetReader 'AllTypes' for PublisherId = (UInt16)1, DataSetWriterId = 2
- DataSetReaderDataType dataSetReaderAllTypes = new DataSetReaderDataType();
- dataSetReaderAllTypes.Name = "Reader 2 UDP UADP";
- dataSetReaderAllTypes.PublisherId = (UInt16)1;
- dataSetReaderAllTypes.WriterGroupId = 0;
- dataSetReaderAllTypes.DataSetWriterId = 2;
- dataSetReaderAllTypes.Enabled = true;
- dataSetReaderAllTypes.DataSetFieldContentMask = (uint)DataSetFieldContentMask.RawData;
- dataSetReaderAllTypes.KeyFrameCount = 1;
- dataSetReaderAllTypes.TransportSettings = new ExtensionObject(new DataSetReaderTransportDataType());
-
- uadpDataSetReaderMessage = new UadpDataSetReaderMessageDataType() {
- GroupVersion = 0,
- NetworkMessageNumber = 0,
- NetworkMessageContentMask = (uint)(uint)(UadpNetworkMessageContentMask.PublisherId
- | UadpNetworkMessageContentMask.GroupHeader
- | UadpNetworkMessageContentMask.WriterGroupId
- | UadpNetworkMessageContentMask.GroupVersion
- | UadpNetworkMessageContentMask.NetworkMessageNumber
- | UadpNetworkMessageContentMask.SequenceNumber),
- DataSetMessageContentMask = (uint)(UadpDataSetMessageContentMask.Status | UadpDataSetMessageContentMask.SequenceNumber),
- };
- dataSetReaderAllTypes.MessageSettings = new ExtensionObject(uadpDataSetReaderMessage);
-
- // Create and set DataSetMetaData for DataSet AllTypes
- DataSetMetaDataType allTypesMetaData = CreateDataSetMetaDataAllTypes();
- dataSetReaderAllTypes.DataSetMetaData = allTypesMetaData;
- // Create and set SubscribedDataSet
- subscribedDataSet = new TargetVariablesDataType();
- subscribedDataSet.TargetVariables = new FieldTargetDataTypeCollection();
- foreach (var fieldMetaData in allTypesMetaData.Fields)
- {
- subscribedDataSet.TargetVariables.Add(new FieldTargetDataType() {
- DataSetFieldId = fieldMetaData.DataSetFieldId,
- TargetNodeId = new NodeId(fieldMetaData.Name, NamespaceIndexAllTypes),
- AttributeId = Attributes.Value,
- OverrideValueHandling = OverrideValueHandling.OverrideValue,
- OverrideValue = new Variant(TypeInfo.GetDefaultValue(fieldMetaData.DataType, (int)ValueRanks.Scalar))
- });
- }
-
- dataSetReaderAllTypes.SubscribedDataSet = new ExtensionObject(subscribedDataSet);
-
- #endregion
-
- readerGroup1.DataSetReaders.Add(dataSetReaderAllTypes);
-
- #endregion
- pubSubConnection1.ReaderGroups.Add(readerGroup1);
-
- //create pub sub configuration root object
- PubSubConfigurationDataType pubSubConfiguration = new PubSubConfigurationDataType();
- pubSubConfiguration.Connections = new PubSubConnectionDataTypeCollection()
- {
- pubSubConnection1
- };
-
- return pubSubConfiguration;
- }
-
- ///
- /// Creates a Subscriber PubSubConfiguration object for MQTT & Json programmatically.
- ///
- ///
- private static PubSubConfigurationDataType CreateSubscriberConfiguration_MqttJson(string urlAddress)
- {
- // Define a PubSub connection with PublisherId 2
- PubSubConnectionDataType pubSubConnection1 = new PubSubConnectionDataType();
- pubSubConnection1.Name = "Subscriber Connection MQTT Json";
- pubSubConnection1.Enabled = true;
- pubSubConnection1.PublisherId = (UInt16)2;
- pubSubConnection1.TransportProfileUri = Profiles.PubSubMqttJsonTransport;
- NetworkAddressUrlDataType address = new NetworkAddressUrlDataType();
- // Specify the local Network interface name to be used
- // e.g. address.NetworkInterface = "Ethernet";
- // Leave empty to subscribe on all available local interfaces.
- address.NetworkInterface = String.Empty;
- address.Url = urlAddress;
- pubSubConnection1.Address = new ExtensionObject(address);
-
- // Configure the mqtt specific configuration with the MQTTbroker
- ITransportProtocolConfiguration mqttConfiguration = new MqttClientProtocolConfiguration(version: EnumMqttProtocolVersion.V500);
- pubSubConnection1.ConnectionProperties = mqttConfiguration.ConnectionProperties;
-
- string brokerQueueName = "Json_WriterGroup_1";
- string brokerMetaData = "$Metadata";
-
- #region Define ReaderGroup1
- ReaderGroupDataType readerGroup1 = new ReaderGroupDataType();
- readerGroup1.Name = "ReaderGroup 1";
- readerGroup1.Enabled = true;
- readerGroup1.MaxNetworkMessageSize = 1500;
- readerGroup1.MessageSettings = new ExtensionObject(new ReaderGroupMessageDataType());
- readerGroup1.TransportSettings = new ExtensionObject(new ReaderGroupTransportDataType());
-
- #region Define DataSetReader1 'Simple' for PublisherId = (UInt16)2, DataSetWriterId = 1
-
- DataSetReaderDataType dataSetReaderSimple = new DataSetReaderDataType();
- dataSetReaderSimple.Name = "Reader 1 MQTT JSON Variant Encoding";
- dataSetReaderSimple.PublisherId = (UInt16)2;
- dataSetReaderSimple.WriterGroupId = 1;
- dataSetReaderSimple.DataSetWriterId = 1;
- dataSetReaderSimple.Enabled = true;
- dataSetReaderSimple.DataSetFieldContentMask = (uint)DataSetFieldContentMask.None;// Variant encoding;
- dataSetReaderSimple.KeyFrameCount = 3;
-
- JsonDataSetReaderMessageDataType jsonDataSetReaderMessage = new JsonDataSetReaderMessageDataType() {
- NetworkMessageContentMask = (uint)(uint)(JsonNetworkMessageContentMask.NetworkMessageHeader
- | JsonNetworkMessageContentMask.DataSetMessageHeader
- | JsonNetworkMessageContentMask.PublisherId
- | JsonNetworkMessageContentMask.DataSetClassId
- | JsonNetworkMessageContentMask.ReplyTo),
- DataSetMessageContentMask = (uint)(JsonDataSetMessageContentMask.DataSetWriterId
- | JsonDataSetMessageContentMask.MetaDataVersion
- | JsonDataSetMessageContentMask.SequenceNumber
- | JsonDataSetMessageContentMask.Status
- | JsonDataSetMessageContentMask.Timestamp),
- };
- dataSetReaderSimple.MessageSettings = new ExtensionObject(jsonDataSetReaderMessage);
-
- BrokerDataSetReaderTransportDataType brokerTransportSettings = new BrokerDataSetReaderTransportDataType() {
- QueueName = brokerQueueName,
- RequestedDeliveryGuarantee = BrokerTransportQualityOfService.BestEffort,
- MetaDataQueueName = $"{brokerQueueName}/{brokerMetaData}",
- };
- dataSetReaderSimple.TransportSettings = new ExtensionObject(brokerTransportSettings);
-
- // Create and set DataSetMetaData for DataSet Simple
- DataSetMetaDataType simpleMetaData = CreateDataSetMetaDataSimple();
- dataSetReaderSimple.DataSetMetaData = simpleMetaData;
- // Create and set SubscribedDataSet
- TargetVariablesDataType subscribedDataSet = new TargetVariablesDataType();
- subscribedDataSet.TargetVariables = new FieldTargetDataTypeCollection();
- foreach (var fieldMetaData in simpleMetaData.Fields)
- {
- subscribedDataSet.TargetVariables.Add(new FieldTargetDataType() {
- DataSetFieldId = fieldMetaData.DataSetFieldId,
- TargetNodeId = new NodeId(fieldMetaData.Name, NamespaceIndexSimple),
- AttributeId = Attributes.Value,
- OverrideValueHandling = OverrideValueHandling.OverrideValue,
- OverrideValue = new Variant(TypeInfo.GetDefaultValue(fieldMetaData.DataType, (int)ValueRanks.Scalar))
- });
- }
-
- dataSetReaderSimple.SubscribedDataSet = new ExtensionObject(subscribedDataSet);
-
- #endregion
-
- readerGroup1.DataSetReaders.Add(dataSetReaderSimple);
-
- #region Define DataSetReader2 'AllTypes' for PublisherId = (UInt16)2, DataSetWriterId = 2
- DataSetReaderDataType dataSetReaderAllTypes = new DataSetReaderDataType();
- dataSetReaderAllTypes.Name = "Reader 2 MQTT JSON RawData Encoding";
- dataSetReaderAllTypes.PublisherId = (UInt16)2;
- dataSetReaderAllTypes.WriterGroupId = 1;
- dataSetReaderAllTypes.DataSetWriterId = 2;
- dataSetReaderAllTypes.Enabled = true;
- dataSetReaderAllTypes.DataSetFieldContentMask = (uint)DataSetFieldContentMask.RawData;// RawData encoding;
- dataSetReaderAllTypes.KeyFrameCount = 1;
-
- jsonDataSetReaderMessage = new JsonDataSetReaderMessageDataType() {
- NetworkMessageContentMask = (uint)(JsonNetworkMessageContentMask.NetworkMessageHeader
- | JsonNetworkMessageContentMask.DataSetMessageHeader
- | JsonNetworkMessageContentMask.PublisherId
- | JsonNetworkMessageContentMask.DataSetClassId
- | JsonNetworkMessageContentMask.ReplyTo),
- DataSetMessageContentMask = (uint)(JsonDataSetMessageContentMask.DataSetWriterId
- | JsonDataSetMessageContentMask.MetaDataVersion
- | JsonDataSetMessageContentMask.SequenceNumber
- | JsonDataSetMessageContentMask.Status
- | JsonDataSetMessageContentMask.Timestamp),
- };
- dataSetReaderAllTypes.MessageSettings = new ExtensionObject(jsonDataSetReaderMessage);
-
- brokerTransportSettings = new BrokerDataSetReaderTransportDataType() {
- QueueName = brokerQueueName,
- RequestedDeliveryGuarantee = BrokerTransportQualityOfService.BestEffort,
- MetaDataQueueName = $"{brokerQueueName}/{brokerMetaData}",
- };
- dataSetReaderAllTypes.TransportSettings = new ExtensionObject(brokerTransportSettings);
-
- // Create and set DataSetMetaData for DataSet AllTypes
- DataSetMetaDataType allTypesMetaData = CreateDataSetMetaDataAllTypes();
- dataSetReaderAllTypes.DataSetMetaData = allTypesMetaData;
- // Create and set SubscribedDataSet
- subscribedDataSet = new TargetVariablesDataType();
- subscribedDataSet.TargetVariables = new FieldTargetDataTypeCollection();
- foreach (var fieldMetaData in allTypesMetaData.Fields)
- {
- subscribedDataSet.TargetVariables.Add(new FieldTargetDataType() {
- DataSetFieldId = fieldMetaData.DataSetFieldId,
- TargetNodeId = new NodeId(fieldMetaData.Name, NamespaceIndexAllTypes),
- AttributeId = Attributes.Value,
- OverrideValueHandling = OverrideValueHandling.OverrideValue,
- OverrideValue = new Variant(TypeInfo.GetDefaultValue(fieldMetaData.DataType, (int)ValueRanks.Scalar))
- });
- }
-
- dataSetReaderAllTypes.SubscribedDataSet = new ExtensionObject(subscribedDataSet);
-
- #endregion
-
- readerGroup1.DataSetReaders.Add(dataSetReaderAllTypes);
-
- #endregion
- pubSubConnection1.ReaderGroups.Add(readerGroup1);
-
- //create pub sub configuration root object
- PubSubConfigurationDataType pubSubConfiguration = new PubSubConfigurationDataType();
- pubSubConfiguration.Connections = new PubSubConnectionDataTypeCollection()
- {
- pubSubConnection1
- };
-
- return pubSubConfiguration;
- }
-
- ///
- /// Creates a Subscriber PubSubConfiguration object for UDP & UADP programmatically.
- ///
- ///
- private static PubSubConfigurationDataType CreateSubscriberConfiguration_MqttUadp(string urlAddress)
- {
- // Define a PubSub connection with PublisherId 3
- PubSubConnectionDataType pubSubConnection1 = new PubSubConnectionDataType();
- pubSubConnection1.Name = "Subscriber Connection MQTT UADP";
- pubSubConnection1.Enabled = true;
- pubSubConnection1.PublisherId = (UInt16)3;
- pubSubConnection1.TransportProfileUri = Profiles.PubSubMqttUadpTransport;
- NetworkAddressUrlDataType address = new NetworkAddressUrlDataType();
- // Specify the local Network interface name to be used
- // e.g. address.NetworkInterface = "Ethernet";
- // Leave empty to subscribe on all available local interfaces.
- address.NetworkInterface = String.Empty;
- address.Url = urlAddress;
- pubSubConnection1.Address = new ExtensionObject(address);
-
- // Configure the mqtt specific configuration with the MQTTbroker
- ITransportProtocolConfiguration mqttConfiguration = new MqttClientProtocolConfiguration(version: EnumMqttProtocolVersion.V500);
- pubSubConnection1.ConnectionProperties = mqttConfiguration.ConnectionProperties;
-
- string brokerQueueName = "Uadp_WriterGroup_1";
- string brokerMetaData = "$Metadata";
-
- #region Define ReaderGroup1
- ReaderGroupDataType readerGroup1 = new ReaderGroupDataType();
- readerGroup1.Name = "ReaderGroup 1";
- readerGroup1.Enabled = true;
- readerGroup1.MaxNetworkMessageSize = 1500;
- readerGroup1.MessageSettings = new ExtensionObject(new ReaderGroupMessageDataType());
- readerGroup1.TransportSettings = new ExtensionObject(new ReaderGroupTransportDataType());
-
- #region Define DataSetReader 'Simple' for PublisherId = (UInt16)1, DataSetWriterId = 1
- DataSetReaderDataType dataSetReaderSimple = new DataSetReaderDataType();
- dataSetReaderSimple.Name = "Reader 1 MQTT UADP";
- dataSetReaderSimple.PublisherId = (UInt16)3;
- dataSetReaderSimple.WriterGroupId = 0;
- dataSetReaderSimple.DataSetWriterId = 1;
- dataSetReaderSimple.Enabled = true;
- dataSetReaderSimple.DataSetFieldContentMask = (uint)DataSetFieldContentMask.RawData;
- dataSetReaderSimple.KeyFrameCount = 1;
- BrokerDataSetReaderTransportDataType brokerTransportSettings = new BrokerDataSetReaderTransportDataType() {
- QueueName = brokerQueueName,
- MetaDataQueueName = $"{brokerQueueName}/{brokerMetaData}",
- };
-
- dataSetReaderSimple.TransportSettings = new ExtensionObject(brokerTransportSettings);
-
- UadpDataSetReaderMessageDataType uadpDataSetReaderMessage = new UadpDataSetReaderMessageDataType() {
- GroupVersion = 0,
- NetworkMessageNumber = 0,
- NetworkMessageContentMask = (uint)(uint)(UadpNetworkMessageContentMask.PublisherId
- | UadpNetworkMessageContentMask.GroupHeader
- | UadpNetworkMessageContentMask.WriterGroupId
- | UadpNetworkMessageContentMask.PayloadHeader
- | UadpNetworkMessageContentMask.GroupVersion
- | UadpNetworkMessageContentMask.NetworkMessageNumber
- | UadpNetworkMessageContentMask.SequenceNumber),
- DataSetMessageContentMask = (uint)(UadpDataSetMessageContentMask.Status | UadpDataSetMessageContentMask.SequenceNumber),
- };
- dataSetReaderSimple.MessageSettings = new ExtensionObject(uadpDataSetReaderMessage);
-
- // Create and set DataSetMetaData for DataSet Simple
- DataSetMetaDataType simpleMetaData = CreateDataSetMetaDataSimple();
- dataSetReaderSimple.DataSetMetaData = simpleMetaData;
- // Create and set SubscribedDataSet
- TargetVariablesDataType subscribedDataSet = new TargetVariablesDataType();
- subscribedDataSet.TargetVariables = new FieldTargetDataTypeCollection();
- foreach (var fieldMetaData in simpleMetaData.Fields)
- {
- subscribedDataSet.TargetVariables.Add(new FieldTargetDataType() {
- DataSetFieldId = fieldMetaData.DataSetFieldId,
- TargetNodeId = new NodeId(fieldMetaData.Name, NamespaceIndexSimple),
- AttributeId = Attributes.Value,
- OverrideValueHandling = OverrideValueHandling.OverrideValue,
- OverrideValue = new Variant(TypeInfo.GetDefaultValue(fieldMetaData.DataType, (int)ValueRanks.Scalar))
- });
- }
-
- dataSetReaderSimple.SubscribedDataSet = new ExtensionObject(subscribedDataSet);
-
- #endregion
-
- readerGroup1.DataSetReaders.Add(dataSetReaderSimple);
-
- #region Define DataSetReader 'AllTypes' for PublisherId = (UInt16)1, DataSetWriterId = 2
- DataSetReaderDataType dataSetReaderAllTypes = new DataSetReaderDataType();
- dataSetReaderAllTypes.Name = "Reader 2 MQTT UADP";
- dataSetReaderAllTypes.PublisherId = (UInt16)3;
- dataSetReaderAllTypes.WriterGroupId = 0;
- dataSetReaderAllTypes.DataSetWriterId = 2;
- dataSetReaderAllTypes.Enabled = true;
- dataSetReaderAllTypes.DataSetFieldContentMask = (uint)DataSetFieldContentMask.RawData;
- dataSetReaderAllTypes.KeyFrameCount = 1;
-
- dataSetReaderAllTypes.TransportSettings = new ExtensionObject(brokerTransportSettings);
-
- uadpDataSetReaderMessage = new UadpDataSetReaderMessageDataType() {
- GroupVersion = 0,
- NetworkMessageNumber = 0,
- NetworkMessageContentMask = (uint)(uint)(UadpNetworkMessageContentMask.PublisherId
- | UadpNetworkMessageContentMask.GroupHeader
- | UadpNetworkMessageContentMask.WriterGroupId
- | UadpNetworkMessageContentMask.PayloadHeader
- | UadpNetworkMessageContentMask.GroupVersion
- | UadpNetworkMessageContentMask.NetworkMessageNumber
- | UadpNetworkMessageContentMask.SequenceNumber),
- DataSetMessageContentMask = (uint)(UadpDataSetMessageContentMask.Status | UadpDataSetMessageContentMask.SequenceNumber),
- };
- dataSetReaderAllTypes.MessageSettings = new ExtensionObject(uadpDataSetReaderMessage);
-
- // Create and set DataSetMetaData for DataSet AllTypes
- DataSetMetaDataType allTypesMetaData = CreateDataSetMetaDataAllTypes();
- dataSetReaderAllTypes.DataSetMetaData = allTypesMetaData;
- // Create and set SubscribedDataSet
- subscribedDataSet = new TargetVariablesDataType();
- subscribedDataSet.TargetVariables = new FieldTargetDataTypeCollection();
- foreach (var fieldMetaData in allTypesMetaData.Fields)
- {
- subscribedDataSet.TargetVariables.Add(new FieldTargetDataType() {
- DataSetFieldId = fieldMetaData.DataSetFieldId,
- TargetNodeId = new NodeId(fieldMetaData.Name, NamespaceIndexAllTypes),
- AttributeId = Attributes.Value,
- OverrideValueHandling = OverrideValueHandling.OverrideValue,
- OverrideValue = new Variant(TypeInfo.GetDefaultValue(fieldMetaData.DataType, (int)ValueRanks.Scalar))
- });
- }
-
- dataSetReaderAllTypes.SubscribedDataSet = new ExtensionObject(subscribedDataSet);
-
- #endregion
-
- readerGroup1.DataSetReaders.Add(dataSetReaderAllTypes);
-
- #endregion
- pubSubConnection1.ReaderGroups.Add(readerGroup1);
-
- //create pub sub configuration root object
- PubSubConfigurationDataType pubSubConfiguration = new PubSubConfigurationDataType();
- pubSubConfiguration.Connections = new PubSubConnectionDataTypeCollection()
- {
- pubSubConnection1
- };
-
- return pubSubConfiguration;
- }
-
- ///
- /// Creates the "Simple" DataSetMetaData
- ///
- ///
- private static DataSetMetaDataType CreateDataSetMetaDataSimple()
- {
- DataSetMetaDataType simpleMetaData = new DataSetMetaDataType();
- simpleMetaData.DataSetClassId = new Uuid(Guid.Empty);
- simpleMetaData.Name = "Simple";
- simpleMetaData.Fields = new FieldMetaDataCollection()
- {
- new FieldMetaData()
- {
- Name = "BoolToggle",
- DataSetFieldId = new Uuid(Guid.NewGuid()),
- BuiltInType = (byte) DataTypes.Boolean,
- DataType = DataTypeIds.Boolean,
- ValueRank = ValueRanks.Scalar
- },
- new FieldMetaData()
- {
- Name = "Int32",
- DataSetFieldId = new Uuid(Guid.NewGuid()),
- BuiltInType = (byte) DataTypes.Int32,
- DataType = DataTypeIds.Int32,
- ValueRank = ValueRanks.Scalar
- },
- new FieldMetaData()
- {
- Name = "Int32Fast",
- DataSetFieldId = new Uuid(Guid.NewGuid()),
- BuiltInType = (byte) DataTypes.Int32,
- DataType = DataTypeIds.Int32,
- ValueRank = ValueRanks.Scalar
- },
- new FieldMetaData()
- {
- Name = "DateTime",
- DataSetFieldId = new Uuid(Guid.NewGuid()),
- BuiltInType = (byte) DataTypes.DateTime,
- DataType = DataTypeIds.DateTime,
- ValueRank = ValueRanks.Scalar
- },
- };
- // set the ConfigurationVersion relative to kTimeOfConfiguration constant
- simpleMetaData.ConfigurationVersion = new ConfigurationVersionDataType() {
- MinorVersion = ConfigurationVersionUtils.CalculateVersionTime(kTimeOfConfiguration),
- MajorVersion = ConfigurationVersionUtils.CalculateVersionTime(kTimeOfConfiguration)
- };
-
- return simpleMetaData;
- }
-
- ///
- /// Creates the "AllTypes" DataSetMetaData
- ///
- ///
- private static DataSetMetaDataType CreateDataSetMetaDataAllTypes()
- {
- DataSetMetaDataType allTypesMetaData = new DataSetMetaDataType();
- allTypesMetaData.DataSetClassId = new Uuid(Guid.Empty);
- allTypesMetaData.Name = "AllTypes";
- allTypesMetaData.Fields = new FieldMetaDataCollection()
- {
- new FieldMetaData()
- {
- Name = "BoolToggle",
- DataSetFieldId = new Uuid(Guid.NewGuid()),
- BuiltInType = (byte)DataTypes.Boolean,
- DataType = DataTypeIds.Boolean,
- ValueRank = ValueRanks.Scalar
- },
- new FieldMetaData()
- {
- Name = "Byte",
- DataSetFieldId = new Uuid(Guid.NewGuid()),
- BuiltInType = (byte)DataTypes.Byte,
- DataType = DataTypeIds.Byte,
- ValueRank = ValueRanks.Scalar
- },
- new FieldMetaData()
- {
- Name = "Int16",
- DataSetFieldId = new Uuid(Guid.NewGuid()),
- BuiltInType = (byte)DataTypes.Int16,
- DataType = DataTypeIds.Int16,
- ValueRank = ValueRanks.Scalar
- },
- new FieldMetaData()
- {
- Name = "Int32",
- DataSetFieldId = new Uuid(Guid.NewGuid()),
- BuiltInType = (byte)DataTypes.Int32,
- DataType = DataTypeIds.Int32,
- ValueRank = ValueRanks.Scalar
- },
- new FieldMetaData()
- {
- Name = "SByte",
- DataSetFieldId = new Uuid(Guid.NewGuid()),
- BuiltInType = (byte)DataTypes.SByte,
- DataType = DataTypeIds.SByte,
- ValueRank = ValueRanks.Scalar
- },
- new FieldMetaData()
- {
- Name = "UInt16",
- DataSetFieldId = new Uuid(Guid.NewGuid()),
- BuiltInType = (byte)DataTypes.UInt16,
- DataType = DataTypeIds.UInt16,
- ValueRank = ValueRanks.Scalar
- },
- new FieldMetaData()
- {
- Name = "UInt32",
- DataSetFieldId = new Uuid(Guid.NewGuid()),
- BuiltInType = (byte)DataTypes.UInt32,
- DataType = DataTypeIds.UInt32,
- ValueRank = ValueRanks.Scalar
- },
- new FieldMetaData()
- {
- Name = "UInt64",
- DataSetFieldId = new Uuid(Guid.NewGuid()),
- BuiltInType = (byte)DataTypes.UInt64,
- DataType = DataTypeIds.UInt64,
- ValueRank = ValueRanks.Scalar
- },
- new FieldMetaData()
- {
- Name = "Float",
- DataSetFieldId = new Uuid(Guid.NewGuid()),
- BuiltInType = (byte)DataTypes.Float,
- DataType = DataTypeIds.Float,
- ValueRank = ValueRanks.Scalar
- },
- new FieldMetaData()
- {
- Name = "Double",
- DataSetFieldId = new Uuid(Guid.NewGuid()),
- BuiltInType = (byte)DataTypes.Double,
- DataType = DataTypeIds.Double,
- ValueRank = ValueRanks.Scalar
- },
- new FieldMetaData()
- {
- Name = "String",
- DataSetFieldId = new Uuid(Guid.NewGuid()),
- BuiltInType = (byte)DataTypes.String,
- DataType = DataTypeIds.String,
- ValueRank = ValueRanks.Scalar
- },
- new FieldMetaData()
- {
- Name = "ByteString",
- DataSetFieldId = new Uuid(Guid.NewGuid()),
- BuiltInType = (byte)DataTypes.ByteString,
- DataType = DataTypeIds.ByteString,
- ValueRank = ValueRanks.Scalar
- },
- new FieldMetaData()
- {
- Name = "Guid",
- DataSetFieldId = new Uuid(Guid.NewGuid()),
- BuiltInType = (byte)DataTypes.Guid,
- DataType = DataTypeIds.Guid,
- ValueRank = ValueRanks.Scalar
- },
- new FieldMetaData()
- {
- Name = "DateTime",
- DataSetFieldId = new Uuid(Guid.NewGuid()),
- BuiltInType = (byte)DataTypes.DateTime,
- DataType = DataTypeIds.DateTime,
- ValueRank = ValueRanks.Scalar
- },
- new FieldMetaData()
- {
- Name = "UInt32Array",
- DataSetFieldId = new Uuid(Guid.NewGuid()),
- BuiltInType = (byte)DataTypes.UInt32,
- DataType = DataTypeIds.UInt32,
- ValueRank = ValueRanks.OneDimension
- },
- };
- // set the ConfigurationVersion relative to kTimeOfConfiguration constant
- allTypesMetaData.ConfigurationVersion = new ConfigurationVersionDataType() {
- MinorVersion = ConfigurationVersionUtils.CalculateVersionTime(kTimeOfConfiguration),
- MajorVersion = ConfigurationVersionUtils.CalculateVersionTime(kTimeOfConfiguration)
- };
-
- return allTypesMetaData;
- }
-
- ///
- /// Initialize logging
- ///
- private static void InitializeLog()
- {
- // Initialize logger
- Utils.SetTraceLog("%CommonApplicationData%\\OPC Foundation\\Logs\\Quickstarts.ConsoleReferenceSubscriber.log.txt", true);
- Utils.SetTraceMask(Utils.TraceMasks.Error);
- Utils.SetTraceOutput(Utils.TraceOutput.DebugAndFile);
- }
- #endregion
- }
-}
diff --git a/IOB-OPC-UA/Applications/ConsoleReferenceSubscriber/README.md b/IOB-OPC-UA/Applications/ConsoleReferenceSubscriber/README.md
deleted file mode 100644
index 2c93f7d..0000000
--- a/IOB-OPC-UA/Applications/ConsoleReferenceSubscriber/README.md
+++ /dev/null
@@ -1,92 +0,0 @@
-
-# OPC Foundation UA .NET Standard Library - Console Reference Subscriber
-
-## Introduction
-This OPC application was created to provide the sample code for creating Subscriber applications using the OPC Foundation UA .NET Standard PubSub Library. There is a .NET Core 3.1 (2.1) console version of the Subscriber which runs on any OS supporting [.NET Standard](https://docs.microsoft.com/en-us/dotnet/articles/standard).
-The Reference Subscriber is configured to run in parallel with the [Console Reference Publisher](../ConsoleReferencePublisher/README.md)
-
-## How to build and run the Windows OPC UA Reference Server from Visual Studio
-1. Open the solution **UA Reference.sln** with Visual Studio 2019.
-2. Choose the project `ConsoleReferenceSubscriber` in the Solution Explorer and set it with a right click as `Startup Project`.
-3. Hit `F5` to build and execute the sample.
-
-## How to build and run the console OPC UA Reference Subscriber on Windows, Linux and iOS
-This section describes how to run the **ConsoleReferenceSubscriber**.
-
-Please follow instructions in this [article](https://aka.ms/dotnetcoregs) to setup the dotnet command line environment for your platform.
-
-## Start the Subscriber
-1. Open a command prompt.
-2. Navigate to the folder **Applications/ConsoleReferenceSubscriber**.
-3. To run the Subscriber sample type
-
-`dotnet run --project ConsoleReferenceSubscriber.csproj --framework netcoreapp3.1.`
-
-The Subscriber will start and listen for network messages sent by the Reference Publisher.
-
-## Command Line Arguments for *ConsoleReferenceSubscriber*
- **ConsoleReferenceSubscriber** can be executed using the following command line arguments:
-
-
- - -h|help - Shows usage information
- - -m|mqtt_json - Creates a connection using there MQTT with Json encoding Profile. This is the default option.
- - -u|udp_uadp - Creates a connection using there UDP with UADP encoding Profile.
-
-To run the Subscriber sample using a connection with MQTT with Json encoding execute:
-
- dotnet run --project ConsoleReferenceSubscriber.csproj --framework netcoreapp3.1
-
- or
-
- dotnet run --project ConsoleReferenceSubscriber.csproj --framework netcoreapp3.1 -m
-
-To run the Subscriber sample using a connection with the UDP with UADP encoding execute:
-
- dotnet run --project ConsoleReferenceSubscriber.csproj --framework netcoreapp3.1 -u
-
-# Programmer's Guide
-To create a new OPC UA Subscriber application:
-
- - Open Microsoft Visual Studio 2019 environment,
- - Create a new project and give it a name,
- - Add a reference to the [OPCFoundation.NetStandard.Opc.Ua.PubSub NuGet package](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.PubSub/),
- - Initialize Subscriber application (see [Subscriber Initialization](#subscriber-initialization)).
-
-## Subscriber Initialization
-
-The following four steps are required to implement a functional Subscriber:
-
- 1. Create [Subscriber Configuration](#subscriber-configuration).
-
- // Create configuration using UDP protocol and UADP Encoding
- PubSubConfigurationDataType pubSubConfiguration = CreateSubscriberConfiguration_UdpUadp();
-
- Or use the alternative configuration object for MQTT with JSON encoding
-
- // Create configuration using MQTT protocol and JSON Encoding
- PubSubConfigurationDataType pubSubConfiguration = CreateSubscriberConfiguration_MqttJson();
-
- The CreateSubscriberConfiguration methods can be found in [ConsoleReferenceSubscriber/Program.cs](./Program.cs) file.
-
- 2. Create an instance of the [UaPubSubApplication Class](../../Docs/PubSub.md#uapubsubapplication-class) using the configuration data from step 1.
-
- // Subscribe to data events
- UaPubSubApplication uaPubSubApplication = UaPubSubApplication.Create(pubSubConfiguration);
-
- 3. Provide the event handler for the *DataReceived* event. This event will be raised when data sets matching the subscriber configuration arrive over the network. See the DataReceived Event section for more details.
-
- // Create an instance of UaPubSubApplication
- uaPubSubApplication.DataReceived += PubSubApplication_DataReceived;
-
- 4. Start PubSub application
-
- // Start the publisher
- uaPubSubApplication.Start();
-
-After this step the *Subscriber* will listen for *NetworkMessages* as configured.
-## Subscriber Configuration
-
-The Subscriber configuration is a subset of the [PubSub Configuration](../../Docs/PubSub.md#pubsub-configuration). A functional *Subscriber* application needs to have a configuration (*PubSubConfgurationDataType* instance) that contains at least one connection (*PubSubConnectionDataType* instance) with at least one reader group configuration (*ReaderGroupDataType* instance). The reader group contains at least one data set reader (*DataSetReaderDataType* instance) that describes a published data set that can be processed and retrieved by the *Subscriber* application.
-The diagram shows the subset of classes involved in an *OPC UA Publisher* configuration.
-
-
diff --git a/IOB-OPC-UA/Stack/Opc.Ua.Bindings.Https/Opc.Ua.Bindings.Https.csproj b/IOB-OPC-UA/Stack/Opc.Ua.Bindings.Https/Opc.Ua.Bindings.Https.csproj
index 9727d66..928b66c 100644
--- a/IOB-OPC-UA/Stack/Opc.Ua.Bindings.Https/Opc.Ua.Bindings.Https.csproj
+++ b/IOB-OPC-UA/Stack/Opc.Ua.Bindings.Https/Opc.Ua.Bindings.Https.csproj
@@ -27,11 +27,11 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/MTConnect/App.config b/MTConnect/App.config
new file mode 100644
index 0000000..02d96b4
--- /dev/null
+++ b/MTConnect/App.config
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MTConnect/MTConnect.csproj b/MTConnect/MTConnect.csproj
new file mode 100644
index 0000000..ef3322a
--- /dev/null
+++ b/MTConnect/MTConnect.csproj
@@ -0,0 +1,225 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {C33D677A-DDAB-41EF-831F-DC9401BC573E}
+ Exe
+ MTConnect
+ MTConnect
+ v4.6.2
+ 512
+ true
+ true
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+ true
+ bin\Remote_DEBUG\
+ DEBUG;TRACE
+ full
+ AnyCPU
+ 7.3
+ prompt
+ true
+
+
+
+ ..\packages\Microsoft.Bcl.AsyncInterfaces.7.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll
+
+
+ ..\packages\Microsoft.Extensions.Configuration.7.0.0\lib\net462\Microsoft.Extensions.Configuration.dll
+
+
+ ..\packages\Microsoft.Extensions.Configuration.Abstractions.7.0.0\lib\net462\Microsoft.Extensions.Configuration.Abstractions.dll
+
+
+ ..\packages\Microsoft.Extensions.Configuration.Binder.7.0.0\lib\net462\Microsoft.Extensions.Configuration.Binder.dll
+
+
+ ..\packages\Microsoft.Extensions.Configuration.CommandLine.7.0.0\lib\net462\Microsoft.Extensions.Configuration.CommandLine.dll
+
+
+ ..\packages\Microsoft.Extensions.Configuration.EnvironmentVariables.7.0.0\lib\net462\Microsoft.Extensions.Configuration.EnvironmentVariables.dll
+
+
+ ..\packages\Microsoft.Extensions.Configuration.FileExtensions.7.0.0\lib\net462\Microsoft.Extensions.Configuration.FileExtensions.dll
+
+
+ ..\packages\Microsoft.Extensions.Configuration.Json.7.0.0\lib\net462\Microsoft.Extensions.Configuration.Json.dll
+
+
+ ..\packages\Microsoft.Extensions.Configuration.UserSecrets.7.0.0\lib\net462\Microsoft.Extensions.Configuration.UserSecrets.dll
+
+
+ ..\packages\Microsoft.Extensions.DependencyInjection.7.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.dll
+
+
+ ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.7.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll
+
+
+ ..\packages\Microsoft.Extensions.FileProviders.Abstractions.7.0.0\lib\net462\Microsoft.Extensions.FileProviders.Abstractions.dll
+
+
+ ..\packages\Microsoft.Extensions.FileProviders.Physical.7.0.0\lib\net462\Microsoft.Extensions.FileProviders.Physical.dll
+
+
+ ..\packages\Microsoft.Extensions.FileSystemGlobbing.7.0.0\lib\net462\Microsoft.Extensions.FileSystemGlobbing.dll
+
+
+ ..\packages\Microsoft.Extensions.Hosting.7.0.0\lib\net462\Microsoft.Extensions.Hosting.dll
+
+
+ ..\packages\Microsoft.Extensions.Hosting.Abstractions.7.0.0\lib\net462\Microsoft.Extensions.Hosting.Abstractions.dll
+
+
+ ..\packages\Microsoft.Extensions.Logging.7.0.0\lib\net462\Microsoft.Extensions.Logging.dll
+
+
+ ..\packages\Microsoft.Extensions.Logging.Abstractions.7.0.0\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll
+
+
+ ..\packages\Microsoft.Extensions.Logging.Configuration.7.0.0\lib\net462\Microsoft.Extensions.Logging.Configuration.dll
+
+
+ ..\packages\Microsoft.Extensions.Logging.Console.7.0.0\lib\net462\Microsoft.Extensions.Logging.Console.dll
+
+
+ ..\packages\Microsoft.Extensions.Logging.Debug.7.0.0\lib\net462\Microsoft.Extensions.Logging.Debug.dll
+
+
+ ..\packages\Microsoft.Extensions.Logging.EventLog.7.0.0\lib\net462\Microsoft.Extensions.Logging.EventLog.dll
+
+
+ ..\packages\Microsoft.Extensions.Logging.EventSource.7.0.0\lib\net462\Microsoft.Extensions.Logging.EventSource.dll
+
+
+ ..\packages\Microsoft.Extensions.Options.7.0.0\lib\net462\Microsoft.Extensions.Options.dll
+
+
+ ..\packages\Microsoft.Extensions.Options.ConfigurationExtensions.7.0.0\lib\net462\Microsoft.Extensions.Options.ConfigurationExtensions.dll
+
+
+ ..\packages\Microsoft.Extensions.Primitives.7.0.0\lib\net462\Microsoft.Extensions.Primitives.dll
+
+
+ ..\packages\MQTTnet.4.3.3.952\lib\net461\MQTTnet.dll
+
+
+ ..\packages\MQTTnet.Extensions.ManagedClient.4.3.3.952\lib\net461\MQTTnet.Extensions.ManagedClient.dll
+
+
+ ..\packages\MTConnect.NET.6.5.1\lib\net462\MTConnect.NET.dll
+
+
+ ..\packages\MTConnect.NET-Common.6.5.1\lib\net462\MTConnect.NET-Common.dll
+
+
+ ..\packages\MTConnect.NET-HTTP.6.5.1\lib\net462\MTConnect.NET-HTTP.dll
+
+
+ ..\packages\MTConnect.NET-JSON.6.5.1\lib\net462\MTConnect.NET-JSON.dll
+
+
+ ..\packages\MTConnect.NET-JSON-cppagent.6.5.1\lib\net462\MTConnect.NET-JSON-cppagent.dll
+
+
+ ..\packages\MTConnect.NET-MQTT.6.5.1\lib\net462\MTConnect.NET-MQTT.dll
+
+
+ ..\packages\MTConnect.NET-SHDR.6.5.1\lib\net462\MTConnect.NET-SHDR.dll
+
+
+ ..\packages\MTConnect.NET-TLS.6.5.1\lib\net462\MTConnect.NET-TLS.dll
+
+
+ ..\packages\MTConnect.NET-XML.6.5.1\lib\net462\MTConnect.NET-XML.dll
+
+
+
+ ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll
+
+
+
+
+ ..\packages\System.Diagnostics.DiagnosticSource.7.0.0\lib\net462\System.Diagnostics.DiagnosticSource.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.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.Cryptography.Algorithms.4.3.1\lib\net461\System.Security.Cryptography.Algorithms.dll
+
+
+ ..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll
+
+
+ ..\packages\System.Text.Encodings.Web.7.0.0\lib\net462\System.Text.Encodings.Web.dll
+
+
+ ..\packages\System.Text.Json.7.0.0\lib\net462\System.Text.Json.dll
+
+
+ ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll
+
+
+ ..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll
+
+
+
+
+
+
+
+
+
+ ..\packages\YamlDotNet.13.7.1\lib\net45\YamlDotNet.dll
+
+
+
+
+
+
+
+
+
+ Always
+
+
+
+
+
+
+ "$(ProjectDir)postBuildTgt.bat" "$(ConfigurationName)" "$(TargetDir)"
+
+
\ No newline at end of file
diff --git a/MTConnect/Program.cs b/MTConnect/Program.cs
new file mode 100644
index 0000000..f469517
--- /dev/null
+++ b/MTConnect/Program.cs
@@ -0,0 +1,311 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Runtime.Remoting;
+using System.Text;
+using System.Threading.Tasks;
+using System.Xml.Linq;
+using MTConnect.Clients;
+using MTConnect.Observations;
+using MTConnect.Streams;
+using YamlDotNet.Serialization.ObjectGraphVisitors;
+
+namespace MTConnect
+{
+ internal class Program
+ {
+ #region Private Fields
+
+ private static MTConnectHttpClient client;
+
+ // Get the current directory
+ private static string currentDirectory = Directory.GetCurrentDirectory();
+
+ private static string filePath = Path.Combine(currentDirectory, "file.log");
+ private static string sep = "------------------------";
+ private static Stopwatch sw = new Stopwatch();
+
+ #endregion Private Fields
+
+ #region Private Methods
+
+ private static void Client_AssetsReceived(object sender, Assets.IAssetsResponseDocument document)
+ {
+ doLog(sep);
+ doLog("ASSET");
+ doLog(sep);
+ foreach (var asset in document.Assets)
+ {
+ // Print AssetId to the Console
+ doLog($"Asset: {asset.AssetId}");
+ }
+ doLog(sep);
+ doLog();
+ }
+
+ private static void Client_ClientStarted(object sender, EventArgs e)
+ {
+ doLog(sep);
+ doLog($"Client Started! | {e}");
+ doLog(sep);
+ doLog("Press ESC to exit");
+ }
+
+ private static void Client_ClientStopped(object sender, EventArgs e)
+ {
+ doLog(sep);
+ doLog($"Client Stopped! | {e}");
+ doLog(sep);
+ doLog("Press ESC to exit");
+ }
+
+ private static void Client_ConnectionError(object sender, Exception exc)
+ {
+ doLog(sep);
+ doLog($"CONNECTION ERROR returned!");
+ doLog($"{exc}");
+ doLog(sep);
+ doLog("Press ESC to exit");
+ }
+
+ private static void Client_CurrentReceived(object sender, Streams.IStreamsResponseDocument document)
+ {
+ doLog(sep);
+ doLog("CURRENT");
+ doLog(sep);
+ foreach (var deviceStream in document.Streams)
+ {
+ // DeviceStream
+ doLog($"Stream: {deviceStream.Name}");
+
+ // Component Streams
+ foreach (var componentStream in deviceStream.ComponentStreams)
+ {
+ processData(componentStream);
+ }
+ }
+ doLog(sep);
+ doLog();
+ }
+
+ private static void Client_ObservationReceived(object sender, IObservation observ)
+ {
+ doLog(sep);
+ doLog("OBSERVATION");
+ doLog(sep);
+ processObservation(observ);
+ }
+
+ private static void Client_ProbeReceived(object sender, Devices.IDevicesResponseDocument document)
+ {
+ doLog(sep);
+ doLog("PROBE returned");
+ doLog(sep);
+ foreach (var device in document.Devices)
+ {
+ // Device
+ doLog($"DEV: {device.Id}");
+
+ // All DataItems (traverse the entire Device model)
+ if (device.DataItems.Count() > 0)
+ {
+ foreach (var dataItem in device.GetDataItems())
+ {
+ doLog($" DItm | {dataItem.IdPath}");
+ }
+ }
+
+ // All Components (traverse the entire Device model)
+ if (device.Components.Count() > 0)
+ {
+ foreach (var component in device.GetComponents())
+ {
+ doLog($" Comp | {component.IdPath}");
+ }
+ }
+
+ // All Compositions (traverse the entire Device model)
+ if (device.Compositions.Count() > 0)
+ {
+ foreach (var composition in device.GetCompositions())
+ {
+ doLog($" Cpst | {composition.IdPath}");
+ }
+ }
+ }
+ doLog(sep);
+ doLog();
+ }
+
+ private static void Client_SampleReceived(object sender, Streams.IStreamsResponseDocument document)
+ {
+ doLog(sep);
+ doLog("SAMPLE");
+ doLog(sep);
+ foreach (var deviceStream in document.Streams)
+ {
+ // DeviceStream
+ doLog($"Stream: {deviceStream.Name}");
+ // Component Streams
+ foreach (var componentStream in deviceStream.ComponentStreams)
+ {
+ processData(componentStream);
+ }
+ }
+ doLog(sep);
+ doLog();
+ }
+
+ private static void doLog(string msg = "")
+ {
+ string dtMessage = $"{DateTime.Now:HH:mm:ss.fff} | {msg}";
+ File.AppendAllText(filePath, $"{dtMessage}{Environment.NewLine}");
+ Console.WriteLine(dtMessage);
+ }
+
+ private static void doPreliminaryProbe(string baseUrl)
+ {
+ doLog();
+ doLog("Call Probe");
+
+ var prbClient = new MTConnectHttpProbeClient(baseUrl);
+ prbClient.Timeout = 20000;
+ var prbDoc = prbClient.Get();
+ if (prbDoc == null)
+ {
+ doLog("Preliminari Probe | No answer, continue...");
+ }
+ else
+ {
+ doLog(sep);
+ doLog("Preliminary PROBE");
+ doLog(sep);
+ foreach (var device in prbDoc.Devices)
+ {
+ // Device
+ doLog($"DEV: {device.Id}");
+
+ // All DataItems (traverse the entire Device model)
+ if (device.DataItems.Count() > 0)
+ {
+ foreach (var dataItem in device.GetDataItems())
+ {
+ doLog($" DItm | {dataItem.IdPath}");
+ }
+ }
+
+ // All Components (traverse the entire Device model)
+ if (device.Components.Count() > 0)
+ {
+ foreach (var component in device.GetComponents())
+ {
+ doLog($" Comp | {component.IdPath}");
+ }
+ }
+
+ // All Compositions (traverse the entire Device model)
+ if (device.Compositions.Count() > 0)
+ {
+ foreach (var composition in device.GetCompositions())
+ {
+ doLog($" Cpst | {composition.IdPath}");
+ }
+ }
+ }
+ doLog(sep);
+ doLog();
+ }
+ }
+
+ private static void Main(string[] args)
+ {
+ // setup oggetti
+ //var baseUrl = "127.0.0.1:5000";
+ var baseUrl = "192.168.1.27:5000";
+
+ // inizio ciclo
+ doLog(sep);
+ doLog("Rest Client test application");
+ doLog(sep);
+
+ doPreliminaryProbe(baseUrl);
+
+ doLog("Call connection");
+ client = new MTConnectHttpClient(baseUrl);
+ // sample interval
+ client.Interval = 500;
+ // timeout x richieste
+ client.Timeout = 4000;
+ // timeout riconnessione
+ client.ReconnectionInterval = 5000;
+
+ // aggancio eventi
+ client.ClientStarted += Client_ClientStarted;
+ client.ClientStopped += Client_ClientStopped;
+ client.ConnectionError += Client_ConnectionError;
+ client.ProbeReceived += Client_ProbeReceived;
+ client.AssetsReceived += Client_AssetsReceived;
+ client.CurrentReceived += Client_CurrentReceived;
+ client.SampleReceived += Client_SampleReceived;
+ // conviene usare sample x avere la stessa cosa ma con altre info...
+ //client.ObservationReceived += Client_ObservationReceived;
+
+ // vero avvio
+ client.Start();
+
+ Task.Delay(5000);
+ doLog();
+ ConsoleKeyInfo answ;
+ doLog("Press ESC to exit");
+ answ = Console.ReadKey();
+ while (answ == null || answ.Key != ConsoleKey.Escape)
+ {
+ doLog("Press ESC to exit");
+ Task.Delay(1000);
+ answ = Console.ReadKey();
+ }
+ doLog("...closing Now!");
+ }
+
+ private static void processData(IComponentStream dataStream)
+ {
+ doLog($"Component {dataStream.Name} -->");
+ // DataItems (Samples, Events, and Conditions)
+ foreach (var observation in dataStream.Observations)
+ {
+ processObservation(observation);
+ }
+ }
+
+ private static void processObservation(IObservation observation)
+ {
+ string sMsg = $" - {observation.DataItemId} | {observation.Category}";
+ switch (observation.Category)
+ {
+ case Devices.DataItemCategory.CONDITION:
+ break;
+
+ case Devices.DataItemCategory.EVENT:
+ break;
+
+ case Devices.DataItemCategory.SAMPLE:
+ break;
+
+ default:
+ break;
+ }
+ if (observation.Values != null && observation.Values.Count() > 0)
+ {
+ foreach (var item in observation.Values)
+ {
+ sMsg += $" | {item.Key}: {item.Value}";
+ }
+ }
+ doLog(sMsg);
+ }
+
+ #endregion Private Methods
+ }
+}
\ No newline at end of file
diff --git a/MTConnect/Properties/AssemblyInfo.cs b/MTConnect/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..a899538
--- /dev/null
+++ b/MTConnect/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("MTConnect")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("MTConnect")]
+[assembly: AssemblyCopyright("Copyright © 2024")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("c33d677a-ddab-41ef-831f-dc9401bc573e")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/MTConnect/packages.config b/MTConnect/packages.config
new file mode 100644
index 0000000..15ec669
--- /dev/null
+++ b/MTConnect/packages.config
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MTConnect/postBuildTgt.bat b/MTConnect/postBuildTgt.bat
new file mode 100644
index 0000000..0dfbac9
--- /dev/null
+++ b/MTConnect/postBuildTgt.bat
@@ -0,0 +1,70 @@
+@echo off
+echo Effettua pulizia post build: configurazione %1. directory %2
+
+RD /S /Q %2"\lib\da"
+RD /S /Q %2"\lib\de"
+RD /S /Q %2"\lib\es"
+RD /S /Q %2"\lib\fr"
+RD /S /Q %2"\lib\it"
+RD /S /Q %2"\lib\ja-JP"
+RD /S /Q %2"\lib\ko"
+RD /S /Q %2"\lib\nl"
+RD /S /Q %2"\lib\pl"
+RD /S /Q %2"\lib\pt"
+RD /S /Q %2"\lib\ru"
+RD /S /Q %2"\lib\sv"
+RD /S /Q %2"\lib\tr"
+RD /S /Q %2"\lib\zh"
+
+MOVE /Y %2"da" %2"lib\"
+MOVE /Y %2"de" %2"lib\"
+MOVE /Y %2"es" %2"lib\"
+MOVE /Y %2"fr" %2"lib\"
+MOVE /Y %2"it" %2"lib\"
+MOVE /Y %2"ja-JP" %2"lib\"
+MOVE /Y %2"ko" %2"lib\"
+MOVE /Y %2"nl" %2"lib\"
+MOVE /Y %2"pl" %2"lib\"
+MOVE /Y %2"pt" %2"lib\"
+MOVE /Y %2"ru" %2"lib\"
+MOVE /Y %2"sv" %2"lib\"
+MOVE /Y %2"tr" %2"lib\"
+MOVE /Y %2"zh" %2"lib\"
+
+
+if %1 == "Release" goto Release
+if %1 == "Debug" goto Debug
+if %1 == "Remote_DEBUG" goto RemoteDebug
+
+:Release
+REM INIZIO eliminando i files pdb
+del /S %2"*.pdb""
+del /S %2"*.xml""
+del /S %2"lib/*.pdb""
+echo Release: eliminato pdb + xml!!!
+goto END
+
+:Debug
+echo Debug: nulla da eliminare
+
+REM copia script verso server remoto
+REM ROBOCOPY . \\10.150.0.1\Steamware\IOB-WIN-NEXT-DEB /MIR
+
+goto END
+
+
+:RemoteDebug
+REM copia script verso server remoto
+REM echo Debug remoto: effettuo robocopy sync (verificare remote per cliente)
+
+REM IOB-WIN-SIM
+REM ROBOCOPY . \\IOB-WIN-SIMULA\Steamware\IOB-WIN-NEXT-DEB /MIR
+
+REM IOBVPN4MACHINE
+REM ROBOCOPY . \\10.51.90.5\Steamware\TestCli /MIR
+ROBOCOPY . \\10.51.90.9\Steamware\TestCli\CLI /MIR
+
+goto END
+
+:END
+echo Fatto!
\ No newline at end of file
diff --git a/Mitsubishi/App.config b/Mitsubishi/App.config
new file mode 100644
index 0000000..b50c74f
--- /dev/null
+++ b/Mitsubishi/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Mitsubishi/Mitsubishi.csproj b/Mitsubishi/Mitsubishi.csproj
new file mode 100644
index 0000000..4f7f237
--- /dev/null
+++ b/Mitsubishi/Mitsubishi.csproj
@@ -0,0 +1,82 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {1A4D0968-9C4B-4509-98AF-20A62DF59558}
+ Exe
+ Mitsubishi
+ Mitsubishi
+ v4.6.2
+ 512
+ true
+ true
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+ true
+ bin\Remote_DEBUG\
+ DEBUG;TRACE
+ full
+ x86
+ 7.3
+ prompt
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {1B93D6AF-FD32-4281-83FE-533F666FAE6C}
+ 1
+ 0
+ 0
+ tlbimp
+ False
+ True
+
+
+
+
+
+
+
+
+ "$(ProjectDir)postBuildTgt.bat" "$(ConfigurationName)" "$(TargetDir)"
+
+
\ No newline at end of file
diff --git a/Mitsubishi/Program.cs b/Mitsubishi/Program.cs
new file mode 100644
index 0000000..9b7d96b
--- /dev/null
+++ b/Mitsubishi/Program.cs
@@ -0,0 +1,336 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Runtime;
+using System.Security.Policy;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace Mitsubishi
+{
+ internal class Program
+ {
+ static void Main(string[] args)
+ {
+
+ // preparo area x file test x debug successivo
+ var appPath = System.Reflection.Assembly.GetExecutingAssembly().Location;
+ var fPath = Directory.GetParent(appPath).FullName;
+ string basePath = Path.Combine(fPath, "Test");
+ if (!Directory.Exists(basePath))
+ {
+ Directory.CreateDirectory(basePath);
+ }
+ outPath = Path.Combine(basePath, "test.log");
+ File.WriteAllText(outPath, "");
+
+ bool testWrite = false;
+
+ DoLog(sep);
+ DoLog("Mitsubishi Client test application");
+ DoLog(sep);
+ DoLog("");
+ Console.WriteLine("Vuoi simulare scritture? S/N");
+ ConsoleKeyInfo answ = Console.ReadKey();
+ testWrite = answ.KeyChar == 's' || answ.KeyChar == 'S';
+
+ // obj connessione
+ EZNCAUTLib.DispEZNcCommunication oEZNcAutCom = null;
+ oEZNcAutCom = new EZNCAUTLib.DispEZNcCommunication();
+
+ // [Local variable declaration]
+ object BlockValue = "";
+ int iRet = 0;
+ //Open communication
+ iRet = oEZNcAutCom.SetTCPIPProtocol("192.168.213.199", 683);
+ //Console.WriteLine($"R: {iRet}");
+ iRet = oEZNcAutCom.Open3(5, 1, 10, "EZNC_LOCALHOST");
+
+ DoLog(sep);
+ DoLog("Retrieve Serial/Vers");
+ DoLog(sep);
+ int partSys = -1;
+ oEZNcAutCom.System_GetSystemInformation(0, out partSys);
+ DoLog($"PartSys: {partSys}");
+ int numAx = -1; ;
+ oEZNcAutCom.System_GetSystemInformation(1, out numAx);
+ DoLog($"Num Ax: {numAx}");
+ string serNo = "";
+ oEZNcAutCom.System_GetSerialNo(out serNo);
+ DoLog($"SerNo: {serNo}");
+ string pVers = "";
+ oEZNcAutCom.System_GetVersion(0, 0, out pVers);
+ DoLog($"Vers 0: {pVers}");
+ oEZNcAutCom.System_GetVersion(0, 1, out pVers);
+ DoLog($"Vers 1: {pVers}");
+ oEZNcAutCom.System_GetVersion(0, 2, out pVers);
+ DoLog($"Vers 2: {pVers}");
+ DoLog(sep);
+ DoLog("");
+
+ DoLog(sep);
+ DoLog("Test DateTime");
+ DoLog(sep);
+ // preparo memorie
+ int pDate = 0;
+ int pTime = 0;
+ try
+ {
+ oEZNcAutCom.Time_GetClockData(out pDate, out pTime);
+ DoLog($"Date-Time | D: {pDate} | T: {pTime}");
+ }
+ catch (Exception exc)
+ {
+ DoLog($"{exc}");
+ }
+ DoLog(sep);
+ DoLog("");
+
+ DoLog(sep);
+ DoLog("Test Program");
+ DoLog(sep);
+ // preparo memorie
+ string prgText = "";
+ int prgState = 0;
+ // solo nome...
+ iRet = oEZNcAutCom.Program_GetProgramNumber2((Int32)PROGRAMTYPE.EZNC_MAINPRG, out String strProgramNo);
+ DoLog($"ProgramName: {strProgramNo}");
+ DoLog("");
+
+ // leggo contenuto
+ try
+ {
+ oEZNcAutCom.Program_CurrentBlockRead(10, out prgText, out prgState);
+ DoLog($"Program {prgState} | {prgText}");
+ }
+ catch (Exception exc)
+ {
+ DoLog($"{exc}");
+ }
+ DoLog(sep);
+ DoLog("");
+
+ DoLog(sep);
+ DoLog("Test CycleTyme");
+ DoLog(sep);
+ // preparo memorie
+ int plTime = 0;
+ try
+ {
+ oEZNcAutCom.Status_GetCycleTime(out plTime);
+ DoLog($"GetCycleTime | Time: {plTime}");
+ }
+ catch (Exception exc)
+ {
+ DoLog($"{exc}");
+ }
+ DoLog(sep);
+ DoLog("");
+
+ DoLog(sep);
+ DoLog("Test Lettura posizioni");
+ DoLog(sep);
+ double pdPosit = 0;
+ for (int i = 1; i < 4; i++)
+ {
+ iRet = oEZNcAutCom.Position_GetCurrentPosition(i, out pdPosit);
+ DoLog($"Pos: {i} | {pdPosit}");
+ }
+ DoLog(sep);
+ DoLog("");
+
+ DoLog(sep);
+ DoLog("Test scrittura Var500");
+ DoLog(sep);
+ // NB: max 7 char!!!
+ if (testWrite)
+ {
+ oEZNcAutCom.CommonVariable_SetName(500, "ODL");
+ oEZNcAutCom.CommonVariable_SetName(501, "CodArt");
+ oEZNcAutCom.CommonVariable_SetName(502, "NumPz");
+ oEZNcAutCom.CommonVariable_SetName(503, "");
+
+ oEZNcAutCom.CommonVariable_Write2(500, 105, 1);
+ oEZNcAutCom.CommonVariable_Write2(501, 205, 1);
+ oEZNcAutCom.CommonVariable_Write2(502, 305, 1);
+ oEZNcAutCom.CommonVariable_Write2(503, 0, 1);
+ }
+ DoLog("CommonVariable 500..503 Write Done!");
+ DoLog(sep);
+ DoLog("");
+
+ DoLog(sep);
+ DoLog("Test lettura Var500");
+ DoLog(sep);
+ string varName = "";
+ double pData = 0;
+ int pType = 0;
+ for (int i = 500; i < 505; i++)
+ {
+ oEZNcAutCom.CommonVariable_GetName(i, out varName);
+ oEZNcAutCom.CommonVariable_Read2(i, out pData, out pType);
+ DoLog($"Var: {i} | {varName} | val: {pData} | type: {pType}");
+ }
+ DoLog(sep);
+ DoLog("");
+
+ // lettura lampade
+ DoLog(sep);
+ DoLog("Test lettura lampade Y60..Y63");
+ DoLog(sep);
+ object pvRead = "bbb";
+ int sec = 53;
+ Dictionary DictLamp = new Dictionary();
+ //Y60 --> 10000+96
+ int subSec = 10096;
+ for (int j = 0; j < 5; j++)
+ {
+ for (int i = 0; i < 4; i++)
+ {
+ oEZNcAutCom.Generic_ReadData(0, sec, subSec + i, ref pvRead);
+ DictLamp.Add($"{subSec + i}", $"{pvRead}");
+ }
+ StringBuilder sb = new StringBuilder();
+ foreach (var item in DictLamp)
+ {
+ sb.Append($"{item.Key}:{item.Value} | ");
+ }
+
+ DoLog($"Lamp: Generic ReadData | sec: {sec} | {sb.ToString()}");
+ Thread.Sleep(100);
+ DictLamp = new Dictionary();
+ }
+ DoLog(sep);
+ DoLog("");
+
+ // lettura parametri (pzcount)
+ DoLog(sep);
+ DoLog("Test Parametri");
+ DoLog(sep);
+ int lAxis = 0;
+ int startPar = 8001;
+ if (testWrite)
+ {
+ // scrivo pz req a 100...
+ String[] sValue = new String[1];
+ sValue[0] = "101";
+ oEZNcAutCom.Parameter_SetData3(0, 8003, lAxis, (object)sValue);
+ }
+
+ object parValue = "www";
+ try
+ {
+ oEZNcAutCom.Parameter_GetData3(0, startPar, 3, lAxis, out parValue);
+ string[] rawData = (string[])parValue;
+ DoLog($"Found {rawData.Count()} values");
+ int i = 0;
+ foreach (var item in rawData)
+ {
+ DoLog($"Params | #: {startPar + i} | {item}");
+ i++;
+ }
+ }
+ catch (Exception exc)
+ {
+ DoLog($"{exc}");
+ }
+ DoLog(sep);
+ DoLog("");
+
+ DoLog(sep);
+ DoLog("Test Allarmi");
+ DoLog(sep);
+ // preparo memorie
+ Array plSystem = new long[1];
+ Array pbWarning = new bool[1];
+ Array plAlarmType = new long[1];
+ string pbstrBuffer = "";
+ try
+ {
+ for (int i = 0; i < 5; i++)
+ {
+ oEZNcAutCom.System_GetAlarm2(1, i, out pbstrBuffer);
+ DoLog($"Alarm {i}: {pbstrBuffer}");
+ }
+ }
+ catch (Exception exc)
+ {
+ DoLog($"{exc}");
+ }
+ DoLog(sep);
+ DoLog("");
+
+ DoLog(sep);
+ DoLog("Test Feed");
+ DoLog(sep);
+ // preparo memorie
+ double feed = 0;
+ try
+ {
+ for (int i = 0; i <= 5; i++)
+ {
+ oEZNcAutCom.Position_GetFeedSpeed(i, out feed);
+ DoLog($"FeedSpeed {i}: {feed}");
+
+ oEZNcAutCom.Command_GetFeedCommand(i, out feed);
+ DoLog($"FeedCommand {i}: {feed}");
+ }
+ }
+ catch (Exception exc)
+ {
+ DoLog($"{exc}");
+ }
+ DoLog(sep);
+ DoLog("");
+
+ DoLog(sep);
+ DoLog("Test RunStatus");
+ DoLog(sep);
+ // preparo memorie
+ int plStatus = 0;
+ try
+ {
+ for (int i = 0; i < 4; i++)
+ {
+ oEZNcAutCom.Status_GetRunStatus(i, out plStatus);
+ DoLog($"GetRunStatus | Idx: {i} | Status: {plStatus}");
+ }
+ }
+ catch (Exception exc)
+ {
+ DoLog($"{exc}");
+ }
+ DoLog(sep);
+ DoLog("");
+
+ // Close.
+ iRet = oEZNcAutCom.Close();
+ //Release object
+ oEZNcAutCom = null;
+
+ DoLog("Press enter to close");
+ Console.ReadLine();
+
+ }
+
+ protected static void DoLog(string logMessage)
+ {
+ File.AppendAllText(outPath, $"{logMessage}{Environment.NewLine}");
+ Console.WriteLine(logMessage);
+ }
+
+ public enum PROGRAMTYPE
+ {
+ EZNC_MAINPRG = 0, //メインプログラム
+ EZNC_SUBPRG = 1, //サブプログラム
+ }
+
+ protected static string outPath = "";
+
+ private static string sep = "------------------------";
+ private static Stopwatch sw = new Stopwatch();
+ }
+}
diff --git a/Mitsubishi/Properties/AssemblyInfo.cs b/Mitsubishi/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..9fae477
--- /dev/null
+++ b/Mitsubishi/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Mitsubishi")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Mitsubishi")]
+[assembly: AssemblyCopyright("Copyright © 2024")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("1a4d0968-9c4b-4509-98af-20a62df59558")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Mitsubishi/postBuildTgt.bat b/Mitsubishi/postBuildTgt.bat
new file mode 100644
index 0000000..40b17a1
--- /dev/null
+++ b/Mitsubishi/postBuildTgt.bat
@@ -0,0 +1,70 @@
+@echo off
+echo Effettua pulizia post build: configurazione %1. directory %2
+
+RD /S /Q %2"\lib\da"
+RD /S /Q %2"\lib\de"
+RD /S /Q %2"\lib\es"
+RD /S /Q %2"\lib\fr"
+RD /S /Q %2"\lib\it"
+RD /S /Q %2"\lib\ja-JP"
+RD /S /Q %2"\lib\ko"
+RD /S /Q %2"\lib\nl"
+RD /S /Q %2"\lib\pl"
+RD /S /Q %2"\lib\pt"
+RD /S /Q %2"\lib\ru"
+RD /S /Q %2"\lib\sv"
+RD /S /Q %2"\lib\tr"
+RD /S /Q %2"\lib\zh"
+
+MOVE /Y %2"da" %2"lib\"
+MOVE /Y %2"de" %2"lib\"
+MOVE /Y %2"es" %2"lib\"
+MOVE /Y %2"fr" %2"lib\"
+MOVE /Y %2"it" %2"lib\"
+MOVE /Y %2"ja-JP" %2"lib\"
+MOVE /Y %2"ko" %2"lib\"
+MOVE /Y %2"nl" %2"lib\"
+MOVE /Y %2"pl" %2"lib\"
+MOVE /Y %2"pt" %2"lib\"
+MOVE /Y %2"ru" %2"lib\"
+MOVE /Y %2"sv" %2"lib\"
+MOVE /Y %2"tr" %2"lib\"
+MOVE /Y %2"zh" %2"lib\"
+
+
+if %1 == "Release" goto Release
+if %1 == "Debug" goto Debug
+if %1 == "Remote_DEBUG" goto RemoteDebug
+
+:Release
+REM INIZIO eliminando i files pdb
+del /S %2"*.pdb""
+del /S %2"*.xml""
+del /S %2"lib/*.pdb""
+echo Release: eliminato pdb + xml!!!
+goto END
+
+:Debug
+echo Debug: nulla da eliminare
+
+REM copia script verso server remoto
+REM ROBOCOPY . \\10.150.0.1\Steamware\IOB-WIN-NEXT-DEB /MIR
+
+goto END
+
+
+:RemoteDebug
+REM copia script verso server remoto
+REM echo Debug remoto: effettuo robocopy sync (verificare remote per cliente)
+
+REM IOB-WIN-SIM
+REM ROBOCOPY . \\IOB-WIN-SIMULA\Steamware\IOB-WIN-NEXT-DEB /MIR
+
+REM IOBVPN4MACHINE
+REM ROBOCOPY . \\10.51.90.5\Steamware\TestCli /MIR
+ROBOCOPY . \\10.51.90.6\Steamware\TestCli /MIR
+
+goto END
+
+:END
+echo Fatto!
\ No newline at end of file
diff --git a/RemoteTest.sln b/RemoteTest.sln
new file mode 100644
index 0000000..1e09f5f
--- /dev/null
+++ b/RemoteTest.sln
@@ -0,0 +1,44 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.0.31903.59
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mitsubishi", "Mitsubishi\Mitsubishi.csproj", "{1A4D0968-9C4B-4509-98AF-20A62DF59558}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RestAppCitizen", "RestAppCitizen\RestAppCitizen.csproj", "{F206B5DB-E062-417E-BF29-197FB8111DCD}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MTConnect", "MTConnect\MTConnect.csproj", "{C33D677A-DDAB-41EF-831F-DC9401BC573E}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ Remote_DEBUG|Any CPU = Remote_DEBUG|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {1A4D0968-9C4B-4509-98AF-20A62DF59558}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1A4D0968-9C4B-4509-98AF-20A62DF59558}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1A4D0968-9C4B-4509-98AF-20A62DF59558}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1A4D0968-9C4B-4509-98AF-20A62DF59558}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1A4D0968-9C4B-4509-98AF-20A62DF59558}.Remote_DEBUG|Any CPU.ActiveCfg = Remote_DEBUG|Any CPU
+ {1A4D0968-9C4B-4509-98AF-20A62DF59558}.Remote_DEBUG|Any CPU.Build.0 = Remote_DEBUG|Any CPU
+ {F206B5DB-E062-417E-BF29-197FB8111DCD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F206B5DB-E062-417E-BF29-197FB8111DCD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F206B5DB-E062-417E-BF29-197FB8111DCD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F206B5DB-E062-417E-BF29-197FB8111DCD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F206B5DB-E062-417E-BF29-197FB8111DCD}.Remote_DEBUG|Any CPU.ActiveCfg = Release|Any CPU
+ {F206B5DB-E062-417E-BF29-197FB8111DCD}.Remote_DEBUG|Any CPU.Build.0 = Release|Any CPU
+ {C33D677A-DDAB-41EF-831F-DC9401BC573E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C33D677A-DDAB-41EF-831F-DC9401BC573E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C33D677A-DDAB-41EF-831F-DC9401BC573E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C33D677A-DDAB-41EF-831F-DC9401BC573E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C33D677A-DDAB-41EF-831F-DC9401BC573E}.Remote_DEBUG|Any CPU.ActiveCfg = Remote_DEBUG|Any CPU
+ {C33D677A-DDAB-41EF-831F-DC9401BC573E}.Remote_DEBUG|Any CPU.Build.0 = Remote_DEBUG|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {DC9CC892-232E-4D99-8C91-07F023E0F4FE}
+ EndGlobalSection
+EndGlobal
diff --git a/RestAppCitizen/Program.cs b/RestAppCitizen/Program.cs
new file mode 100644
index 0000000..38961ed
--- /dev/null
+++ b/RestAppCitizen/Program.cs
@@ -0,0 +1,99 @@
+// See https://aka.ms/new-console-template for more information
+using System.Diagnostics;
+using System.Dynamic;
+using Newtonsoft.Json;
+
+
+internal class Program
+{
+ private static void Main(string[] args)
+ {
+ Console.WriteLine(sep);
+ Console.WriteLine("Rest Client test application");
+ Console.WriteLine(sep);
+
+ Console.WriteLine();
+ Console.WriteLine("Call connection");
+ // setup oggetti
+ int tOut = 60;
+ string apiUrl = "http://192.168.80.61:8733/DRIVER_MES/rest/";
+ rCall = new RestCaller(apiUrl, tOut);
+
+ // chiamate!
+ CallAndLog("checkconnection");
+ string token = CallAndLog("gettoken/mecmaticames/mecmatica@mes").Replace("\"", "");
+ string gLamp = CallAndLog($"getsingleladderio/{token}/Y/8E");
+ string yLamp = CallAndLog($"getsingleladderio/{token}/Y/21");
+ string rLamp = CallAndLog($"getsingleladderio/{token}/Y/22");
+ string qtyTot = CallAndLog($"gettotalquantity/{token}");
+ string qtyReq = CallAndLog($"getneededquantity/{token}");
+ string qtyWrk = CallAndLog($"getworkedquantity/{token}");
+ string cTime = CallAndLog($"getcycletime/{token}");
+ string pName = CallAndLog($"getmainprogram/{token}");
+
+ string cAlarm = CallAndLog($"getalarm/{token}");
+ var sAlarm = JsonConvert.DeserializeObject(cAlarm);
+ cAlarm = JsonConvert.SerializeObject(sAlarm, Formatting.Indented);
+
+ string allAlarm = CallAndLog($"getallalarmlog/{token}");
+ var alarmList = JsonConvert.DeserializeObject>(allAlarm);
+ allAlarm = JsonConvert.SerializeObject(alarmList, Formatting.Indented);
+
+ string err = CallAndLog($"getsingleladderio/ABC/Y/22");
+ // ora scrivo i files dei test x debug successivo
+ var appPath = System.Reflection.Assembly.GetExecutingAssembly().Location;
+ var fPath = Directory.GetParent(appPath).FullName;
+ string basePath = Path.Combine(fPath, "Test");
+ if (!Directory.Exists(basePath))
+ {
+ Directory.CreateDirectory(basePath);
+ }
+ File.WriteAllText(Path.Combine(basePath, "token.txt"), token);
+ File.WriteAllText(Path.Combine(basePath, "gLamp.txt"), gLamp);
+ File.WriteAllText(Path.Combine(basePath, "yLamp.txt"), yLamp);
+ File.WriteAllText(Path.Combine(basePath, "rLamp.txt"), rLamp);
+ File.WriteAllText(Path.Combine(basePath, "qtyTot.txt"), qtyTot);
+ File.WriteAllText(Path.Combine(basePath, "qtyReq.txt"), qtyReq);
+ File.WriteAllText(Path.Combine(basePath, "qtyWrk.txt"), qtyWrk);
+ File.WriteAllText(Path.Combine(basePath, "cTime.txt"), cTime);
+ File.WriteAllText(Path.Combine(basePath, "pName.txt"), pName);
+ File.WriteAllText(Path.Combine(basePath, "cAlarm.txt"), cAlarm);
+ File.WriteAllText(Path.Combine(basePath, "allAlarm.txt"), allAlarm);
+ }
+
+ private static RestCaller rCall { get; set; } = new RestCaller("http://localhost", 60);
+ private static string sep = "------------------------";
+ private static Stopwatch sw = new Stopwatch();
+
+ private static string CallAndLog(string fullUri)
+ {
+ sw.Restart();
+ Console.WriteLine(sep);
+ Console.WriteLine($"Calling: {fullUri}");
+ // chiamo
+ string answ = rCall.ExecuteCallGet(fullUri);
+ sw.Stop();
+ // loggo
+ Console.WriteLine(answ);
+ Console.WriteLine($"Elapsed: {sw.ElapsedMilliseconds}");
+ Console.WriteLine(sep);
+ Console.WriteLine();
+ return answ;
+ }
+}
+
+internal class AlarmInfo
+{
+ public int id { get; set; } = 0;
+ public string? ErrorMessage { get; set; } = null;
+ public DateTime date { get; set; } = DateTime.Today.AddYears(-10);
+ public string message { get; set; } = "";
+ public string type { get; set; } = "";
+}
+internal class WarnInfo
+{
+ public bool IsAlarm { get; set; } = false;
+ public bool IsCaution { get; set; } = false;
+ public string? ErrorMessage { get; set; } = null;
+ public string message { get; set; } = "";
+}
\ No newline at end of file
diff --git a/RestAppCitizen/RestAppCitizen.csproj b/RestAppCitizen/RestAppCitizen.csproj
new file mode 100644
index 0000000..1cd95a4
--- /dev/null
+++ b/RestAppCitizen/RestAppCitizen.csproj
@@ -0,0 +1,15 @@
+
+
+
+ Exe
+ net8.0
+ enable
+ enable
+
+
+
+
+
+
+
+
diff --git a/RestAppCitizen/RestCaller.cs b/RestAppCitizen/RestCaller.cs
new file mode 100644
index 0000000..b41b05a
--- /dev/null
+++ b/RestAppCitizen/RestCaller.cs
@@ -0,0 +1,62 @@
+
+using RestSharp;
+
+public class RestCaller
+{
+ ///
+ /// Classe gestione chiamate REST
+ ///
+ ///
+ ///
+ public RestCaller(string ApiUrl, int TimeOutSec)
+ {
+ tOut = TimeOutSec;
+ apiUrl = ApiUrl;
+
+ restOptStd = new RestClientOptions
+ {
+ Timeout = TimeSpan.FromSeconds(tOut),
+ BaseUrl = new Uri(apiUrl)
+ };
+ }
+
+ ///
+ /// Esecuzione chiamata Rest tipo GET
+ ///
+ ///
+ ///
+ public string ExecuteCallGet(string resource)
+ {
+ string answ = "";
+ if (!string.IsNullOrEmpty(resource))
+ {
+ // client chiamate rest
+ using (var client = new RestClient(restOptStd))
+ {
+ var currReq = new RestRequest(resource, Method.Get);
+ // currReq.AddHeader("Content-type", "application/xml");
+ currReq.AddHeader("Content-type", "application/json");
+ // effettuo vera chiamata
+ var currResp = client.Get(currReq);
+ if (currResp.StatusCode == System.Net.HttpStatusCode.OK && currResp.Content != null)
+ {
+ answ = $"{currResp.Content}";
+ }
+ }
+ }
+ return answ;
+ }
+
+
+
+ protected string apiUrl = "";
+ protected int tOut = 60;
+
+
+
+ ///
+ /// Conf client RestSharp standard:
+ /// - timeout 1 min
+ ///
+ private RestClientOptions restOptStd = new RestClientOptions { Timeout = TimeSpan.FromSeconds(60) };
+}
\ No newline at end of file
diff --git a/RestAppCitizen/Test/json/allAlarm.txt b/RestAppCitizen/Test/json/allAlarm.txt
new file mode 100644
index 0000000..941ea75
--- /dev/null
+++ b/RestAppCitizen/Test/json/allAlarm.txt
@@ -0,0 +1 @@
+[{"ErrorMessage":null,"date":"\/Date(1731318651000+0100)\/","id":1,"message":"Contapezzi pieno. La quantit� impostata � stata raggiunta.","type":"EX200"},{"ErrorMessage":null,"date":"\/Date(1731317285000+0100)\/","id":2,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1731317212000+0100)\/","id":3,"message":"Caricatore barre non pronto. Alimentazione non fornita.","type":"EX133"},{"ErrorMessage":null,"date":"\/Date(1731317211000+0100)\/","id":4,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1731313014000+0100)\/","id":5,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1731312611000+0100)\/","id":6,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1731312520000+0100)\/","id":7,"message":"All. dstrb. (zona)","type":"M04"},{"ErrorMessage":null,"date":"\/Date(1731311075000+0100)\/","id":8,"message":"Sovraccarico convogliatore trucioli. Convogliat. Inceppato.","type":"EX208"},{"ErrorMessage":null,"date":"\/Date(1731106637000+0100)\/","id":9,"message":"Caricatore barre non pronto. Alimentazione non fornita.","type":"EX133"},{"ErrorMessage":null,"date":"\/Date(1731106637000+0100)\/","id":10,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1731095466000+0100)\/","id":11,"message":"Pinza mandrino chiusa. Aprire la pinza.","type":"EX501"},{"ErrorMessage":null,"date":"\/Date(1731095318000+0100)\/","id":12,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1731094918000+0100)\/","id":13,"message":"Caricatore barre non pronto. Alimentazione non fornita.","type":"EX133"},{"ErrorMessage":null,"date":"\/Date(1731094917000+0100)\/","id":14,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1731079195000+0100)\/","id":15,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1731079090000+0100)\/","id":16,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1731078999000+0100)\/","id":17,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1731078850000+0100)\/","id":18,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1731078596000+0100)\/","id":19,"message":"All. distrb. (comando)","type":"M03"},{"ErrorMessage":null,"date":"\/Date(1731077989000+0100)\/","id":20,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1731077960000+0100)\/","id":21,"message":"All. dstrb. (zona)","type":"M04"},{"ErrorMessage":null,"date":"\/Date(1731077517000+0100)\/","id":22,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1731073286000+0100)\/","id":23,"message":"All. dstrb. (zona)","type":"M04"},{"ErrorMessage":null,"date":"\/Date(1731072889000+0100)\/","id":24,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1731072722000+0100)\/","id":25,"message":"All. distrb. (comando)","type":"M03"},{"ErrorMessage":null,"date":"\/Date(1731066125000+0100)\/","id":26,"message":"Caricatore barre non pronto. Alimentazione non fornita.","type":"EX133"},{"ErrorMessage":null,"date":"\/Date(1731062496000+0100)\/","id":27,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1731062178000+0100)\/","id":28,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1731062107000+0100)\/","id":29,"message":"Allarme motore utensili contro mandrino.","type":"EX009"},{"ErrorMessage":null,"date":"\/Date(1731062107000+0100)\/","id":30,"message":"Allarme Motore mandrino utensile opposto.","type":"EX008"},{"ErrorMessage":null,"date":"\/Date(1731062107000+0100)\/","id":31,"message":"Allarme motore mandrino utensile Gang.","type":"EX005"},{"ErrorMessage":null,"date":"\/Date(1731062107000+0100)\/","id":32,"message":"Allarme motore mandr. post. L'azionamento � in allarme.","type":"EX004"},{"ErrorMessage":null,"date":"\/Date(1731062107000+0100)\/","id":33,"message":"Allarme motore mandr. princ. L'azionamento � in allarme.","type":"EX003"},{"ErrorMessage":null,"date":"\/Date(1731062107000+0100)\/","id":34,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1731062107000+0100)\/","id":35,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1731062107000+0100)\/","id":36,"message":"Stop di emerg.","type":"EMG"},{"ErrorMessage":null,"date":"\/Date(1731062107000+0100)\/","id":37,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1731062107000+0100)\/","id":38,"message":"Segnale blocco porta illeg. Blocco porta difett.","type":"EX304"},{"ErrorMessage":null,"date":"\/Date(1731062107000+0100)\/","id":39,"message":"No ctrl.veloc.con porta aperta","type":"Y20"},{"ErrorMessage":null,"date":"\/Date(1731062106000+0100)\/","id":40,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1731062071000+0100)\/","id":41,"message":"Allarme pulsante di emergenza. Pulsante premuto.","type":"EX052"},{"ErrorMessage":null,"date":"\/Date(1731062068000+0100)\/","id":42,"message":"Stop di emerg.","type":"EMG"},{"ErrorMessage":null,"date":"\/Date(1731062065000+0100)\/","id":43,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1731049685000+0100)\/","id":44,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1731043808000+0100)\/","id":45,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1731043380000+0100)\/","id":46,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1731043227000+0100)\/","id":47,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1731042813000+0100)\/","id":48,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1731042448000+0100)\/","id":49,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1731042366000+0100)\/","id":50,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1731042176000+0100)\/","id":51,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1731041953000+0100)\/","id":52,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1731040748000+0100)\/","id":53,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1731012589000+0100)\/","id":54,"message":"Contapezzi pieno. La quantit� impostata � stata raggiunta.","type":"EX200"},{"ErrorMessage":null,"date":"\/Date(1730999923000+0100)\/","id":55,"message":"Allarme mancanza liquido refrigerante. Rabboccare.","type":"EX203"},{"ErrorMessage":null,"date":"\/Date(1730989161000+0100)\/","id":56,"message":"Contapezzi pieno. La quantit� impostata � stata raggiunta.","type":"EX200"},{"ErrorMessage":null,"date":"\/Date(1730965769000+0100)\/","id":57,"message":"Contapezzi pieno. La quantit� impostata � stata raggiunta.","type":"EX200"},{"ErrorMessage":null,"date":"\/Date(1730954444000+0100)\/","id":58,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730943256000+0100)\/","id":59,"message":"Contapezzi pieno. La quantit� impostata � stata raggiunta.","type":"EX200"},{"ErrorMessage":null,"date":"\/Date(1730922376000+0100)\/","id":60,"message":"All. distrb. (comando)","type":"M03"},{"ErrorMessage":null,"date":"\/Date(1730921426000+0100)\/","id":61,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730921341000+0100)\/","id":62,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730920440000+0100)\/","id":63,"message":"All. distrb. (comando)","type":"M03"},{"ErrorMessage":null,"date":"\/Date(1730920403000+0100)\/","id":64,"message":"All. distrb. (comando)","type":"M03"},{"ErrorMessage":null,"date":"\/Date(1730920270000+0100)\/","id":65,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730920004000+0100)\/","id":66,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730918176000+0100)\/","id":67,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730918142000+0100)\/","id":68,"message":"Stop di emerg.","type":"EMG"},{"ErrorMessage":null,"date":"\/Date(1730918140000+0100)\/","id":69,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730918140000+0100)\/","id":70,"message":"Ctrl.sicur.: err.veloc.comando","type":"Y20"},{"ErrorMessage":null,"date":"\/Date(1730917689000+0100)\/","id":71,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730917613000+0100)\/","id":72,"message":"Pinza mandrino chiusa. Aprire la pinza.","type":"EX501"},{"ErrorMessage":null,"date":"\/Date(1730916598000+0100)\/","id":73,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730913167000+0100)\/","id":74,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730912986000+0100)\/","id":75,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730912954000+0100)\/","id":76,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730911578000+0100)\/","id":77,"message":"Contapezzi pieno. La quantit� impostata � stata raggiunta.","type":"EX200"},{"ErrorMessage":null,"date":"\/Date(1730893807000+0100)\/","id":78,"message":"Allarme mancanza liquido refrigerante. Rabboccare.","type":"EX203"},{"ErrorMessage":null,"date":"\/Date(1730884140000+0100)\/","id":79,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730876528000+0100)\/","id":80,"message":"All. dstrb. (zona)","type":"M04"},{"ErrorMessage":null,"date":"\/Date(1730876524000+0100)\/","id":81,"message":"Mandrino posteriore in funzione.","type":"EX591"},{"ErrorMessage":null,"date":"\/Date(1730876150000+0100)\/","id":82,"message":"Ripos. a zero non terminato","type":"P430"},{"ErrorMessage":null,"date":"\/Date(1730875382000+0100)\/","id":83,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730875373000+0100)\/","id":84,"message":"Ripos. a zero non terminato","type":"P430"},{"ErrorMessage":null,"date":"\/Date(1730875288000+0100)\/","id":85,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730875278000+0100)\/","id":86,"message":"Ripos. a zero non terminato","type":"P430"},{"ErrorMessage":null,"date":"\/Date(1730867756000+0100)\/","id":87,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730844080000+0100)\/","id":88,"message":"Contapezzi pieno. La quantit� impostata � stata raggiunta.","type":"EX200"},{"ErrorMessage":null,"date":"\/Date(1730818763000+0100)\/","id":89,"message":"Errore fasatura","type":"P192"},{"ErrorMessage":null,"date":"\/Date(1730816092000+0100)\/","id":90,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730815885000+0100)\/","id":91,"message":"All. distrb. (comando)","type":"M03"},{"ErrorMessage":null,"date":"\/Date(1730815880000+0100)\/","id":92,"message":"All. distrb. (comando)","type":"M03"},{"ErrorMessage":null,"date":"\/Date(1730815804000+0100)\/","id":93,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730815736000+0100)\/","id":94,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730809717000+0100)\/","id":95,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730809654000+0100)\/","id":96,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730809594000+0100)\/","id":97,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730809539000+0100)\/","id":98,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730809447000+0100)\/","id":99,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730809422000+0100)\/","id":100,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730809283000+0100)\/","id":101,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730809224000+0100)\/","id":102,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730809197000+0100)\/","id":103,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730808854000+0100)\/","id":104,"message":"Caricatore barre non pronto. Alimentazione non fornita.","type":"EX133"},{"ErrorMessage":null,"date":"\/Date(1730786841000+0100)\/","id":105,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730781545000+0100)\/","id":106,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730781487000+0100)\/","id":107,"message":"Allarme motore utensili contro mandrino.","type":"EX009"},{"ErrorMessage":null,"date":"\/Date(1730781487000+0100)\/","id":108,"message":"Allarme Motore mandrino utensile opposto.","type":"EX008"},{"ErrorMessage":null,"date":"\/Date(1730781487000+0100)\/","id":109,"message":"Allarme motore mandrino utensile Gang.","type":"EX005"},{"ErrorMessage":null,"date":"\/Date(1730781487000+0100)\/","id":110,"message":"Allarme motore mandr. post. L'azionamento � in allarme.","type":"EX004"},{"ErrorMessage":null,"date":"\/Date(1730781487000+0100)\/","id":111,"message":"Allarme motore mandr. princ. L'azionamento � in allarme.","type":"EX003"},{"ErrorMessage":null,"date":"\/Date(1730781487000+0100)\/","id":112,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730781487000+0100)\/","id":113,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730781487000+0100)\/","id":114,"message":"Stop di emerg.","type":"EMG"},{"ErrorMessage":null,"date":"\/Date(1730781487000+0100)\/","id":115,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730781487000+0100)\/","id":116,"message":"Segnale blocco porta illeg. Blocco porta difett.","type":"EX304"},{"ErrorMessage":null,"date":"\/Date(1730781487000+0100)\/","id":117,"message":"No ctrl.veloc.con porta aperta","type":"Y20"},{"ErrorMessage":null,"date":"\/Date(1730781486000+0100)\/","id":118,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730753269000+0100)\/","id":119,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730753135000+0100)\/","id":120,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730753046000+0100)\/","id":121,"message":"All. distrb. (comando)","type":"M03"},{"ErrorMessage":null,"date":"\/Date(1730752975000+0100)\/","id":122,"message":"All. distrb. (comando)","type":"M03"},{"ErrorMessage":null,"date":"\/Date(1730751420000+0100)\/","id":123,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730751049000+0100)\/","id":124,"message":"All. distrb. (comando)","type":"M03"},{"ErrorMessage":null,"date":"\/Date(1730750959000+0100)\/","id":125,"message":"All. distrb. (comando)","type":"M03"},{"ErrorMessage":null,"date":"\/Date(1730750918000+0100)\/","id":126,"message":"All. distrb. (comando)","type":"M03"},{"ErrorMessage":null,"date":"\/Date(1730750865000+0100)\/","id":127,"message":"All. distrb. (comando)","type":"M03"},{"ErrorMessage":null,"date":"\/Date(1730750621000+0100)\/","id":128,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730750516000+0100)\/","id":129,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730750415000+0100)\/","id":130,"message":"All. distrb. (comando)","type":"M03"},{"ErrorMessage":null,"date":"\/Date(1730750330000+0100)\/","id":131,"message":"All. distrb. (comando)","type":"M03"},{"ErrorMessage":null,"date":"\/Date(1730750163000+0100)\/","id":132,"message":"All. distrb. (comando)","type":"M03"},{"ErrorMessage":null,"date":"\/Date(1730750112000+0100)\/","id":133,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730748819000+0100)\/","id":134,"message":"Caricatore barre non pronto. Alimentazione non fornita.","type":"EX133"},{"ErrorMessage":null,"date":"\/Date(1730748728000+0100)\/","id":135,"message":"Il numero utensile specificato � fuori campo.","type":"EX506"},{"ErrorMessage":null,"date":"\/Date(1730748658000+0100)\/","id":136,"message":"Caricatore barre non pronto. Alimentazione non fornita.","type":"EX133"},{"ErrorMessage":null,"date":"\/Date(1730748558000+0100)\/","id":137,"message":"Lav. con portaut. front. sull�autoc. princ. causa interf.","type":"EX729"},{"ErrorMessage":null,"date":"\/Date(1730748497000+0100)\/","id":138,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730748459000+0100)\/","id":139,"message":"Pinza mandrino chiusa. Aprire la pinza.","type":"EX501"},{"ErrorMessage":null,"date":"\/Date(1730748213000+0100)\/","id":140,"message":"Lav. con portaut. front. sull�autoc. princ. causa interf.","type":"EX729"},{"ErrorMessage":null,"date":"\/Date(1730748148000+0100)\/","id":141,"message":"Pinza mandrino chiusa. Aprire la pinza.","type":"EX501"},{"ErrorMessage":null,"date":"\/Date(1730748128000+0100)\/","id":142,"message":"Pinza mandrino chiusa. Aprire la pinza.","type":"EX501"},{"ErrorMessage":null,"date":"\/Date(1730748016000+0100)\/","id":143,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730747492000+0100)\/","id":144,"message":"All. dstrb. (zona)","type":"M04"},{"ErrorMessage":null,"date":"\/Date(1730747477000+0100)\/","id":145,"message":"Lav. con portaut. front. sull�autoc. princ. causa interf.","type":"EX729"},{"ErrorMessage":null,"date":"\/Date(1730744474000+0100)\/","id":146,"message":"Lav. con portaut. front. sull�autoc. princ. causa interf.","type":"EX729"},{"ErrorMessage":null,"date":"\/Date(1730744436000+0100)\/","id":147,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730744243000+0100)\/","id":148,"message":"Lav. con portaut. front. sull�autoc. princ. causa interf.","type":"EX729"},{"ErrorMessage":null,"date":"\/Date(1730743963000+0100)\/","id":149,"message":"Lav. con portaut. front. sull�autoc. princ. causa interf.","type":"EX729"},{"ErrorMessage":null,"date":"\/Date(1730743835000+0100)\/","id":150,"message":"Lav. con portaut. front. sull�autoc. princ. causa interf.","type":"EX729"},{"ErrorMessage":null,"date":"\/Date(1730743632000+0100)\/","id":151,"message":"Lav. con portaut. front. sull�autoc. princ. causa interf.","type":"EX729"},{"ErrorMessage":null,"date":"\/Date(1730743536000+0100)\/","id":152,"message":"Lav. con portaut. front. sull�autoc. princ. causa interf.","type":"EX729"},{"ErrorMessage":null,"date":"\/Date(1730743510000+0100)\/","id":153,"message":"Lav. con portaut. front. sull�autoc. princ. causa interf.","type":"EX729"},{"ErrorMessage":null,"date":"\/Date(1730743041000+0100)\/","id":154,"message":"Lav. con portaut. front. sull�autoc. princ. causa interf.","type":"EX729"},{"ErrorMessage":null,"date":"\/Date(1730740216000+0100)\/","id":155,"message":"All. distrb. (comando)","type":"M03"},{"ErrorMessage":null,"date":"\/Date(1730739891000+0100)\/","id":156,"message":"Impossibile specificare questo codice T.","type":"EX522"},{"ErrorMessage":null,"date":"\/Date(1730739855000+0100)\/","id":157,"message":"Impossibile specificare questo codice T.","type":"EX522"},{"ErrorMessage":null,"date":"\/Date(1730739721000+0100)\/","id":158,"message":"Impossibile specificare questo codice T.","type":"EX522"},{"ErrorMessage":null,"date":"\/Date(1730739701000+0100)\/","id":159,"message":"Impossibile specificare questo codice T.","type":"EX522"},{"ErrorMessage":null,"date":"\/Date(1730739388000+0100)\/","id":160,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730737445000+0100)\/","id":161,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730734314000+0100)\/","id":162,"message":"Contapezzi pieno. La quantit� impostata � stata raggiunta.","type":"EX200"},{"ErrorMessage":null,"date":"\/Date(1730716887000+0100)\/","id":163,"message":"L'espulsore non � in posizione arretrata.","type":"EX113"},{"ErrorMessage":null,"date":"\/Date(1730716751000+0100)\/","id":164,"message":"All. dstrb. (zona)","type":"M04"},{"ErrorMessage":null,"date":"\/Date(1730716735000+0100)\/","id":165,"message":"Ritrarre estrattore.","type":"EX148"},{"ErrorMessage":null,"date":"\/Date(1730716735000+0100)\/","id":166,"message":"Il sensore urto � anomalo.","type":"EX144"},{"ErrorMessage":null,"date":"\/Date(1730696666000+0100)\/","id":167,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730694998000+0100)\/","id":168,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730430865000+0100)\/","id":169,"message":"Caricatore barre non pronto. Alimentazione non fornita.","type":"EX133"},{"ErrorMessage":null,"date":"\/Date(1730430864000+0100)\/","id":170,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730408309000+0100)\/","id":171,"message":"Ritrarre estrattore.","type":"EX148"},{"ErrorMessage":null,"date":"\/Date(1730408105000+0100)\/","id":172,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730408081000+0100)\/","id":173,"message":"All. dstrb. (zona)","type":"M04"},{"ErrorMessage":null,"date":"\/Date(1730408051000+0100)\/","id":174,"message":"Ritrarre estrattore.","type":"EX148"},{"ErrorMessage":null,"date":"\/Date(1730408051000+0100)\/","id":175,"message":"Il sensore urto � anomalo.","type":"EX144"},{"ErrorMessage":null,"date":"\/Date(1730407021000+0100)\/","id":176,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730406821000+0100)\/","id":177,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730403110000+0100)\/","id":178,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730402945000+0100)\/","id":179,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730399670000+0100)\/","id":180,"message":"All. dstrb. (zona)","type":"M04"},{"ErrorMessage":null,"date":"\/Date(1730399669000+0100)\/","id":181,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730399577000+0100)\/","id":182,"message":"Stop di emerg.","type":"EMG"},{"ErrorMessage":null,"date":"\/Date(1730399577000+0100)\/","id":183,"message":"All. dstrb. (zona)","type":"M04"},{"ErrorMessage":null,"date":"\/Date(1730398345000+0100)\/","id":184,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730395798000+0100)\/","id":185,"message":"Ritrarre estrattore.","type":"EX148"},{"ErrorMessage":null,"date":"\/Date(1730395732000+0100)\/","id":186,"message":"Ritrarre estrattore.","type":"EX148"},{"ErrorMessage":null,"date":"\/Date(1730395436000+0100)\/","id":187,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730395378000+0100)\/","id":188,"message":"All. dstrb. (zona)","type":"M04"},{"ErrorMessage":null,"date":"\/Date(1730395365000+0100)\/","id":189,"message":"Ritrarre estrattore.","type":"EX148"},{"ErrorMessage":null,"date":"\/Date(1730395365000+0100)\/","id":190,"message":"Il sensore urto � anomalo.","type":"EX144"},{"ErrorMessage":null,"date":"\/Date(1730393096000+0100)\/","id":191,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730393053000+0100)\/","id":192,"message":"All. dstrb. (zona)","type":"M04"},{"ErrorMessage":null,"date":"\/Date(1730388265000+0100)\/","id":193,"message":"Ritrarre estrattore.","type":"EX148"},{"ErrorMessage":null,"date":"\/Date(1730388199000+0100)\/","id":194,"message":"Ritrarre estrattore.","type":"EX148"},{"ErrorMessage":null,"date":"\/Date(1730388180000+0100)\/","id":195,"message":"L'espulsore non � in posizione arretrata.","type":"EX113"},{"ErrorMessage":null,"date":"\/Date(1730388172000+0100)\/","id":196,"message":"Ritrarre estrattore.","type":"EX148"},{"ErrorMessage":null,"date":"\/Date(1730388034000+0100)\/","id":197,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730387969000+0100)\/","id":198,"message":"All. dstrb. (zona)","type":"M04"},{"ErrorMessage":null,"date":"\/Date(1730386788000+0100)\/","id":199,"message":"Ritrarre estrattore.","type":"EX148"},{"ErrorMessage":null,"date":"\/Date(1730386788000+0100)\/","id":200,"message":"Il sensore urto � anomalo.","type":"EX144"},{"ErrorMessage":null,"date":"\/Date(1730379252000+0100)\/","id":201,"message":"Caricatore barre non pronto. Alimentazione non fornita.","type":"EX133"},{"ErrorMessage":null,"date":"\/Date(1730379178000+0100)\/","id":202,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730379014000+0100)\/","id":203,"message":"Caricatore barre non pronto. Alimentazione non fornita.","type":"EX133"},{"ErrorMessage":null,"date":"\/Date(1730379014000+0100)\/","id":204,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730372226000+0100)\/","id":205,"message":"Sovraccarico convogliatore trucioli. Convogliat. Inceppato.","type":"EX208"},{"ErrorMessage":null,"date":"\/Date(1730370482000+0100)\/","id":206,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730370319000+0100)\/","id":207,"message":"All. dstrb. (zona)","type":"M04"},{"ErrorMessage":null,"date":"\/Date(1730369760000+0100)\/","id":208,"message":"Ritrarre estrattore.","type":"EX148"},{"ErrorMessage":null,"date":"\/Date(1730369760000+0100)\/","id":209,"message":"Il sensore urto � anomalo.","type":"EX144"},{"ErrorMessage":null,"date":"\/Date(1730367844000+0100)\/","id":210,"message":"Ritrarre estrattore.","type":"EX148"},{"ErrorMessage":null,"date":"\/Date(1730367844000+0100)\/","id":211,"message":"Il sensore urto � anomalo.","type":"EX144"},{"ErrorMessage":null,"date":"\/Date(1730367799000+0100)\/","id":212,"message":"Ritrarre estrattore.","type":"EX148"},{"ErrorMessage":null,"date":"\/Date(1730367738000+0100)\/","id":213,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730367670000+0100)\/","id":214,"message":"All. dstrb. (zona)","type":"M04"},{"ErrorMessage":null,"date":"\/Date(1730367649000+0100)\/","id":215,"message":"Ritrarre estrattore.","type":"EX148"},{"ErrorMessage":null,"date":"\/Date(1730367649000+0100)\/","id":216,"message":"Il sensore urto � anomalo.","type":"EX144"},{"ErrorMessage":null,"date":"\/Date(1730362481000+0100)\/","id":217,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730362027000+0100)\/","id":218,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730361509000+0100)\/","id":219,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730361440000+0100)\/","id":220,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730356251000+0100)\/","id":221,"message":"All. dstrb. (zona)","type":"M04"},{"ErrorMessage":null,"date":"\/Date(1730349652000+0100)\/","id":222,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730349494000+0100)\/","id":223,"message":"Allarme motore utensili contro mandrino.","type":"EX009"},{"ErrorMessage":null,"date":"\/Date(1730349494000+0100)\/","id":224,"message":"Allarme Motore mandrino utensile opposto.","type":"EX008"},{"ErrorMessage":null,"date":"\/Date(1730349494000+0100)\/","id":225,"message":"Allarme motore mandrino utensile Gang.","type":"EX005"},{"ErrorMessage":null,"date":"\/Date(1730349494000+0100)\/","id":226,"message":"Allarme motore mandr. post. L'azionamento � in allarme.","type":"EX004"},{"ErrorMessage":null,"date":"\/Date(1730349494000+0100)\/","id":227,"message":"Allarme motore mandr. princ. L'azionamento � in allarme.","type":"EX003"},{"ErrorMessage":null,"date":"\/Date(1730349494000+0100)\/","id":228,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730349494000+0100)\/","id":229,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730349494000+0100)\/","id":230,"message":"Stop di emerg.","type":"EMG"},{"ErrorMessage":null,"date":"\/Date(1730349494000+0100)\/","id":231,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730349494000+0100)\/","id":232,"message":"Segnale blocco porta illeg. Blocco porta difett.","type":"EX304"},{"ErrorMessage":null,"date":"\/Date(1730349494000+0100)\/","id":233,"message":"No ctrl.veloc.con porta aperta","type":"Y20"},{"ErrorMessage":null,"date":"\/Date(1730349493000+0100)\/","id":234,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730319988000+0100)\/","id":235,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730317188000+0100)\/","id":236,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730317049000+0100)\/","id":237,"message":"Stop di emerg.","type":"EMG"},{"ErrorMessage":null,"date":"\/Date(1730317037000+0100)\/","id":238,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730317037000+0100)\/","id":239,"message":"Riconosc. collis. 0","type":"S03"},{"ErrorMessage":null,"date":"\/Date(1730317037000+0100)\/","id":240,"message":"Stop di emerg.","type":"EMG"},{"ErrorMessage":null,"date":"\/Date(1730316472000+0100)\/","id":241,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730316398000+0100)\/","id":242,"message":"Stop di emerg.","type":"EMG"},{"ErrorMessage":null,"date":"\/Date(1730316391000+0100)\/","id":243,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730316390000+0100)\/","id":244,"message":"Riconosc. collis. 0","type":"S03"},{"ErrorMessage":null,"date":"\/Date(1730316390000+0100)\/","id":245,"message":"Stop di emerg.","type":"EMG"},{"ErrorMessage":null,"date":"\/Date(1730314947000+0100)\/","id":246,"message":"All. distrb. (comando)","type":"M03"},{"ErrorMessage":null,"date":"\/Date(1730313108000+0100)\/","id":247,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730313047000+0100)\/","id":248,"message":"All. distrb. (comando)","type":"M03"},{"ErrorMessage":null,"date":"\/Date(1730313003000+0100)\/","id":249,"message":"All. distrb. (comando)","type":"M03"},{"ErrorMessage":null,"date":"\/Date(1730312860000+0100)\/","id":250,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730311622000+0100)\/","id":251,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730311145000+0100)\/","id":252,"message":"All. dstrb. (zona)","type":"M04"},{"ErrorMessage":null,"date":"\/Date(1730310837000+0100)\/","id":253,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730310811000+0100)\/","id":254,"message":"All. distrb. (comando)","type":"M03"},{"ErrorMessage":null,"date":"\/Date(1730307688000+0100)\/","id":255,"message":"Sovraccarico convogliatore trucioli. Convogliat. Inceppato.","type":"EX208"},{"ErrorMessage":null,"date":"\/Date(1730303727000+0100)\/","id":256,"message":"Lav. con portaut. front. sull�autoc. princ. causa interf.","type":"EX729"},{"ErrorMessage":null,"date":"\/Date(1730303686000+0100)\/","id":257,"message":"Caricatore barre non pronto. Alimentazione non fornita.","type":"EX133"},{"ErrorMessage":null,"date":"\/Date(1730299949000+0100)\/","id":258,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730299910000+0100)\/","id":259,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730297846000+0100)\/","id":260,"message":"Finecorsa S\/W asse presente","type":"M01"},{"ErrorMessage":null,"date":"\/Date(1730295106000+0100)\/","id":261,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730295074000+0100)\/","id":262,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730294849000+0100)\/","id":263,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730292474000+0100)\/","id":264,"message":"Contapezzi pieno. La quantit� impostata � stata raggiunta.","type":"EX200"},{"ErrorMessage":null,"date":"\/Date(1730287887000+0100)\/","id":265,"message":"Sovraccarico convogliatore trucioli. Convogliat. Inceppato.","type":"EX208"},{"ErrorMessage":null,"date":"\/Date(1730287477000+0100)\/","id":266,"message":"Sovraccarico convogliatore trucioli. Convogliat. Inceppato.","type":"EX208"},{"ErrorMessage":null,"date":"\/Date(1730287384000+0100)\/","id":267,"message":"Sovraccarico convogliatore trucioli. Convogliat. Inceppato.","type":"EX208"},{"ErrorMessage":null,"date":"\/Date(1730285630000+0100)\/","id":268,"message":"Allarme mancanza liquido refrigerante. Rabboccare.","type":"EX203"},{"ErrorMessage":null,"date":"\/Date(1730283588000+0100)\/","id":269,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730285866000+0100)\/","id":270,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730285172000+0100)\/","id":271,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730278892000+0100)\/","id":272,"message":"Allarme esterno 3. Dispositivo opzionale in allarme.","type":"EX103"},{"ErrorMessage":null,"date":"\/Date(1730278892000+0100)\/","id":273,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730278614000+0100)\/","id":274,"message":"Allarme esterno 3. Dispositivo opzionale in allarme.","type":"EX103"},{"ErrorMessage":null,"date":"\/Date(1730278614000+0100)\/","id":275,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730277975000+0100)\/","id":276,"message":"Allarme motore utensili contro mandrino.","type":"EX009"},{"ErrorMessage":null,"date":"\/Date(1730277975000+0100)\/","id":277,"message":"Allarme Motore mandrino utensile opposto.","type":"EX008"},{"ErrorMessage":null,"date":"\/Date(1730277975000+0100)\/","id":278,"message":"Allarme motore mandrino utensile Gang.","type":"EX005"},{"ErrorMessage":null,"date":"\/Date(1730277975000+0100)\/","id":279,"message":"Allarme motore mandr. post. L'azionamento � in allarme.","type":"EX004"},{"ErrorMessage":null,"date":"\/Date(1730277975000+0100)\/","id":280,"message":"Allarme motore mandr. princ. L'azionamento � in allarme.","type":"EX003"},{"ErrorMessage":null,"date":"\/Date(1730277975000+0100)\/","id":281,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730277975000+0100)\/","id":282,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730277975000+0100)\/","id":283,"message":"Stop di emerg.","type":"EMG"},{"ErrorMessage":null,"date":"\/Date(1730277975000+0100)\/","id":284,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730277975000+0100)\/","id":285,"message":"Segnale blocco porta illeg. Blocco porta difett.","type":"EX304"},{"ErrorMessage":null,"date":"\/Date(1730277975000+0100)\/","id":286,"message":"No ctrl.veloc.con porta aperta","type":"Y20"},{"ErrorMessage":null,"date":"\/Date(1730277974000+0100)\/","id":287,"message":"Allarme esterno 3. Dispositivo opzionale in allarme.","type":"EX103"},{"ErrorMessage":null,"date":"\/Date(1730277974000+0100)\/","id":288,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730277464000+0100)\/","id":289,"message":"Allarme esterno 3. Dispositivo opzionale in allarme.","type":"EX103"},{"ErrorMessage":null,"date":"\/Date(1730276787000+0100)\/","id":290,"message":"Allarme motore utensili contro mandrino.","type":"EX009"},{"ErrorMessage":null,"date":"\/Date(1730276787000+0100)\/","id":291,"message":"Allarme Motore mandrino utensile opposto.","type":"EX008"},{"ErrorMessage":null,"date":"\/Date(1730276787000+0100)\/","id":292,"message":"Allarme motore mandrino utensile Gang.","type":"EX005"},{"ErrorMessage":null,"date":"\/Date(1730276787000+0100)\/","id":293,"message":"Allarme motore mandr. post. L'azionamento � in allarme.","type":"EX004"},{"ErrorMessage":null,"date":"\/Date(1730276787000+0100)\/","id":294,"message":"Allarme motore mandr. princ. L'azionamento � in allarme.","type":"EX003"},{"ErrorMessage":null,"date":"\/Date(1730276787000+0100)\/","id":295,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730276787000+0100)\/","id":296,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730276787000+0100)\/","id":297,"message":"Stop di emerg.","type":"EMG"},{"ErrorMessage":null,"date":"\/Date(1730276787000+0100)\/","id":298,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730276787000+0100)\/","id":299,"message":"Segnale blocco porta illeg. Blocco porta difett.","type":"EX304"},{"ErrorMessage":null,"date":"\/Date(1730276787000+0100)\/","id":300,"message":"No ctrl.veloc.con porta aperta","type":"Y20"},{"ErrorMessage":null,"date":"\/Date(1730276786000+0100)\/","id":301,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730276126000+0100)\/","id":302,"message":"Allarme motore utensili contro mandrino.","type":"EX009"},{"ErrorMessage":null,"date":"\/Date(1730276126000+0100)\/","id":303,"message":"Allarme Motore mandrino utensile opposto.","type":"EX008"},{"ErrorMessage":null,"date":"\/Date(1730276126000+0100)\/","id":304,"message":"Allarme motore mandrino utensile Gang.","type":"EX005"},{"ErrorMessage":null,"date":"\/Date(1730276126000+0100)\/","id":305,"message":"Allarme motore mandr. post. L'azionamento � in allarme.","type":"EX004"},{"ErrorMessage":null,"date":"\/Date(1730276126000+0100)\/","id":306,"message":"Allarme motore mandr. princ. L'azionamento � in allarme.","type":"EX003"},{"ErrorMessage":null,"date":"\/Date(1730276126000+0100)\/","id":307,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730276126000+0100)\/","id":308,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730276126000+0100)\/","id":309,"message":"Stop di emerg.","type":"EMG"},{"ErrorMessage":null,"date":"\/Date(1730276126000+0100)\/","id":310,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730276126000+0100)\/","id":311,"message":"Segnale blocco porta illeg. Blocco porta difett.","type":"EX304"},{"ErrorMessage":null,"date":"\/Date(1730276126000+0100)\/","id":312,"message":"No ctrl.veloc.con porta aperta","type":"Y20"},{"ErrorMessage":null,"date":"\/Date(1730276125000+0100)\/","id":313,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730273553000+0100)\/","id":314,"message":"Allarme motore utensili contro mandrino.","type":"EX009"},{"ErrorMessage":null,"date":"\/Date(1730273553000+0100)\/","id":315,"message":"Allarme Motore mandrino utensile opposto.","type":"EX008"},{"ErrorMessage":null,"date":"\/Date(1730273553000+0100)\/","id":316,"message":"Allarme motore mandrino utensile Gang.","type":"EX005"},{"ErrorMessage":null,"date":"\/Date(1730273553000+0100)\/","id":317,"message":"Allarme motore mandr. post. L'azionamento � in allarme.","type":"EX004"},{"ErrorMessage":null,"date":"\/Date(1730273553000+0100)\/","id":318,"message":"Allarme motore mandr. princ. L'azionamento � in allarme.","type":"EX003"},{"ErrorMessage":null,"date":"\/Date(1730273553000+0100)\/","id":319,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730273553000+0100)\/","id":320,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730273553000+0100)\/","id":321,"message":"Stop di emerg.","type":"EMG"},{"ErrorMessage":null,"date":"\/Date(1730273553000+0100)\/","id":322,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730273553000+0100)\/","id":323,"message":"Segnale blocco porta illeg. Blocco porta difett.","type":"EX304"},{"ErrorMessage":null,"date":"\/Date(1730273553000+0100)\/","id":324,"message":"No ctrl.veloc.con porta aperta","type":"Y20"},{"ErrorMessage":null,"date":"\/Date(1730273552000+0100)\/","id":325,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730272968000+0100)\/","id":326,"message":"Allarme motore utensili contro mandrino.","type":"EX009"},{"ErrorMessage":null,"date":"\/Date(1730272968000+0100)\/","id":327,"message":"Allarme Motore mandrino utensile opposto.","type":"EX008"},{"ErrorMessage":null,"date":"\/Date(1730272968000+0100)\/","id":328,"message":"Allarme motore mandrino utensile Gang.","type":"EX005"},{"ErrorMessage":null,"date":"\/Date(1730272968000+0100)\/","id":329,"message":"Allarme motore mandr. post. L'azionamento � in allarme.","type":"EX004"},{"ErrorMessage":null,"date":"\/Date(1730272968000+0100)\/","id":330,"message":"Allarme motore mandr. princ. L'azionamento � in allarme.","type":"EX003"},{"ErrorMessage":null,"date":"\/Date(1730272968000+0100)\/","id":331,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730272968000+0100)\/","id":332,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730272968000+0100)\/","id":333,"message":"Stop di emerg.","type":"EMG"},{"ErrorMessage":null,"date":"\/Date(1730272968000+0100)\/","id":334,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730272968000+0100)\/","id":335,"message":"Segnale blocco porta illeg. Blocco porta difett.","type":"EX304"},{"ErrorMessage":null,"date":"\/Date(1730272968000+0100)\/","id":336,"message":"No ctrl.veloc.con porta aperta","type":"Y20"},{"ErrorMessage":null,"date":"\/Date(1730272967000+0100)\/","id":337,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730271945000+0100)\/","id":338,"message":"Allarme motore utensili contro mandrino.","type":"EX009"},{"ErrorMessage":null,"date":"\/Date(1730271945000+0100)\/","id":339,"message":"Allarme Motore mandrino utensile opposto.","type":"EX008"},{"ErrorMessage":null,"date":"\/Date(1730271945000+0100)\/","id":340,"message":"Allarme motore mandrino utensile Gang.","type":"EX005"},{"ErrorMessage":null,"date":"\/Date(1730271945000+0100)\/","id":341,"message":"Allarme motore mandr. post. L'azionamento � in allarme.","type":"EX004"},{"ErrorMessage":null,"date":"\/Date(1730271945000+0100)\/","id":342,"message":"Allarme motore mandr. princ. L'azionamento � in allarme.","type":"EX003"},{"ErrorMessage":null,"date":"\/Date(1730271945000+0100)\/","id":343,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730271945000+0100)\/","id":344,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730271945000+0100)\/","id":345,"message":"Stop di emerg.","type":"EMG"},{"ErrorMessage":null,"date":"\/Date(1730271945000+0100)\/","id":346,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730271945000+0100)\/","id":347,"message":"Segnale blocco porta illeg. Blocco porta difett.","type":"EX304"},{"ErrorMessage":null,"date":"\/Date(1730271945000+0100)\/","id":348,"message":"No ctrl.veloc.con porta aperta","type":"Y20"},{"ErrorMessage":null,"date":"\/Date(1730271944000+0100)\/","id":349,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730270976000+0100)\/","id":350,"message":"Allarme motore utensili contro mandrino.","type":"EX009"},{"ErrorMessage":null,"date":"\/Date(1730270976000+0100)\/","id":351,"message":"Allarme Motore mandrino utensile opposto.","type":"EX008"},{"ErrorMessage":null,"date":"\/Date(1730270976000+0100)\/","id":352,"message":"Allarme motore mandrino utensile Gang.","type":"EX005"},{"ErrorMessage":null,"date":"\/Date(1730270976000+0100)\/","id":353,"message":"Allarme motore mandr. post. L'azionamento � in allarme.","type":"EX004"},{"ErrorMessage":null,"date":"\/Date(1730270976000+0100)\/","id":354,"message":"Allarme motore mandr. princ. L'azionamento � in allarme.","type":"EX003"},{"ErrorMessage":null,"date":"\/Date(1730270976000+0100)\/","id":355,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730270976000+0100)\/","id":356,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730270976000+0100)\/","id":357,"message":"Stop di emerg.","type":"EMG"},{"ErrorMessage":null,"date":"\/Date(1730270976000+0100)\/","id":358,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730270976000+0100)\/","id":359,"message":"Segnale blocco porta illeg. Blocco porta difett.","type":"EX304"},{"ErrorMessage":null,"date":"\/Date(1730270976000+0100)\/","id":360,"message":"No ctrl.veloc.con porta aperta","type":"Y20"},{"ErrorMessage":null,"date":"\/Date(1730270975000+0100)\/","id":361,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730270877000+0100)\/","id":362,"message":"Allarme motore utensili contro mandrino.","type":"EX009"},{"ErrorMessage":null,"date":"\/Date(1730270877000+0100)\/","id":363,"message":"Allarme Motore mandrino utensile opposto.","type":"EX008"},{"ErrorMessage":null,"date":"\/Date(1730270877000+0100)\/","id":364,"message":"Allarme motore mandrino utensile Gang.","type":"EX005"},{"ErrorMessage":null,"date":"\/Date(1730270877000+0100)\/","id":365,"message":"Allarme motore mandr. post. L'azionamento � in allarme.","type":"EX004"},{"ErrorMessage":null,"date":"\/Date(1730270877000+0100)\/","id":366,"message":"Allarme motore mandr. princ. L'azionamento � in allarme.","type":"EX003"},{"ErrorMessage":null,"date":"\/Date(1730270877000+0100)\/","id":367,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730270877000+0100)\/","id":368,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730270877000+0100)\/","id":369,"message":"Stop di emerg.","type":"EMG"},{"ErrorMessage":null,"date":"\/Date(1730270877000+0100)\/","id":370,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730270877000+0100)\/","id":371,"message":"Segnale blocco porta illeg. Blocco porta difett.","type":"EX304"},{"ErrorMessage":null,"date":"\/Date(1730270877000+0100)\/","id":372,"message":"No ctrl.veloc.con porta aperta","type":"Y20"},{"ErrorMessage":null,"date":"\/Date(1730270876000+0100)\/","id":373,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730270781000+0100)\/","id":374,"message":"Allarme motore utensili contro mandrino.","type":"EX009"},{"ErrorMessage":null,"date":"\/Date(1730270781000+0100)\/","id":375,"message":"Allarme Motore mandrino utensile opposto.","type":"EX008"},{"ErrorMessage":null,"date":"\/Date(1730270781000+0100)\/","id":376,"message":"Allarme motore mandrino utensile Gang.","type":"EX005"},{"ErrorMessage":null,"date":"\/Date(1730270781000+0100)\/","id":377,"message":"Allarme motore mandr. post. L'azionamento � in allarme.","type":"EX004"},{"ErrorMessage":null,"date":"\/Date(1730270781000+0100)\/","id":378,"message":"Allarme motore mandr. princ. L'azionamento � in allarme.","type":"EX003"},{"ErrorMessage":null,"date":"\/Date(1730270781000+0100)\/","id":379,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730270781000+0100)\/","id":380,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730270781000+0100)\/","id":381,"message":"Stop di emerg.","type":"EMG"},{"ErrorMessage":null,"date":"\/Date(1730270781000+0100)\/","id":382,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730270781000+0100)\/","id":383,"message":"Segnale blocco porta illeg. Blocco porta difett.","type":"EX304"},{"ErrorMessage":null,"date":"\/Date(1730270781000+0100)\/","id":384,"message":"No ctrl.veloc.con porta aperta","type":"Y20"},{"ErrorMessage":null,"date":"\/Date(1730270780000+0100)\/","id":385,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730269719000+0100)\/","id":386,"message":"Allarme motore utensili contro mandrino.","type":"EX009"},{"ErrorMessage":null,"date":"\/Date(1730269719000+0100)\/","id":387,"message":"Allarme Motore mandrino utensile opposto.","type":"EX008"},{"ErrorMessage":null,"date":"\/Date(1730269719000+0100)\/","id":388,"message":"Allarme motore mandrino utensile Gang.","type":"EX005"},{"ErrorMessage":null,"date":"\/Date(1730269719000+0100)\/","id":389,"message":"Allarme motore mandr. post. L'azionamento � in allarme.","type":"EX004"},{"ErrorMessage":null,"date":"\/Date(1730269719000+0100)\/","id":390,"message":"Allarme motore mandr. princ. L'azionamento � in allarme.","type":"EX003"},{"ErrorMessage":null,"date":"\/Date(1730269719000+0100)\/","id":391,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730269719000+0100)\/","id":392,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730269719000+0100)\/","id":393,"message":"Stop di emerg.","type":"EMG"},{"ErrorMessage":null,"date":"\/Date(1730269719000+0100)\/","id":394,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730269719000+0100)\/","id":395,"message":"Segnale blocco porta illeg. Blocco porta difett.","type":"EX304"},{"ErrorMessage":null,"date":"\/Date(1730269719000+0100)\/","id":396,"message":"No ctrl.veloc.con porta aperta","type":"Y20"},{"ErrorMessage":null,"date":"\/Date(1730269718000+0100)\/","id":397,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730268465000+0100)\/","id":398,"message":"Allarme motore utensili contro mandrino.","type":"EX009"},{"ErrorMessage":null,"date":"\/Date(1730268465000+0100)\/","id":399,"message":"Allarme Motore mandrino utensile opposto.","type":"EX008"},{"ErrorMessage":null,"date":"\/Date(1730268465000+0100)\/","id":400,"message":"Allarme motore mandrino utensile Gang.","type":"EX005"},{"ErrorMessage":null,"date":"\/Date(1730268465000+0100)\/","id":401,"message":"Allarme motore mandr. post. L'azionamento � in allarme.","type":"EX004"},{"ErrorMessage":null,"date":"\/Date(1730268465000+0100)\/","id":402,"message":"Allarme motore mandr. princ. L'azionamento � in allarme.","type":"EX003"},{"ErrorMessage":null,"date":"\/Date(1730268465000+0100)\/","id":403,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730268465000+0100)\/","id":404,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730268465000+0100)\/","id":405,"message":"Stop di emerg.","type":"EMG"},{"ErrorMessage":null,"date":"\/Date(1730268465000+0100)\/","id":406,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730268465000+0100)\/","id":407,"message":"Segnale blocco porta illeg. Blocco porta difett.","type":"EX304"},{"ErrorMessage":null,"date":"\/Date(1730268465000+0100)\/","id":408,"message":"No ctrl.veloc.con porta aperta","type":"Y20"},{"ErrorMessage":null,"date":"\/Date(1730268464000+0100)\/","id":409,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730267940000+0100)\/","id":410,"message":"Allarme motore utensili contro mandrino.","type":"EX009"},{"ErrorMessage":null,"date":"\/Date(1730267940000+0100)\/","id":411,"message":"Allarme Motore mandrino utensile opposto.","type":"EX008"},{"ErrorMessage":null,"date":"\/Date(1730267940000+0100)\/","id":412,"message":"Allarme motore mandrino utensile Gang.","type":"EX005"},{"ErrorMessage":null,"date":"\/Date(1730267940000+0100)\/","id":413,"message":"Allarme motore mandr. post. L'azionamento � in allarme.","type":"EX004"},{"ErrorMessage":null,"date":"\/Date(1730267940000+0100)\/","id":414,"message":"Allarme motore mandr. princ. L'azionamento � in allarme.","type":"EX003"},{"ErrorMessage":null,"date":"\/Date(1730267940000+0100)\/","id":415,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730267940000+0100)\/","id":416,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730267940000+0100)\/","id":417,"message":"Stop di emerg.","type":"EMG"},{"ErrorMessage":null,"date":"\/Date(1730267940000+0100)\/","id":418,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730267940000+0100)\/","id":419,"message":"Segnale blocco porta illeg. Blocco porta difett.","type":"EX304"},{"ErrorMessage":null,"date":"\/Date(1730267940000+0100)\/","id":420,"message":"No ctrl.veloc.con porta aperta","type":"Y20"},{"ErrorMessage":null,"date":"\/Date(1730267939000+0100)\/","id":421,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730266899000+0100)\/","id":422,"message":"Allarme motore utensili contro mandrino.","type":"EX009"},{"ErrorMessage":null,"date":"\/Date(1730266899000+0100)\/","id":423,"message":"Allarme Motore mandrino utensile opposto.","type":"EX008"},{"ErrorMessage":null,"date":"\/Date(1730266899000+0100)\/","id":424,"message":"Allarme motore mandrino utensile Gang.","type":"EX005"},{"ErrorMessage":null,"date":"\/Date(1730266899000+0100)\/","id":425,"message":"Allarme motore mandr. post. L'azionamento � in allarme.","type":"EX004"},{"ErrorMessage":null,"date":"\/Date(1730266899000+0100)\/","id":426,"message":"Allarme motore mandr. princ. L'azionamento � in allarme.","type":"EX003"},{"ErrorMessage":null,"date":"\/Date(1730266899000+0100)\/","id":427,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730266899000+0100)\/","id":428,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730266899000+0100)\/","id":429,"message":"Stop di emerg.","type":"EMG"},{"ErrorMessage":null,"date":"\/Date(1730266899000+0100)\/","id":430,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730266899000+0100)\/","id":431,"message":"Segnale blocco porta illeg. Blocco porta difett.","type":"EX304"},{"ErrorMessage":null,"date":"\/Date(1730266899000+0100)\/","id":432,"message":"No ctrl.veloc.con porta aperta","type":"Y20"},{"ErrorMessage":null,"date":"\/Date(1730266898000+0100)\/","id":433,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730266796000+0100)\/","id":434,"message":"Allarme motore utensili contro mandrino.","type":"EX009"},{"ErrorMessage":null,"date":"\/Date(1730266796000+0100)\/","id":435,"message":"Allarme Motore mandrino utensile opposto.","type":"EX008"},{"ErrorMessage":null,"date":"\/Date(1730266796000+0100)\/","id":436,"message":"Allarme motore mandrino utensile Gang.","type":"EX005"},{"ErrorMessage":null,"date":"\/Date(1730266796000+0100)\/","id":437,"message":"Allarme motore mandr. post. L'azionamento � in allarme.","type":"EX004"},{"ErrorMessage":null,"date":"\/Date(1730266796000+0100)\/","id":438,"message":"Allarme motore mandr. princ. L'azionamento � in allarme.","type":"EX003"},{"ErrorMessage":null,"date":"\/Date(1730266796000+0100)\/","id":439,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730266796000+0100)\/","id":440,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730266796000+0100)\/","id":441,"message":"Stop di emerg.","type":"EMG"},{"ErrorMessage":null,"date":"\/Date(1730266796000+0100)\/","id":442,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730266796000+0100)\/","id":443,"message":"Segnale blocco porta illeg. Blocco porta difett.","type":"EX304"},{"ErrorMessage":null,"date":"\/Date(1730266796000+0100)\/","id":444,"message":"No ctrl.veloc.con porta aperta","type":"Y20"},{"ErrorMessage":null,"date":"\/Date(1730266795000+0100)\/","id":445,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730239150000+0100)\/","id":446,"message":"Allarme motore utensili contro mandrino.","type":"EX009"},{"ErrorMessage":null,"date":"\/Date(1730239150000+0100)\/","id":447,"message":"Allarme Motore mandrino utensile opposto.","type":"EX008"},{"ErrorMessage":null,"date":"\/Date(1730239150000+0100)\/","id":448,"message":"Allarme motore mandrino utensile Gang.","type":"EX005"},{"ErrorMessage":null,"date":"\/Date(1730239150000+0100)\/","id":449,"message":"Allarme motore mandr. post. L'azionamento � in allarme.","type":"EX004"},{"ErrorMessage":null,"date":"\/Date(1730239150000+0100)\/","id":450,"message":"Allarme motore mandr. princ. L'azionamento � in allarme.","type":"EX003"},{"ErrorMessage":null,"date":"\/Date(1730239150000+0100)\/","id":451,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730239150000+0100)\/","id":452,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730239150000+0100)\/","id":453,"message":"Stop di emerg.","type":"EMG"},{"ErrorMessage":null,"date":"\/Date(1730239150000+0100)\/","id":454,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730239150000+0100)\/","id":455,"message":"Segnale blocco porta illeg. Blocco porta difett.","type":"EX304"},{"ErrorMessage":null,"date":"\/Date(1730239150000+0100)\/","id":456,"message":"No ctrl.veloc.con porta aperta","type":"Y20"},{"ErrorMessage":null,"date":"\/Date(1730239149000+0100)\/","id":457,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730238745000+0100)\/","id":458,"message":"Allarme motore utensili contro mandrino.","type":"EX009"},{"ErrorMessage":null,"date":"\/Date(1730238745000+0100)\/","id":459,"message":"Allarme Motore mandrino utensile opposto.","type":"EX008"},{"ErrorMessage":null,"date":"\/Date(1730238745000+0100)\/","id":460,"message":"Allarme motore mandrino utensile Gang.","type":"EX005"},{"ErrorMessage":null,"date":"\/Date(1730238745000+0100)\/","id":461,"message":"Allarme motore mandr. post. L'azionamento � in allarme.","type":"EX004"},{"ErrorMessage":null,"date":"\/Date(1730238745000+0100)\/","id":462,"message":"Allarme motore mandr. princ. L'azionamento � in allarme.","type":"EX003"},{"ErrorMessage":null,"date":"\/Date(1730238745000+0100)\/","id":463,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730238745000+0100)\/","id":464,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730238745000+0100)\/","id":465,"message":"Stop di emerg.","type":"EMG"},{"ErrorMessage":null,"date":"\/Date(1730238745000+0100)\/","id":466,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730238745000+0100)\/","id":467,"message":"Segnale blocco porta illeg. Blocco porta difett.","type":"EX304"},{"ErrorMessage":null,"date":"\/Date(1730238745000+0100)\/","id":468,"message":"No ctrl.veloc.con porta aperta","type":"Y20"},{"ErrorMessage":null,"date":"\/Date(1730238744000+0100)\/","id":469,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730238395000+0100)\/","id":470,"message":"Allarme motore utensili contro mandrino.","type":"EX009"},{"ErrorMessage":null,"date":"\/Date(1730238395000+0100)\/","id":471,"message":"Allarme Motore mandrino utensile opposto.","type":"EX008"},{"ErrorMessage":null,"date":"\/Date(1730238395000+0100)\/","id":472,"message":"Allarme motore mandrino utensile Gang.","type":"EX005"},{"ErrorMessage":null,"date":"\/Date(1730238395000+0100)\/","id":473,"message":"Allarme motore mandr. post. L'azionamento � in allarme.","type":"EX004"},{"ErrorMessage":null,"date":"\/Date(1730238395000+0100)\/","id":474,"message":"Allarme motore mandr. princ. L'azionamento � in allarme.","type":"EX003"},{"ErrorMessage":null,"date":"\/Date(1730238395000+0100)\/","id":475,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730238395000+0100)\/","id":476,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730238395000+0100)\/","id":477,"message":"Stop di emerg.","type":"EMG"},{"ErrorMessage":null,"date":"\/Date(1730238395000+0100)\/","id":478,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730238395000+0100)\/","id":479,"message":"Segnale blocco porta illeg. Blocco porta difett.","type":"EX304"},{"ErrorMessage":null,"date":"\/Date(1730238395000+0100)\/","id":480,"message":"No ctrl.veloc.con porta aperta","type":"Y20"},{"ErrorMessage":null,"date":"\/Date(1730238394000+0100)\/","id":481,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730238243000+0100)\/","id":482,"message":"Allarme motore utensili contro mandrino.","type":"EX009"},{"ErrorMessage":null,"date":"\/Date(1730238243000+0100)\/","id":483,"message":"Allarme Motore mandrino utensile opposto.","type":"EX008"},{"ErrorMessage":null,"date":"\/Date(1730238243000+0100)\/","id":484,"message":"Allarme motore mandrino utensile Gang.","type":"EX005"},{"ErrorMessage":null,"date":"\/Date(1730238243000+0100)\/","id":485,"message":"Allarme motore mandr. post. L'azionamento � in allarme.","type":"EX004"},{"ErrorMessage":null,"date":"\/Date(1730238243000+0100)\/","id":486,"message":"Allarme motore mandr. princ. L'azionamento � in allarme.","type":"EX003"},{"ErrorMessage":null,"date":"\/Date(1730238243000+0100)\/","id":487,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730238243000+0100)\/","id":488,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730238243000+0100)\/","id":489,"message":"Stop di emerg.","type":"EMG"},{"ErrorMessage":null,"date":"\/Date(1730238243000+0100)\/","id":490,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730238243000+0100)\/","id":491,"message":"Segnale blocco porta illeg. Blocco porta difett.","type":"EX304"},{"ErrorMessage":null,"date":"\/Date(1730238243000+0100)\/","id":492,"message":"No ctrl.veloc.con porta aperta","type":"Y20"},{"ErrorMessage":null,"date":"\/Date(1730238242000+0100)\/","id":493,"message":"Allarme caricatore barre. Il caricatore � in allarme.","type":"EX101"},{"ErrorMessage":null,"date":"\/Date(1730238155000+0100)\/","id":494,"message":"Allarme motore utensili contro mandrino.","type":"EX009"},{"ErrorMessage":null,"date":"\/Date(1730238155000+0100)\/","id":495,"message":"Allarme Motore mandrino utensile opposto.","type":"EX008"},{"ErrorMessage":null,"date":"\/Date(1730238155000+0100)\/","id":496,"message":"Allarme motore mandrino utensile Gang.","type":"EX005"},{"ErrorMessage":null,"date":"\/Date(1730238155000+0100)\/","id":497,"message":"Allarme motore mandr. post. L'azionamento � in allarme.","type":"EX004"},{"ErrorMessage":null,"date":"\/Date(1730238155000+0100)\/","id":498,"message":"Allarme motore mandr. princ. L'azionamento � in allarme.","type":"EX003"},{"ErrorMessage":null,"date":"\/Date(1730238155000+0100)\/","id":499,"message":"Ctrl.sicur.: err.stato porta","type":"S01"},{"ErrorMessage":null,"date":"\/Date(1730238155000+0100)\/","id":500,"message":"Ctrl.sicur.: err.stato porta","type":"S01"}]
\ No newline at end of file
diff --git a/RestAppCitizen/Test/json/cAlarm.txt b/RestAppCitizen/Test/json/cAlarm.txt
new file mode 100644
index 0000000..f9e0241
--- /dev/null
+++ b/RestAppCitizen/Test/json/cAlarm.txt
@@ -0,0 +1 @@
+{"ErrorMessage":null,"IsAlarm":false,"IsCaution":true,"message":"CAUTION ON MACHINE"}
\ No newline at end of file
diff --git a/RestAppCitizen/Test/json/cTime.txt b/RestAppCitizen/Test/json/cTime.txt
new file mode 100644
index 0000000..2ebc651
--- /dev/null
+++ b/RestAppCitizen/Test/json/cTime.txt
@@ -0,0 +1 @@
+56
\ No newline at end of file
diff --git a/RestAppCitizen/Test/json/gLamp.txt b/RestAppCitizen/Test/json/gLamp.txt
new file mode 100644
index 0000000..b777f23
--- /dev/null
+++ b/RestAppCitizen/Test/json/gLamp.txt
@@ -0,0 +1 @@
+{"Address":"8E","Description":"","ErrorMessage":null,"IOType":"Y","VarValue":"0"}
\ No newline at end of file
diff --git a/RestAppCitizen/Test/json/pName.txt b/RestAppCitizen/Test/json/pName.txt
new file mode 100644
index 0000000..e69de29
diff --git a/RestAppCitizen/Test/json/qtyReq.txt b/RestAppCitizen/Test/json/qtyReq.txt
new file mode 100644
index 0000000..eb1f494
--- /dev/null
+++ b/RestAppCitizen/Test/json/qtyReq.txt
@@ -0,0 +1 @@
+500
\ No newline at end of file
diff --git a/RestAppCitizen/Test/json/qtyTot.txt b/RestAppCitizen/Test/json/qtyTot.txt
new file mode 100644
index 0000000..eb1f494
--- /dev/null
+++ b/RestAppCitizen/Test/json/qtyTot.txt
@@ -0,0 +1 @@
+500
\ No newline at end of file
diff --git a/RestAppCitizen/Test/json/qtyWrk.txt b/RestAppCitizen/Test/json/qtyWrk.txt
new file mode 100644
index 0000000..c227083
--- /dev/null
+++ b/RestAppCitizen/Test/json/qtyWrk.txt
@@ -0,0 +1 @@
+0
\ No newline at end of file
diff --git a/RestAppCitizen/Test/json/rLamp.txt b/RestAppCitizen/Test/json/rLamp.txt
new file mode 100644
index 0000000..834dc39
--- /dev/null
+++ b/RestAppCitizen/Test/json/rLamp.txt
@@ -0,0 +1 @@
+{"Address":"22","Description":"","ErrorMessage":null,"IOType":"Y","VarValue":"0"}
\ No newline at end of file
diff --git a/RestAppCitizen/Test/json/token.txt b/RestAppCitizen/Test/json/token.txt
new file mode 100644
index 0000000..d54c276
--- /dev/null
+++ b/RestAppCitizen/Test/json/token.txt
@@ -0,0 +1 @@
+6d65636d61746963616d6573c2a76d65636d6174696361406d6573c2a731
\ No newline at end of file
diff --git a/RestAppCitizen/Test/json/yLamp.txt b/RestAppCitizen/Test/json/yLamp.txt
new file mode 100644
index 0000000..563a692
--- /dev/null
+++ b/RestAppCitizen/Test/json/yLamp.txt
@@ -0,0 +1 @@
+{"Address":"21","Description":"","ErrorMessage":null,"IOType":"Y","VarValue":"0"}
\ No newline at end of file