Files
templates/c/set-protocol/ports/android/README.md

16 lines
852 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Android port
`Android.mk` builds `libsetprotocol.so` from the same C99 sources used by MCU
and desktop builds. `setprotocol_jni.c` contains only JNI marshalling; protocol rules
remain in the core. Add the Kotlin directory as an Android source directory
and include this `Android.mk` from the application NDK build.
The JNI streaming parser returns fixed 15-byte records
`SEQ | FLAGS | CAN_ID_LE | DLC | DATA[8]`. Dynamic allocation is confined to
the Android adapter for protocol operations; the portable protocol core remains allocation free.
`nativeSpectrum` calls the shared host DSP module `set_spectrum.c` (bounded heap
workspace, up to 2×16384 doubles). `trends/SpectrumAnalyzer` maps timestamps and
errors but does not duplicate FFT/filter math. Run it off the UI thread.
`trends/PlotViewport` is a toolkit-free normalized zoom/pan model.