From cec7741099834762771d7270ff72d4fefc9c9f1a Mon Sep 17 00:00:00 2001 From: Patrick Ritchie Date: Thu, 2 Nov 2023 12:13:28 -0400 Subject: [PATCH] Update to allow the Device UUID in the DeviceConfiguration file to override the Device UUID from an HTTP Adapter in a Gateway Agent --- .../MTConnectHttpAgentGatewayApplication.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/MTConnect.NET-Applications-Agents/MTConnectHttpAgentGatewayApplication.cs b/src/MTConnect.NET-Applications-Agents/MTConnectHttpAgentGatewayApplication.cs index c2b0f50e..ad23b249 100644 --- a/src/MTConnect.NET-Applications-Agents/MTConnectHttpAgentGatewayApplication.cs +++ b/src/MTConnect.NET-Applications-Agents/MTConnectHttpAgentGatewayApplication.cs @@ -254,7 +254,8 @@ private void StreamsDocumentReceived(MTConnectHttpClient client, IStreamsRespons input.Timestamp = observation.Timestamp.ToUnixTime(); input.Values = observation.Values; - Agent.AddObservation(stream.Uuid, input); + Agent.AddObservation(client.Device, input); + //Agent.AddObservation(stream.Uuid, input); } } } @@ -269,7 +270,8 @@ private void AssetsDocumentReceived(MTConnectHttpClient client, IAssetsResponseD foreach (var asset in document.Assets) { - Agent.AddAsset(asset.DeviceUuid, asset); + Agent.AddAsset(client.Device, asset); + //Agent.AddAsset(asset.DeviceUuid, asset); } } }