Expand description
No-std CAN protocol primitives for KCAN actuator tooling.
This crate intentionally stays small: fixed-size CAN frames, CubeMars Servo
Direct payload builders, and RobStride status parsing. Higher-level transport,
dashboards, and analytics live in sibling crates or the main kcan crate.
use kcan_core::{CanId, DirectCommand, direct_command_frame};
let id: CanId = "extended:0x301".parse()?;
let frame = direct_command_frame(0x03, DirectCommand::Velocity(1_000))?;
assert_eq!(id.raw(), 0x301);
assert_eq!(frame.to_string(), "extended 0x303 len=4 data=00 00 03 E8");Structs§
Enums§
Constants§
- CURRENT_
SCALE - DUTY_
SCALE - MAX_
CAN_ DATA_ LEN - MAX_
CURRENT_ AMPS - MAX_
DUTY_ CYCLE - MAX_
EXTENDED_ ID - MAX_
POSITION_ DEGREES - MAX_
PROFILE_ ACCELERATION_ ERPM_ PER_ SEC - MAX_
PROFILE_ ERPM - MAX_
PROTOCOL_ ERPM - MAX_
STANDARD_ ID - MIN_
POSITION_ DEGREES - MIN_
PROFILE_ ACCELERATION_ ERPM_ PER_ SEC - MIN_
PROFILE_ ERPM - MIN_
PROTOCOL_ ERPM - POSITION_
SCALE - PROFILE_
ERPM_ PER_ UNIT - ROBSTRIDE_
CONFIG_ BASE_ ID - ROBSTRIDE_
MIT_ BASE_ ID - ROBSTRIDE_
POSITION_ BASE_ ID - ROBSTRIDE_
SPEED_ BASE_ ID - ROBSTRIDE_
STATUS_ BASE_ ID