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
inference_worker.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/** @file inference_worker.h
19 * @brief Warm saved-picture processing without acquiring a camera or interpreting CAM results. */
20#ifndef SENSORAIA_INFERENCE_WORKER_H
21#define SENSORAIA_INFERENCE_WORKER_H
22
23#include "inference_jpeg.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29/** @brief Borrowed module callbacks; the worker serializes calls and retains no per-request pixel pointers.
30 * @details Writers own partial-result cleanup; false must not leave a successful-looking record.
31 * Private-image mutation is allowed only when the producer explicitly owns publication. */
33 const char *application, *module, *adapter;
35 void *context;
36 bool (*write)(void *context, const struct inference_context *model,
37 const char *image, uint32_t sequence, char *error, size_t capacity);
38 bool (*validate)(void *context, const struct inference_context *model, char *error, size_t capacity);
39 const char *result_suffix;
40};
41
42/** @brief Dispatch one-shot analysis, model checks or the persistent ANALYZE protocol.
43 * @param argc Argument count including the executable.
44 * @param argv Borrowed command-line tokens; diagnostics use stderr, protocol replies stdout.
45 * @param processor Module contract whose callback/context lifetimes cover this call.
46 * @return Minus one when this mode was not selected, zero on success, one on failure, two on misuse.
47 * @note Request numbers increase within a server lifetime to prevent stale reply association. */
48int inference_worker_cli(int argc, char **argv, const struct inference_image_processor *processor);
49
50#ifdef __cplusplus
51}
52#endif
53#endif
bool(* ini_field_handler)(void *context, const char *key, const char *value)
Definition bounded_ini.h:35
static unsigned capacity[COVERAGE_CAMERAS]
Bounded JPEG-to-tensor preparation without running the graph or modifying the input file.
int inference_worker_cli(int argc, char **argv, const struct inference_image_processor *processor)
Dispatch one-shot analysis, model checks or the persistent ANALYZE protocol.
struct jpeg_error_mgr error
Definition lwir_image.c:60
Independent, noncopyable model owner; mapped tensor buffers and session are reused between jobs.
Borrowed module callbacks; the worker serializes calls and retains no per-request pixel pointers.
bool(* validate)(void *context, const struct inference_context *model, char *error, size_t capacity)
bool(* write)(void *context, const struct inference_context *model, const char *image, uint32_t sequence, char *error, size_t capacity)
struct captured_image image
Definition usher.c:371