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
local_pipe.h File Reference

Local mock-camera backend API for simulator and desk testing. More...

#include <stddef.h>
#include "camera_backend.h"
Include dependency graph for local_pipe.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int local_pipe_init (const char *mock_image)
 Initialize a deterministic mock image source for local camera simulation.
int local_pipe_test_init (const char *mock_image)
 Initialize test mode with a supplied JPEG or a random fixture beside USHER.
int local_pipe_shoot (char *filename, size_t filename_size, int image_number, const struct camera_backend *identity)
 Create a mock capture file for a shot.
int local_pipe_map_init (const char *source)
 Prepare output storage for map-backed simulation.
int local_pipe_map_shoot (char *filename, size_t filename_size, const union dc_shot_union *shot, const struct camera_backend *identity, const char *cache_directory, double horizontal_fov_deg, double vertical_fov_deg)
 Render a map-backed capture using the trigger's camera geometry.
void local_pipe_deinit (void)
 Forget selected local fixture sources.

Detailed Description

Local mock-camera backend API for simulator and desk testing.

Definition in file local_pipe.h.

Function Documentation

◆ local_pipe_deinit()

void local_pipe_deinit ( void )

Forget selected local fixture sources.

No subprocess is owned and previously captured files are retained.

Definition at line 295 of file local_pipe.c.

◆ local_pipe_init()

int local_pipe_init ( const char * mock_image)

Initialize a deterministic mock image source for local camera simulation.

Parameters
mock_imageReadable JPEG copied for each shot.
Returns
0 on readiness or -1 on missing source/output storage.

Copy the path into the backend so the caller need not retain it.

Definition at line 64 of file local_pipe.c.

◆ local_pipe_map_init()

int local_pipe_map_init ( const char * source)

Prepare output storage for map-backed simulation.

Parameters
sourceUnused compatibility argument.
Returns
Zero on readiness, or -1 on path or storage failure.

Tile availability is checked per capture because the set of required tiles depends on the shot position and attitude.

Definition at line 171 of file local_pipe.c.

◆ local_pipe_map_shoot()

int local_pipe_map_shoot ( char * filename,
size_t filename_size,
const union dc_shot_union * shot,
const struct camera_backend * identity,
const char * cache_directory,
double horizontal_fov_deg,
double vertical_fov_deg )

Render a map-backed capture using the trigger's camera geometry.

Parameters
[out]filenameOutput path buffer; use only after a successful capture.
filename_sizeCapacity including the terminator.
shotTrigger containing the photo number, position, attitude and AGL.
identitySimulated camera prefix and raster dimensions.
cache_directoryMap tile cache root.
horizontal_fov_degHorizontal field of view in degrees.
vertical_fov_degVertical field of view in degrees.
Returns
Zero on publication, or -1 on invalid input, rendering or storage failure.

Construct a simulation filename for this camera and pass its geometry to the cached-tile renderer; this path does not use a fixture JPEG.

Definition at line 179 of file local_pipe.c.

◆ local_pipe_shoot()

int local_pipe_shoot ( char * filename,
size_t filename_size,
int image_number,
const struct camera_backend * identity )

Create a mock capture file for a shot.

Parameters
filenameDestination path buffer.
filename_sizeDestination capacity.
image_numberShot sequence.
identityBackend-owned filename prefix and simulation namespace.
Returns
0 after a complete stable regular-file copy, otherwise -1.

Existing destinations are never overwritten; failed copies remove only their new output.

Definition at line 193 of file local_pipe.c.

◆ local_pipe_test_init()

int local_pipe_test_init ( const char * mock_image)

Initialize test mode with a supplied JPEG or a random fixture beside USHER.

Parameters
mock_imageOptional explicit JPEG; NULL enables testphotos discovery.
Returns
0 on readiness or -1 on configuration failure.

If discovery finds no eligible fixture, use the bundled mock JPEG.

Definition at line 87 of file local_pipe.c.