389f5a0378
Communication Layer (WP-1–5): - 8 message patterns with correlation IDs, per-pattern timeouts - Central/Site communication actors, transport heartbeat config - Connection failure handling (no central buffering, debug streams killed) Data Connection Layer (WP-6–14, WP-34): - Connection actor with Become/Stash lifecycle (Connecting/Connected/Reconnecting) - OPC UA + LmxProxy adapters behind IDataConnection - Auto-reconnect, bad quality propagation, transparent re-subscribe - Write-back, tag path resolution with retry, health reporting - Protocol extensibility via DataConnectionFactory Site Runtime (WP-15–25, WP-32–33): - ScriptActor/ScriptExecutionActor (triggers, concurrent execution, blocking I/O dispatcher) - AlarmActor/AlarmExecutionActor (ValueMatch/RangeViolation/RateOfChange, in-memory state) - SharedScriptLibrary (inline execution), ScriptRuntimeContext (API) - ScriptCompilationService (Roslyn, forbidden API enforcement, execution timeout) - Recursion limit (default 10), call direction enforcement - SiteStreamManager (per-subscriber bounded buffers, fire-and-forget) - Debug view backend (snapshot + stream), concurrency serialization - Local artifact storage (4 SQLite tables) Health Monitoring (WP-26–28): - SiteHealthCollector (thread-safe counters, connection state) - HealthReportSender (30s interval, monotonic sequence numbers) - CentralHealthAggregator (offline detection 60s, online recovery) Site Event Logging (WP-29–31): - SiteEventLogger (SQLite, 6 event categories, ISO 8601 UTC) - EventLogPurgeService (30-day retention, 1GB cap) - EventLogQueryService (filters, keyword search, keyset pagination) 541 tests pass, zero warnings.
40 lines
1.2 KiB
C#
40 lines
1.2 KiB
C#
namespace ScadaLink.SiteRuntime;
|
|
|
|
/// <summary>
|
|
/// Configuration options for the Site Runtime component.
|
|
/// Bound from ScadaLink:SiteRuntime configuration section.
|
|
/// </summary>
|
|
public class SiteRuntimeOptions
|
|
{
|
|
/// <summary>
|
|
/// Number of Instance Actors to create per batch during staggered startup.
|
|
/// Default: 20.
|
|
/// </summary>
|
|
public int StartupBatchSize { get; set; } = 20;
|
|
|
|
/// <summary>
|
|
/// Delay in milliseconds between startup batches to prevent reconnection storms.
|
|
/// Default: 100ms.
|
|
/// </summary>
|
|
public int StartupBatchDelayMs { get; set; } = 100;
|
|
|
|
/// <summary>
|
|
/// Maximum call depth for recursive script calls (CallScript/CallShared).
|
|
/// Default: 10.
|
|
/// </summary>
|
|
public int MaxScriptCallDepth { get; set; } = 10;
|
|
|
|
/// <summary>
|
|
/// Default script execution timeout in seconds.
|
|
/// Default: 30 seconds.
|
|
/// </summary>
|
|
public int ScriptExecutionTimeoutSeconds { get; set; } = 30;
|
|
|
|
/// <summary>
|
|
/// Per-subscriber buffer size for the site-wide Akka stream.
|
|
/// Slow subscribers drop oldest messages when buffer is full.
|
|
/// Default: 1000.
|
|
/// </summary>
|
|
public int StreamBufferSize { get; set; } = 1000;
|
|
}
|