Template Source Code¶
The primary template for writing new compute units is the V2 template in src/milk_module_example/:
| Template File | Purpose |
|---|---|
examplefunc_fps_cli_poc.c | V2 compute unit — unified FPS-CLI standalone/module template |
examplefunc1.c/h | Simple function (no FPS) |
examplefunc2_FPS.c/h | FPS-enabled function (V1 style) |
examplefunc4_streamprocess.c/h | Stream processing loop |
milk_module_example.c/h | Module registration boilerplate |
Getting Started¶
- Copy
examplefunc_fps_cli_poc.cto your module directory. - Follow the 8-section structure documented in the file header.
- See
docs/developer/tutorial.mdfor a step-by-step walkthrough.
Documenting Functions¶
Use Kernel-Doc style comments above each function. See docs/developer/DocumentingCode.md for the full style guide.
[FPS]: Function Processing System — shared-memory parameter management [SHM]: Shared Memory (/dev/shm) [AO]: Adaptive Optics [TUI]: Text User Interface (ANSI escape sequences) [CLI]: Command Line Interface [IMGID]: Image ID — milk's stream reference structure [LTO]: Link-Time Optimization [PGO]: Profile-Guided Optimization [RT]: Real-Time (scheduling) [DM]: Deformable Mirror [WFS]: Wavefront Sensor [FITS]: Flexible Image Transport System *[IPC]: Inter-Process Communication