You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
2.3 KiB

using Microsoft.AspNetCore.Mvc;
using Module.FireCtrl.ModBusTcp;
namespace Monitor.EqmMgr.WebApi.Controllers
{
[ApiController]
[Route("[controller]")]
public class FireCtrlParamController : ControllerBase
{
private readonly ILogger<FireCtrlParamController> _logger;
public FireCtrlParamController(ILogger<FireCtrlParamController> logger)
{
_logger = logger;
}
/// <summary>
/// 消防系统状态
/// </summary>
/// <returns></returns>
[HttpPost]
[Route("/api/[controller]/GetFireStatusValue")]
public MFireStatusValue GetFireStatusValue()
{
return CmnFireBaseInfo.FRC01.F_FireStatusValue;
}
/// <summary>
/// 故障信息值
/// </summary>
/// <returns></returns>
[HttpPost]
[Route("/api/[controller]/GetFireFaultInfo")]
public List<MFaultInformation> GetFireFaultInfo()
{
return CmnFireBaseInfo.FRC01.F_FaultInformations;
}
/// <summary>
/// 传感器信息值
/// </summary>
/// <returns></returns>
[HttpPost]
[Route("/api/[controller]/GetSensorInfo")]
public List<MSensorInformation> GetSensorInfo()
{
return CmnFireBaseInfo.FRC01.F_SensorInformations;
}
/// <summary>
/// 分区信息值
/// </summary>
/// <returns></returns>
[HttpPost]
[Route("/api/[controller]/GetPartitionVal")]
public MPartitionValue GetPartitionVal()
{
return CmnFireBaseInfo.FRC01.F_Partition;
}
/// <summary>
/// 消防灭火器状态
/// </summary>
/// <returns></returns>
[HttpPost]
[Route("/api/[controller]/GetFireExtinguisher")]
public MFireExtinguisher GetFireExtinguisher()
{
return CmnFireBaseInfo.FRC01.F_FireExtinguisher;
}
/// <summary>
/// 消防设备通讯重新连接
/// </summary>
/// <returns></returns>
[HttpPost]
[Route("/api/[controller]/SetFireNetReConnect")]
public void FireNetReConnect()
{
new FireEqmManager().FireNetReConnectThread();
}
}
}