feat: add JoeAppEngine OPC UA nodes, fix DCL auto-reconnect and quality push
- Add JoeAppEngine folder to OPC UA nodes.json (BTCS, AlarmCntsBySeverity, Scheduler/ScanTime) - Fix DataConnectionActor: capture Self in PreStart for use from non-actor threads, preventing Self.Tell failure in Disconnected event handler - Implement InstanceActor.HandleConnectionQualityChanged to mark attributes Bad on disconnect - Fix LmxFakeProxy TagMapper to serialize arrays as JSON instead of "System.Int32[]" - Allow DataType and DataSourceReference updates in TemplateService.UpdateAttributeAsync - Update test_infra_opcua.md with JoeAppEngine documentation
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
||||
# Build stage forced to amd64: Grpc.Tools protoc crashes on linux/arm64 (Apple Silicon)
|
||||
FROM --platform=linux/amd64 mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
||||
WORKDIR /src
|
||||
COPY LmxFakeProxy.csproj .
|
||||
RUN dotnet restore
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
using System.Collections;
|
||||
using System.Text.Json;
|
||||
using LmxFakeProxy.Grpc;
|
||||
|
||||
namespace LmxFakeProxy;
|
||||
@@ -30,12 +32,20 @@ public class TagMapper
|
||||
return "Uncertain";
|
||||
}
|
||||
|
||||
public static string FormatValue(object? value)
|
||||
{
|
||||
if (value is null) return string.Empty;
|
||||
if (value is Array or IList)
|
||||
return JsonSerializer.Serialize(value);
|
||||
return value.ToString() ?? string.Empty;
|
||||
}
|
||||
|
||||
public static VtqMessage ToVtqMessage(string tag, object? value, DateTime timestampUtc, uint statusCode)
|
||||
{
|
||||
return new VtqMessage
|
||||
{
|
||||
Tag = tag,
|
||||
Value = value?.ToString() ?? string.Empty,
|
||||
Value = FormatValue(value),
|
||||
TimestampUtcTicks = timestampUtc.Ticks,
|
||||
Quality = MapQuality(statusCode)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user