Variable_lane/可变车道JSON协议.json
2025-02-10 15:47:37 +08:00

239 lines
4.5 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

JSON
(Web )
{
"command": "login",
"parameters": {
"username": "string",
"password": "string"
}
}
( Web)
{
"command": "login_response",
"parameters": {
"status": 0, // 0: 成功, 1: 失败
"message": "Login successful" // 成功或失败的提示信息
}
}
()
(Web )
{
"JSON_id": 2,
"command": "change_password",
"parameters": {
"old_password": "",
"new_password": ""
}
}
( Web)
{
"command": "change_password_response",
"parameters": {
"status": 0, // 0: 成功, 1: 失败
"message": "Psword changed successfully"
}
}
JSON
(Web )
{
"command": "set_time",
"parameters": {
"timestamp": "2025-01-13T12:00:00Z"
}
}
( Web)
{
"command": "set_time_response",
"parameters": {
"status": 0, // 0: 成功, 1: 失败
"message": "Time set successfully"
}
}
(Web
{
"command": "set_mode",
"parameters": {
"mode": 0, // 智能模式
"data": {
"param1": "value1",
"param2": "value2",
"param3": "value3"
}
}
}
( Web)
{
"command": "set_mode_response",
"parameters": {
"status": 0, // 0: 成功, 1: 失败
"message": "Mode set successfully"
}
}
(Web )
{
"command": "set_scheme",
"parameters": {
"scheme": [
{
"id": 1,
"name": "方案1",
"selectedMode": "1", // 1:直行2:左转3:右转4:掉头
"timeRange": {
"start": "08:00",
"end": "10:00"
},
"lanes": [
"0",
"1"
],
"repeatDays": [0, 1, 2, 3, 4, 5, 6] // 表示周一到周日每天都重复执行该方案
}
]
}
}
( Web)
{
"command": "set_scheme_response",
"parameters": {
"status": 0, // 0: 成功, 1: 失败
"message": "Add Plan successfully"
}
}
(Web )
{
"command": "get_device_info",
"parameters": {}
}
( Web)
{
"command": "get_device_info_response",
"parameters": {
"version": "1.0.3", // 版本号
"compileTime": "2025-01-14T10:30:00Z"
}
}
(Web )
{
"command": "get_all_info",
"parameters": {}
}
( Web)
{
"command": "get_all_info_response",
"parameters": {
"set_mode": 0, // 智能模式
"scheme": [
{
"id": 1,
"name": "方案1",
"selectedMode": "1", // 1:直行2:左转3:右转4:掉头
"timeRange": {
"start": "08:00",
"end": "10:00"
},
"lanes": [
"0",
"1"
],
"repeatDays": [0, 1, 2, 3, 4, 5, 6] // 表示周一到周日每天都重复执行该方案
}
],
"laneSetting": {
"lane1": "0", //0左转直行 1右转直行
"lane2": "1",
"lane3": "0",
"lane4": "1"
},
"deviceInfo": {
"version": "1.0.3",
"compileTime": "2025-01-14 10:30:00"
}
}
}
(Web )
{
"command": "default_lane_setting",
"parameters": {
"lane1": "0", //0左转直行 1右转直行
"lane2": "1",
"lane3": "2",
"lane4": "3"
}
}
( Web)
{
"command": "default_lane_setting",
"parameters": {
"status": 0, // 0: 成功, 1: 失败
"message": "Set successfully"
}
}
使
(Web )
{
"JSON_id": 30,
"command": "set_scheme_status",
"parameters": {
"id": 1,
"enabled": false
}
}
( Web)
{
"command": "set_scheme_status_response",
"parameters": {
"status": 0, // 0: 成功, 1: 失败
"message": "Set successfully"
}
}
(Web )
{
"command": "delete_scheme",
"parameters": {
"id": 1
}
}
( Web)
{
"command": "delete_scheme_response",
"parameters": {
"status": 0, // 0: 成功, 1: 失败
"message": "Delete successfully"
}
}