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.
iot/projects/IoTNode/Controllers/FBee/GatewayController.cs

56 lines
1.7 KiB

using Application.Models;
using IoTNode.DeviceServices.FBee;
using Microsoft.AspNetCore.Mvc;
using Swashbuckle.AspNetCore.Annotations;
using System;
namespace IoTNode.Controllers
{
[SwaggerTag("网关")]
public class GatewayController : BaseDeviceController
{
private readonly FBeeService _deviceService;
public GatewayController(IServiceProvider applicationServices, FBeeService deviceService) : base(applicationServices)
{
this._deviceService = deviceService;
}
[HttpGet, Route("/[controller]/[action]"), SwaggerOperation("")]
public ApiResponse Refresh()
{
return this.AsyncAction(() =>
{
this._deviceService.Execute();
});
}
[HttpGet, Route("/[controller]/[action]"), SwaggerOperation("")]
public ApiResponse X9d([SwaggerParameter("网关Id")]string number)
{
return this.AsyncAction(() =>
{
this._deviceService.X9d(number);
});
}
[HttpGet, Route("/[controller]/[action]"), SwaggerOperation("")]
public ApiResponse X81([SwaggerParameter("网关Id")]string number)
{
return this.AsyncAction(() =>
{
this._deviceService.X81(number);
});
}
[HttpGet, Route("/[controller]/[action]"), SwaggerOperation("")]
public ApiResponse X95([SwaggerParameter("网关编号")]string gateway, [SwaggerParameter("设备编号")]string number)
{
return this.AsyncAction(() =>
{
this._deviceService.X95(gateway, number);
});
}
}
}