initial commit

This commit is contained in:
robotics_x1
2026-10-12 15:24:08 +07:00
commit 55228b3772
367 changed files with 162893 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
namespace Lab505.Script.Sim;
/// <summary>
/// Isolated per-user simulation context.
/// Each FlowContext built from this context has its own independent robot state.
/// </summary>
public sealed class SimContext
{
public SimConveyor Conveyor { get; } = new();
public SimImr IMR { get; } = new();
public SimAmr AMR { get; } = new();
public SimAsrs ASRS { get; } = new();
public SimDobot Dobot { get; } = new();
public SimFlow Workflow { get; }
/// <summary>Fires whenever any simulated robot/device changes state.</summary>
public event Action? OnChanged;
public SimContext()
{
Workflow = new SimFlow(this);
IMR.OnMoved += _ => OnChanged?.Invoke();
AMR.OnMoved += _ => OnChanged?.Invoke();
Conveyor.OnChanged += () => OnChanged?.Invoke();
}
}