24 lines
804 B
C#
24 lines
804 B
C#
/*
|
|
*网关节点管理 — 骨架
|
|
*TODO: Phase 2 联调时实现 A1注册/A2心跳/A3设备同步/A4告警同步
|
|
*/
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace Warehouse.Controllers
|
|
{
|
|
public partial class gateway_nodesController
|
|
{
|
|
[HttpPost, Route("/api/gateway/register")]
|
|
public IActionResult RegisterGateway() => Ok(new { nodeId = 0, devices = new object[0] });
|
|
|
|
[HttpPost, Route("/api/gateway/heartbeat")]
|
|
public IActionResult GatewayHeartbeat() => Ok(new { status = "ok" });
|
|
|
|
[HttpPost, Route("/api/gateway/sync/devices")]
|
|
public IActionResult SyncDevices() => Ok(new { added = 0, updated = 0, removed = 0 });
|
|
|
|
[HttpPost, Route("/api/gateway/sync/alarms")]
|
|
public IActionResult SyncAlarms() => Ok(new { added = 0 });
|
|
}
|
|
}
|