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.
29 lines
908 B
29 lines
908 B
using Application.Models;
|
|
using IoTNode.DeviceServices.FBee;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Swashbuckle.AspNetCore.Annotations;
|
|
using System;
|
|
|
|
namespace IoTNode.Controllers
|
|
{
|
|
[SwaggerTag("窗帘")]
|
|
public class CurtainController : SwitchController
|
|
{
|
|
internal readonly FBeeService _deviceService;
|
|
|
|
public CurtainController(IServiceProvider applicationServices, FBeeService deviceService) : base(applicationServices, deviceService)
|
|
{
|
|
this._deviceService = deviceService;
|
|
}
|
|
|
|
[HttpGet, Route("/[controller]/[action]"), SwaggerOperation("停")]
|
|
public ApiResponse Stop([SwaggerParameter("设备编号")]string number)
|
|
{
|
|
return this.AsyncAction(() =>
|
|
{
|
|
var values = number.Split('-');
|
|
this._deviceService.X82(values[0], values[1], 2);
|
|
});
|
|
}
|
|
}
|
|
} |