补充 9.9.1 机巢交付资料并切换运行配置

This commit is contained in:
2026-11-18 14:56:19 +08:00
parent 156ea871fa
commit 15602f8a82
170 changed files with 12736 additions and 1 deletions
@@ -0,0 +1,60 @@
{
"code": 100000,
"msg": "success",
"data": {
"task_id": 501,
"execution_id": "execution-001",
"state": {
"version": 18,
"stage": "ready",
"paused": false,
"context": "context-ready-001",
"live_version": 2,
"reason": null,
"operations": []
},
"telemetry": {
"version": 7,
"items": {
"battery": {
"value": "95%",
"observed_at": "2026-11-06T10:00:00.000+08:00",
"stale": false
},
"env_temp": {
"value": "19.6℃",
"observed_at": "2026-11-06T10:00:00.000+08:00",
"stale": false
},
"wind_speed": {
"value": "2m/s",
"observed_at": "2026-11-06T10:00:00.000+08:00",
"stale": false
},
"rainfall": {
"value": "无雨",
"observed_at": "2026-11-06T10:00:00.000+08:00",
"stale": false
},
"signal": {
"value": "良好",
"observed_at": "2026-11-06T10:00:00.000+08:00",
"stale": false
},
"satellite": {
"value": "32颗",
"observed_at": "2026-11-06T10:00:00.000+08:00",
"stale": false
}
}
},
"info": {
"order_number": "261106000001",
"spot_name": "示例拍摄点",
"route_name": "示例航线",
"tourist_label": "游客 158****8888",
"package_name": "航拍套餐 · 含 2 次拍摄",
"cover_url": null
}
}
}
@@ -0,0 +1,5 @@
{
"request_id": "11111111-1111-4111-8111-111111111111",
"action": "pause",
"expected_execution_id": "execution-001"
}
@@ -0,0 +1,34 @@
{
"code": 100000,
"msg": "success",
"data": {
"task_id": 501,
"execution_id": "execution-001",
"operation": {
"request_id": "11111111-1111-4111-8111-111111111111",
"execution_id": "execution-001",
"action": "pause",
"status": "pending",
"version": 1,
"error": null
},
"state": {
"version": 19,
"stage": "ready",
"paused": false,
"context": null,
"live_version": 2,
"reason": null,
"operations": [
{
"request_id": "11111111-1111-4111-8111-111111111111",
"execution_id": "execution-001",
"action": "pause",
"status": "pending",
"version": 1,
"error": null
}
]
}
}
}
@@ -0,0 +1,8 @@
{
"type": "${V2_SUBSCRIBE_TYPE}",
"params": {
"task_id": 501,
"socket_token": "EXAMPLE_SOCKET_TOKEN",
"request_id": "subscribe-request-example"
}
}
@@ -0,0 +1,54 @@
{
"code": 100000,
"event": "airport_v2.subscribed",
"subscription_id": "subscription-example-001",
"data": {
"task_id": 501,
"execution_id": "execution-001",
"state": {
"version": 18,
"stage": "ready",
"paused": false,
"context": "context-ready-001",
"live_version": 2,
"reason": null,
"operations": []
},
"telemetry": {
"version": 7,
"items": {
"battery": {
"value": "95%",
"observed_at": "2026-11-06T10:00:00.000+08:00",
"stale": false
},
"env_temp": {
"value": "19.6℃",
"observed_at": "2026-11-06T10:00:00.000+08:00",
"stale": false
},
"wind_speed": {
"value": "2m/s",
"observed_at": "2026-11-06T10:00:00.000+08:00",
"stale": false
},
"rainfall": {
"value": "无雨",
"observed_at": "2026-11-06T10:00:00.000+08:00",
"stale": false
},
"signal": {
"value": "良好",
"observed_at": "2026-11-06T10:00:00.000+08:00",
"stale": false
},
"satellite": {
"value": "32颗",
"observed_at": "2026-11-06T10:00:00.000+08:00",
"stale": false
}
}
}
},
"request_id": "subscribe-request-example"
}
@@ -0,0 +1,18 @@
{
"code": 100000,
"event": "airport_v2.state",
"subscription_id": "subscription-example-001",
"data": {
"task_id": 501,
"execution_id": "execution-001",
"state": {
"version": 30,
"stage": "returning",
"paused": false,
"context": null,
"live_version": 2,
"reason": null,
"operations": []
}
}
}
@@ -0,0 +1,18 @@
{
"code": 100000,
"event": "airport_v2.state",
"subscription_id": "subscription-example-001",
"data": {
"task_id": 501,
"execution_id": "execution-001",
"state": {
"version": 31,
"stage": "completed",
"paused": false,
"context": null,
"live_version": 2,
"reason": null,
"operations": []
}
}
}
@@ -0,0 +1,18 @@
{
"code": 100000,
"event": "airport_v2.state",
"subscription_id": "subscription-example-001",
"data": {
"task_id": 501,
"execution_id": "execution-001",
"state": {
"version": 32,
"stage": "returned",
"paused": false,
"context": null,
"live_version": 2,
"reason": "MANUAL_RETURN",
"operations": []
}
}
}
@@ -0,0 +1,44 @@
{
"code": 100000,
"event": "airport_v2.telemetry",
"subscription_id": "subscription-example-001",
"data": {
"task_id": 501,
"execution_id": "execution-001",
"telemetry": {
"version": 7,
"items": {
"battery": {
"value": "95%",
"observed_at": "2026-11-06T10:00:00.000+08:00",
"stale": false
},
"env_temp": {
"value": "19.6℃",
"observed_at": "2026-11-06T10:00:00.000+08:00",
"stale": false
},
"wind_speed": {
"value": "2m/s",
"observed_at": "2026-11-06T10:00:00.000+08:00",
"stale": false
},
"rainfall": {
"value": "无雨",
"observed_at": "2026-11-06T10:00:00.000+08:00",
"stale": false
},
"signal": {
"value": "良好",
"observed_at": "2026-11-06T10:00:00.000+08:00",
"stale": false
},
"satellite": {
"value": "32颗",
"observed_at": "2026-11-06T10:00:00.000+08:00",
"stale": false
}
}
}
}
}
@@ -0,0 +1,11 @@
{
"code": 100000,
"event": "airport_v2.heartbeat",
"subscription_id": "subscription-example-001",
"data": {
"task_id": 501,
"execution_id": "execution-001",
"state_version": 30,
"telemetry_version": 8
}
}
@@ -0,0 +1,24 @@
{
"code": 100000,
"msg": "success",
"data": {
"task_id": 501,
"execution_id": "execution-001",
"live_version": 2,
"refresh_after": 30,
"sources": {
"airport": {
"available": true,
"app_id": "EXAMPLE_APP_ID",
"room_id": "EXAMPLE_AIRPORT_ROOM",
"user_id": "EXAMPLE_VIEWER_AIRPORT",
"token": "EXAMPLE_RTC_TOKEN",
"expires_in": 2400
},
"drone": {
"available": false,
"reason": "DRONE_NOT_READY"
}
}
}
}
@@ -0,0 +1,40 @@
{
"code": 100000,
"msg": "success",
"data": {
"task_id": 501,
"execution_id": "execution-001",
"operation": {
"request_id": "11111111-1111-4111-8111-111111111111",
"execution_id": "execution-001",
"action": "pause",
"status": "unknown",
"version": 2,
"error": {
"code": "DEVICE_CONFIRMATION_UNKNOWN",
"msg": "暂未确认暂停是否生效"
}
},
"state": {
"version": 21,
"stage": "ready",
"paused": false,
"context": null,
"live_version": 2,
"reason": null,
"operations": [
{
"request_id": "11111111-1111-4111-8111-111111111111",
"execution_id": "execution-001",
"action": "pause",
"status": "unknown",
"version": 2,
"error": {
"code": "DEVICE_CONFIRMATION_UNKNOWN",
"msg": "暂未确认暂停是否生效"
}
}
]
}
}
}
@@ -0,0 +1,6 @@
{
"code": 100099,
"msg": "当前执行已变化,请刷新后重试",
"error_code": "EXECUTION_CHANGED",
"data": null
}
@@ -0,0 +1,36 @@
{
"code": 100000,
"msg": "success",
"data": {
"task_id": 501,
"execution_id": "execution-002",
"operation": {
"request_id": "55555555-5555-4555-8555-555555555555",
"execution_id": "execution-001",
"action": "summon",
"status": "pending",
"version": 1,
"error": null,
"new_execution_id": "execution-002"
},
"state": {
"version": 33,
"stage": "travelling",
"paused": false,
"context": null,
"live_version": 3,
"reason": null,
"operations": [
{
"request_id": "55555555-5555-4555-8555-555555555555",
"execution_id": "execution-001",
"action": "summon",
"status": "pending",
"version": 1,
"error": null,
"new_execution_id": "execution-002"
}
]
}
}
}
@@ -0,0 +1,7 @@
{
"type": "${V2_UNSUBSCRIBE_TYPE}",
"params": {
"task_id": 501,
"subscription_id": "subscription-example-001"
}
}
@@ -0,0 +1,20 @@
{
"code": 100000,
"msg": "success",
"data": {
"task_id": 501,
"execution_id": null,
"operation": {
"request_id": "88888888-8888-4888-8888-888888888888",
"execution_id": null,
"action": "summon",
"status": "rejected",
"version": 1,
"error": {
"code": "ACTION_NOT_ALLOWED",
"msg": "当前没有可用设备,请稍后重试"
}
},
"state": null
}
}
@@ -0,0 +1,7 @@
# v2 协议样例
与《拍摄任务页-v2接口协议-后端实施稿.md》配套。所有数据为虚构、凭证无效,不能用于真实飞控或直播连接。
`*.template.json` 中的 type 是未分配编号的字符串占位。实际协议要求 JSON 整数;需朱工登记新编号后替换,不能使用旧310/311。
同一任务各示例演示不同业务分支,不能理解为按文件序号依次执行真实动作。HTTP 202/错误状态等传输语义见主文档。