Skip to content

App interfaces ​

include/navx/app/ holds the interfaces an app uses with the NavX firmware. They're interfaces only: data module layouts and helpers, nothing about how the firmware hooks the unit's software.

HeaderWhatState
ui_host.hthe UI host protocol: an app drawing its area inside the NavX shellversion 1, UI SDK
ibus_ring.hcarbus's I-Bus frame ring: every frame the unit receives, read-only for appslayout agreed; header moving in from navx-firmware
owner.hwho has the screen and the knob (launcher, app, car functions)version 2 coming with the firmware
navx_app.hone include for apps, SDK versioncoming with the firmware

Rules every interface follows ​

  • Versioned and append-only. A magic number, a version, and the header's own size come first. A newer version adds fields at the end and never moves one. Readers check magic, version and size before using anything.
  • Big-endian, 4-byte aligned, with data module sizes a multiple of 4.
  • One writer per field. Rings use a head the writer advances and a tail the reader advances, so there's no locking.

The I-Bus ring ​

carbus publishes the frames it receives in a data module (ibus_ring):

  • 64 slots, each holding a sequence number, ticks, the length and the bytes (src len dst data… xor).
  • The writer fills a slot, then its sequence number, then the head.
  • The reader keeps one slot clear of the head, and counts the frames it lost when it was lapped.

ibusx (the I-Bus monitor) and the NavX shell's car screens read it. Apps never send on the bus through it.

The NavX SDK is private for now; these docs are public.