API Reference

EtherCAT API Documentation EN / API 文档 中文

Bilingual Go package documentation for the EtherCAT EtherCAT protocol library / EtherCAT EtherCAT 协议库的双语 Go 包文档

Public Packages 公开包

ESC register address constants / ESC 寄存器地址常量
Frame and datagram encoding/decoding / 帧和数据报编解码
Command execution and multiplexing / 命令执行和多路复用
EEPROM access via ESC registers / 通过 ESC 寄存器访问 EEPROM
ESI XML file parser / ESI XML 文件解析器

Internal Packages 内部包

LE/BE binary encoding helpers / 小端/大端二进制编解码辅助
internal/
L2 slave and bus simulation / L2 从站和总线模拟
internal/
UDP multicast link-layer driver / UDP 多播链路层驱动
internal/

Quick Reference 快速参考

Microsecond-Level Performance 微秒级性能

Shortest software cycle ~1 μs (x86) / ~4 μs (ARM64); shortest jitter ~0.1 μs (stddev). DatagramHeader.Overlay ~3.0 ns, Commit ~2.1 ns (x86). Core hot path < 0.5% of typical 100μs cycle. L2Bus.Cycle (setup-inclusive) ~20 μs (x86) / ~70 μs (ARM).
最短软件周期 ~1 μs(x86)/ ~4 μs(ARM64);最短抖动 ~0.1 μs(标准差)。 数据报头 Overlay ~3.0 ns, Commit ~2.1 ns(x86)。核心热路径占 100μs 周期 < 0.5%。 L2Bus.Cycle(含创建)~20 μs(x86)/ ~70 μs(ARM)。 → 性能极限报告 / Performance report

ARM64 优化 — 通过 FrameOverlayPool 零分配策略,ARM64 帧解码加速约 16×(本次复测 FrameOverlay ~447 ns → OverlayReuse ~28 ns)。 → 查看 ARM 优化专项报告

Package Dependencies 包依赖关系

ecfr / ecad / eni → base layer (no internal deps)
ecmd → depends on ecfr, internal/marshalling
ecee → depends on ecad, ecfr, ecmd
cmd/ethercat → depends on eni