Documentation Index
Fetch the complete documentation index at: https://motorbridge.seeedstudio.com/llms.txt
Use this file to discover all available pages before exploring further.
Source:
docs/en/architecture.mdArchitecture
Layered View
Runtime Control Flow
Design Goal
motorbridge separates generic control infrastructure from vendor-specific protocol logic.
- Core should be reusable across vendors.
- Vendor crates should contain protocol/register/model differences.
- ABI should expose stable cross-language entry points.
Repository Layout
Core Layers
1) motor_core
bus.rs: CAN bus abstractiondevice.rs: unifiedMotorDevicetraitcontroller.rs: scheduling/routing/pollingmodel.rs: model catalog abstractionsocketcan.rs: Linux classic SocketCAN backendsocketcanfd.rs: Linux dedicated SocketCAN-FD backendpcan.rs: Windows PEAK PCAN backend (experimental)
2) motor_vendors/*
Each vendor crate implements:
- frame encode/decode
- register semantics
- motor model limits
- controller facade wrapping
CoreController
3) motor_abi
- exports C-compatible handles and functions
- wraps Rust errors into integer return code +
motor_last_error_message() - enables C/C++/Python/etc integration
4) SDK/Examples
motor_cli: operational/debugging command-line toolbindings/python: reusable Python package for deployment/integrationbindings/cpp: reusable C++ RAII wrapper for deployment/integrationexamples/*: minimal cross-language ABI usage references
Lifecycle Policy
Controller lifecycle is explicit:- Use
motor_controller_shutdownwhen you want an explicit stop/disable flow. - Use
motor_controller_close_buswhen you only want to close local session/bus. motor_controller_freenow only releases memory/objects.