using EC.App.Core;
using EC.App.ThatBLL.Onvif.Intf;
using Furion.DataValidation;
using Microsoft.AspNetCore.Mvc;
using System.ComponentModel.DataAnnotations;
namespace OnvifWebServer.Controllers.Onvif
{
///
/// Onvif 设备参数控制
///
[ApiController]
[ApiDescriptionSettings("Onvif")]
[Route("onvif/[controller]")]
public class DeviceController : ApiController
{
private readonly IDeviceBLL _deviceBLL;
///
///
///
///
public DeviceController(IDeviceBLL deviceBLL)
{
this._deviceBLL = deviceBLL;
}
///
/// 是否连接
///
///
///
[HttpGet]
public bool IsConnected(
[Required][DataValidation(ValidationTypes.IPv4)] string ip)
{
bool ret = _deviceBLL.IsConnected(ip);
return ret;
}
}
}