919009c5ef
AbLegacyDriver stamped LastSuccessfulRead (init, read, write), the read's sample timestamps and host-state change times from raw DateTime.UtcNow; only the backoff path read the injectable Clock. All of them now read Clock(), so NativePcccBridgeStatusHealthTests drives a manual clock (init at T0, read at T1) and asserts LastSuccessfulRead == T1 exactly instead of spin-waiting for the wall clock to pass the init stamp (#767). Without the driver change the 6 tests fail (init stamp is wall-clock, not T0). Directory.Build.props sets TreatWarningsAsErrors for every project since #766, so the 75 per-csproj copies (64 src + 11 tests) are removed and the props comment says it is now the only place. tools/mem-probe keeps its explicit opt-out. Release build: 0 warnings, 0 errors; a planted CS0168 still fails the build in a src project and in a test project that used to carry its own copy. Claude-Session: https://claude.ai/code/session_01GT67AEHd2Acv1YPwGfXEoV
46 lines
2.3 KiB
XML
46 lines
2.3 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
|
|
<!--
|
|
The Sparkplug B edge-node simulator: one engine, two consumers.
|
|
|
|
1. `SparkplugLiveTests` (the sibling IntegrationTests project) references this project and
|
|
drives `SparkplugEdgeNode` IN PROCESS, because the §3.6 matrix needs an edge node that can
|
|
be TOLD to reuse an alias, skip a seq, or die — a container cannot be commanded mid-test.
|
|
2. `Docker/docker-compose.yml`'s `sparkplug-sim` service runs the very same assembly as a
|
|
standalone always-on edge node (see `Program`), so an operator can drive the AdminUI
|
|
Sparkplug picker against live birth/data traffic.
|
|
|
|
It is therefore an Exe (a container entrypoint) that is also referenced as a library. That is
|
|
the reason it is a nested project rather than a folder of files in the test project, and the
|
|
reason the test project's csproj removes this directory from its default globs.
|
|
|
|
DEPENDENCIES ARE DELIBERATELY NARROW: `.Contracts` (for the generated Tahu `Payload` types —
|
|
the ENCODE side of the encode/decode symmetry this fixture exists to prove) plus MQTTnet. It
|
|
does NOT reference the runtime `.Driver` project, on purpose: a simulator that formatted its
|
|
topics with the driver's own `SparkplugTopic.Format` could not detect a bug in it, because
|
|
both sides of the comparison would be wrong together. The schema is shared (it IS the spec);
|
|
the framing logic is written independently here.
|
|
-->
|
|
<PropertyGroup>
|
|
<OutputType>Exe</OutputType>
|
|
<TargetFramework>net10.0</TargetFramework>
|
|
<Nullable>enable</Nullable>
|
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
<LangVersion>latest</LangVersion>
|
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
|
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
|
<IsPackable>false</IsPackable>
|
|
<RootNamespace>ZB.MOM.WW.OtOpcUa.Driver.Mqtt.SparkplugSimulator</RootNamespace>
|
|
<AssemblyName>ZB.MOM.WW.OtOpcUa.Driver.Mqtt.SparkplugSimulator</AssemblyName>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<ProjectReference Include="..\..\..\..\src\Drivers\ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Contracts\ZB.MOM.WW.OtOpcUa.Driver.Mqtt.Contracts.csproj"/>
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="MQTTnet"/>
|
|
</ItemGroup>
|
|
|
|
</Project>
|