feat(delmia-notifier): Program wiring, YES/NO reporter, diagnostics log

This commit is contained in:
Joseph Doherty
2026-06-26 05:18:19 -04:00
parent 71f680d542
commit 3931fa2101
4 changed files with 153 additions and 1 deletions
@@ -0,0 +1,22 @@
namespace ZB.MOM.WW.ScadaBridge.DelmiaNotifier;
/// <summary>
/// Maps an outcome to the legacy WWNotifier stdout contract: <c>YES</c> + exit 0 on success,
/// <c>NO</c> followed by a reason line + exit -1 on failure. The writer is injected so stdout is the
/// only thing Delmia ever parses (LF-terminated, deterministic across platforms).
/// </summary>
internal static class Reporter
{
public static int Report(bool ok, string reason, TextWriter stdout)
{
if (ok)
{
stdout.Write("YES\n");
return 0;
}
stdout.Write("NO\n");
stdout.Write(reason);
return -1;
}
}