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
Go to the documentation of this file.
1/*
2 * Copyright 2026 OpenUAS
3 * SPDX-License-Identifier: Apache-2.0
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18#ifndef SENSORAIA_LWIR_MOCK_H
19#define SENSORAIA_LWIR_MOCK_H
20/** @file lwir_mock.h
21 * @brief Optional development replay adapter, independent of geographic analysis.
22 * @details Built only with LWIR_ENABLE_MOCK. Turns an ordinary JPEG into LWIR
23 * evidence for tests and demos: an existing temperature layer is preserved,
24 * otherwise temperatures are synthesized from luminance and tagged LWIRSIM1.
25 */
26#include <stdbool.h>
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31/** @brief Preserve embedded temperatures or attach explicitly synthetic evidence.
32 * @param input_path Regular source JPEG.
33 * @param output_path Destination; existing unrelated files are never overwritten.
34 * @param layer_only Attach evidence without recompressing display pixels.
35 * @return Zero on success, otherwise -1.
36 * @details Serial worker adapter. Synthesized temperatures cannot represent a
37 * physical measurement and never inherit live device-state provenance.
38 * The result is published atomically (link or same-inode rename) and the
39 * directory is fsynced; the source must stay unchanged during processing.
40 * @note With @p layer_only and a source that already holds a temperature layer,
41 * nothing is written and 0 is returned, even when @p output_path differs.
42 * @warning Uses one static workspace; not reentrant or thread-safe.
43 */
44int lwir_process_mock(const char *input_path, const char *output_path, bool layer_only);
45
46#ifdef __cplusplus
47}
48#endif
49#endif
int lwir_process_mock(const char *input_path, const char *output_path, bool layer_only)
Preserve embedded temperatures or attach explicitly synthetic evidence.
Definition lwir_mock.c:208