Clumsy-API

来自MDCS wiki
Huangzhaowei讨论 | 贡献2023年10月8日 (日) 14:46的版本 (创建页面,内容为“= Clumsy = === 等待所有任务结束后重启Clumsy === <blockquote>'''Path:{ip}:8008/stop''' '''Method:''' '''GET''' '''接口描述:无''' '''请求(案例):'''<nowiki>http://127.0.0.1:8008/stop</nowiki> '''返回(案例):'''<code>{"success":true,"id":0}</code></blockquote> === 立即重启Clumsy === <blockquote>'''Path:{ip}:8008/reset''' '''Method:''' '''GET''' '''接口描述:无''' token:int,查询任务的标识 ''…”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳到导航 跳到搜索

Clumsy

等待所有任务结束后重启Clumsy

Path:{ip}:8008/stop

Method: GET

接口描述:无

请求(案例):http://127.0.0.1:8008/stop

返回(案例):{"success":true,"id":0}

立即重启Clumsy

Path:{ip}:8008/reset

Method: GET

接口描述:无

token:int,查询任务的标识

请求(案例):http://127.0.0.1:8008/reset

返回(案例):{"success":true,"id":0}

获取Simple 访问的上下位信号的值

Path:{ip}:8008/getStat

Method: GET

接口描述:无

请求(案例):http://127.0.0.1:8008/getStat

返回(案例):{ "LeftWheelVelocity": "0", "RightWheelVelocity": "0", "thresSpeed": "2500", "soc": "0", "fault": "False", "manul": "0", "diagnosis": "/", "driveStatus": "DriveStop@0001/1/1 0:00:00", "runningScript": "/"

}

获取动作执行结果

Path:{ip}:8008/exec_result

Method: GET

接口描述:无

请求(案例):http://127.0.0.1:8008/exec_result?token=231231

返回(案例):若 token 有效,则返回{token(int):[任务标识],status(string):“pending”/“finished”/“error”,detail(string):[报错信息],time(DateTime):[时间] }

若 token 无效,则返回{error: “invalid token”}