Skip to main content

Crate odrive_can_driver

Crate odrive_can_driver 

Source
Expand description

ODrive CANSimple 的无分配共享总线驱动 core。

此 crate 只追踪本地发送与观察到的协议帧;它不保证设备执行命令,也不会自动重试、 查询、清错或改变轴状态。

The application owns the CAN endpoints. It calls Driver::authorize_tx before every native TX poll, and retains native frames, FD/RTR distinctions and backend errors itself.

Modules§

embassy
Embassy STM32 FDCAN split-endpoint adapter.
embedded_can
embedded-can 0.4 non-blocking endpoint adapter.
protocol
ODrive CANSimple 编解码器及硬件无关帧类型。 ODrive CANSimple 协议库入口,提供版本明确的编解码 API 与硬件无关帧类型。
socketcan
Linux SocketCAN 4 的分离、非阻塞收发端点。

Structs§

CachedResponse
A decoded response and the application-supplied receive timestamp.
Driver
One-slot node driver with no CAN controller, allocator, lock or executor.
Duration
A microsecond duration.
Instant
A microsecond timestamp in one monotonic clock domain.
OperationId
A session-bound operation identity.
OperationReport
A snapshot with event times and separately recorded processing time.
ResponseCache
One most-recent response per protocol type.
ResponseCandidate
A particular cached query response presented to application policy.
SendPermit
Non-copy single-use permission to initiate one TX attempt.
Session
Linear identity owned by the application for the lifetime of its driver.
TxAttempt
Non-copy native TX attempt; its frame is only available through the per-poll gate.

Enums§

AttemptError
TX authorization or backfill failure.
BeginSendError
Cannot consume a permit to start TX.
IngestResult
Decoding result, while caller retains its complete native frame/error.
OperationKind
The direction and payload of a local operation.
OperationState
Local operation state; Submitted is never device acknowledgement.
PrepareError
Preparation failure.
ReportError
Report access failure.
ResponseKind
Fixed cache category.
TxCompletion
Next local step after final TX future result.
TxOutcome
Result supplied only after native TX future has ended.