Device Protocol SDK
无人机设备协议开发工具包,提供标准化接口实现多类型无人机设备的快速接入。
功能特性
- 🛠️ 协议无关抽象:统一各类无人机设备的控制接口
- 🔌 连接池管理:自动维护设备连接,支持多设备并行控制
- 🚀 实时状态推送:内置WebSocket状态推送工具
- 🔍 动态协议发现:运行时自动加载用户协议实现
⚠️ 升级 SDK 后必须重启适配器进程
DevicePusher 采用两段式上报,两条语义不要混:
| 信号 | 时机 | 含义 |
|---|---|---|
CommandAck(message="accepted") |
收到命令立即 | 命令已受理(主系统 10s 短超时只等这一段) |
DeviceMessage(message_type="action_completed") |
动作执行结束后 | 动作真正做完/失败,由 _report_action_completed() 上报,metadata 带 command_id |
主系统的 DAG 调度器按 command_id 查这条完成上报来判定 step 终态。所以:
- 适配器作者无需自己发
action_completed—— Pusher 在串行/并行两个分支统一发, 自己再发一条反而会重复。 - 改了 SDK 就必须重启适配器进程。仍在跑旧版 SDK 的适配器不会上报
action_completed,step 会白等满completion_timeout_seconds(默认 300s)才判失败, 期间下游步骤全部不派发。主系统会打协议 X 的适配器仍在使用旧版 SDK的 warning (判据:新版受理 ACK 带message="accepted",旧版该字段为空 —— 别删这个字面量)。 - 各动作实现的返回值判定口径:
None/ 异常 /{"error": ...}/{"status": "error"}/{"success": False}都算失败(见DevicePusher._result_ok,与主系统WorkflowScheduler._device_result_error对齐)。
安装
pip install device-protocol-sdk
Metadata
Release files for device-protocol-sdk 1.2.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| device_protocol_sdk-1.2.13.tar.gz | 47.8 kB | Without provenance | Details for device_protocol_sdk-1.2.13.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| device_protocol_sdk-1.2.13-py3-none-any.whl | Python 3 | none | any | Details for device_protocol_sdk-1.2.13-py3-none-any.whl |
Total release size: 98.0 kB
Release files / device_protocol_sdk-1.2.13.tar.gz
| Download URL | device_protocol_sdk-1.2.13.tar.gz |
|---|---|
| Size | 47.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
68b3679d4a3a11f1005f1c4201848695836ab7ae24dd3752fb3c3d7b71db5503
|
|
BLAKE2b-256 checksum How to use checksums |
6eaa91d4c682080e4d420b0fc523234b7737287eee2ef0a29af933a56a59838b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.14
|
Release files / device_protocol_sdk-1.2.13-py3-none-any.whl
| Download URL | device_protocol_sdk-1.2.13-py3-none-any.whl |
|---|---|
| Size | 50.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
17a00fc39123537745e62a06612b5d2dacc7fb1a973f5ec3e472302e1bb0ed67
|
|
BLAKE2b-256 checksum How to use checksums |
7631dda2636b6828f7adcc6516239108c7549dd0cdd2e8eb4d95e64e4f0ae5f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.14
|
Security for device-protocol-sdk 1.2.13
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.