Files
Lab505/Lab505.Shared/HubContracts.cs
2026-10-22 14:31:58 +07:00

34 lines
1.7 KiB
C#

namespace Lab505.Shared;
/// <summary>
/// Shared constants for SignalR hubs — used by both server and WASM client.
/// </summary>
public static class HubContracts
{
// ── Hub routes ────────────────────────────────────────────────
public const string StateHubRoute = "/stateHub";
public const string ScriptHubRoute = "/scriptHub";
// ── StateHub: server → client push events ─────────────────────
public const string ImrStateEvent = "imr-state";
public const string AmrStateEvent = "amr-state";
public const string ConveyorStateEvent = "conveyor-state";
public const string AsrsStateEvent = "asrs-state";
public const string AsrsOpcStateEvent = "asrs-opc-state";
public const string WorkflowStateEvent = "workflow-state";
public const string SystemStateEvent = "system-state";
// ── Notification: server → client (lệnh gửi / hoàn thành / lỗi) ──
public const string NotificationEvent = "notification";
// ── Lock state: server → client push events ───────────────────
public const string LockStateEvent = "lock-state";
// ── Mode change: server → specific user (T3 remote switch) ───
public const string ModeChangedEvent = "mode-changed";
// ── ScriptHub: server → client push events ────────────────────
public const string ScriptLogEvent = "scriptLog";
public const string SimPanelStateEvent = "sim-panel-state";
}