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.
41 lines
887 B
41 lines
887 B
using EC.App.Core;
|
|
using EC.App.ThatBLL.Onvif;
|
|
using Furion.DataValidation;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace OnvifWebServer.Controllers.Onvif
|
|
{
|
|
/// <summary>
|
|
/// Onvif 设备参数控制
|
|
/// </summary>
|
|
[ApiController]
|
|
[ApiDescriptionSettings("Onvif")]
|
|
[Route("onvif/[controller]")]
|
|
public class DeviceController : ApiController
|
|
{
|
|
private readonly IDeviceBLL _deviceBLL;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="deviceBLL"></param>
|
|
public DeviceController(IDeviceBLL deviceBLL)
|
|
{
|
|
this._deviceBLL = deviceBLL;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 是否连接
|
|
/// </summary>
|
|
/// <param name="ip"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public bool IsConnected(
|
|
[Required][DataValidation(ValidationTypes.IPv4)] string ip)
|
|
{
|
|
bool ret = _deviceBLL.IsConnected(ip);
|
|
return ret;
|
|
}
|
|
}
|
|
}
|