Illustrated C/C++ source sheets, symbol index, API relationship graph, compiler console and debug trace

LIVE AI / FLEXIBLE SENSING / FLIGHT CONTEXT

Sensoraia API

Live AI and sensing, connected to the flight.
See, listen, inspect and return supported results while airborne.

Loading...
Searching...
No Matches
lwir_mock.h File Reference

Optional development replay adapter, independent of geographic analysis. More...

#include <stdbool.h>
Include dependency graph for lwir_mock.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int lwir_process_mock (const char *input_path, const char *output_path, bool layer_only)
 Preserve embedded temperatures or attach explicitly synthetic evidence.

Detailed Description

Optional development replay adapter, independent of geographic analysis.

Built only with LWIR_ENABLE_MOCK. Turns an ordinary JPEG into LWIR evidence for tests and demos: an existing temperature layer is preserved, otherwise temperatures are synthesized from luminance and tagged LWIRSIM1.

Definition in file lwir_mock.h.

Function Documentation

◆ lwir_process_mock()

int lwir_process_mock ( const char * input_path,
const char * output_path,
bool layer_only )

Preserve embedded temperatures or attach explicitly synthetic evidence.

Parameters
input_pathRegular source JPEG.
output_pathDestination; existing unrelated files are never overwritten.
layer_onlyAttach evidence without recompressing display pixels.
Returns
Zero on success, otherwise -1.

Serial worker adapter. Synthesized temperatures cannot represent a physical measurement and never inherit live device-state provenance. The result is published atomically (link or same-inode rename) and the directory is fsynced; the source must stay unchanged during processing.

Note
With layer_only and a source that already holds a temperature layer, nothing is written and 0 is returned, even when output_path differs.
Warning
Uses one static workspace; not reentrant or thread-safe.

Preserve embedded temperatures or attach explicitly synthetic evidence.

Returns
0 on success, -1 on any failure.

Steps: open and identify the source; read any embedded layer; decode if needed; write a mode-matched temporary file next to the output; check that the source did not change meanwhile; publish with link() (fails if the name exists) or, in place, rename() after confirming the path still names the same inode; finally fsync the directory.

Warning
-1 is also returned if only the final directory fsync fails, after the file has already been published.

Definition at line 208 of file lwir_mock.c.