namespace ScadaLink.SiteRuntime;
///
/// Configuration options for the Site Runtime component.
/// Bound from ScadaLink:SiteRuntime configuration section.
///
public class SiteRuntimeOptions
{
///
/// Number of Instance Actors to create per batch during staggered startup.
/// Default: 20.
///
public int StartupBatchSize { get; set; } = 20;
///
/// Delay in milliseconds between startup batches to prevent reconnection storms.
/// Default: 100ms.
///
public int StartupBatchDelayMs { get; set; } = 100;
///
/// Maximum call depth for recursive script calls (CallScript/CallShared).
/// Default: 10.
///
public int MaxScriptCallDepth { get; set; } = 10;
///
/// Default script execution timeout in seconds.
/// Default: 30 seconds.
///
public int ScriptExecutionTimeoutSeconds { get; set; } = 30;
///
/// Per-subscriber buffer size for the site-wide Akka stream.
/// Slow subscribers drop oldest messages when buffer is full.
/// Default: 1000.
///
public int StreamBufferSize { get; set; } = 1000;
///
/// SiteRuntime-009: number of dedicated threads in the script-execution scheduler.
/// Script and alarm on-trigger bodies run on these threads instead of the shared
/// .NET thread pool, so blocking script I/O cannot starve the global pool.
/// Default: 8.
///
public int ScriptExecutionThreadCount { get; set; } = 8;
}