|
using HH.WCS.JunzhouNongfu.device;
|
using HH.WCS.Mobox3.YNJT_BZP.device;
|
using Microsoft.Owin.BuilderProperties;
|
using Newtonsoft.Json;
|
using NModbus;
|
using System;
|
using System.Web.Http;
|
using static HH.WCS.Mobox3.YNJT_BZP.api.ApiModel;
|
using static HH.WCS.Mobox3.YNJT_BZP.device.S7Helper;
|
using System.Net.Sockets;
|
|
namespace HH.WCS.Mobox3.YNJT_BZP.api {
|
/// <summary>
|
/// 测试用,如果项目中要和设备对接,前期设备无法测试,用接口模拟
|
/// </summary>
|
[RoutePrefix("api")]
|
public class DebugController : ApiController {
|
|
|
[HttpPost]
|
[Route("s7SetInt")]
|
public SimpleResult s7SetInt(DBWModel model) {
|
S7Helper.s7SetInt(model);
|
return new SimpleResult();
|
|
}
|
|
|
[HttpPost]
|
[Route("s7SetBit")]
|
public SimpleResult s7SetBit(DBXModel model) {
|
S7Helper.s7SetBit(model);
|
return new SimpleResult();
|
|
}
|
[HttpPost]
|
[Route("s7SetString")]
|
public SimpleResult s7SetString(DBBModel model) {
|
S7Helper.s7SetStr(model);
|
return new SimpleResult();
|
|
}
|
|
|
}
|
}
|