25개 이상의 토픽을 선택하실 수 없습니다.
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- using BPASmartClient.AGV.Feedback;
- using Microsoft.AspNetCore.Mvc;
- using Microsoft.AspNetCore.SignalR;
- using Newtonsoft.Json;
-
- namespace BPASmartClient.AgvApi.Controllers
- {
- [ApiController]
- [Route("apicallback/quicktron/[Controller]")]
- public class robotjobController : ControllerBase
- {
- /// <summary>
- /// 搬运任务状态上报
- /// </summary>
- /// <param name="sign"></param>
- /// <returns></returns>
- [HttpPost("report")]
- public string report(string sign)
- {
- if (sign != null)
- {
- try
- {
- var res = JsonConvert.DeserializeObject<AGVToUpSystem>(sign);
- if (res != null)
- {
- Factory.GetInstance.SendReport(res);
- return "SUCCESS";
- }
- }
- catch (Exception ex)
- {
- return ex.ToString();
- }
-
- }
- return "Error";
- }
-
- /// <summary>
- /// AGV上下料交互请求接口
- /// </summary>
- /// <param name="sign"></param>
- /// <returns></returns>
- [HttpPost("upstreamrequest")]
- public string upstreamrequest(string sign)
- {
- if (sign != null)
- {
- try
- {
- var res = JsonConvert.DeserializeObject<Upstreamrequest>(sign);
- if (res != null)
- {
- Factory.GetInstance.SendUpstreamrequest(sign);
- return "SUCCESS";
- }
- }
- catch (Exception ex)
- {
- return ex.ToString();
- }
-
- }
- return "Error";
- }
-
- }
- }
|