Skip to content

Code Overview

This section documents the library’s source layout and the APIs that interface with each other. The goal is to keep each layer as separate as possible — CAN framing, protocol encoding, and motor limits each live in their own headers.

include/
├── AK_Series.hpp # top-level public header
├── Exceptions.hpp # shared exception types
├── IO.hpp # CAN I/O (socket send/receive)
├── can/ # raw CAN frame types
│ ├── frame.hpp # base Frame
│ ├── MIT_frame.hpp
│ ├── Servo_frame.hpp
│ └── send.hpp
├── motors/
│ └── MotorLimits.hpp # per-motor limit definitions
└── protocol/ # protocol encoding/decoding
├── Exceptions.hpp
├── MIT.hpp
└── servo.hpp
src/
└── can/
├── MIT_frame.cpp
└── Servo_frame.cpp
Layer Where What it does
CAN frames include/can, src/can Builds and converts raw can_frames
Protocol include/protocol Encodes/decodes Servo and MIT commands
Motors include/motors Per-motor limits and constraints