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


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_image Readable 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
-
source Unused 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] filename Output path buffer; use only after a successful capture. filename_size Capacity including the terminator. shot Trigger containing the photo number, position, attitude and AGL. identity Simulated camera prefix and raster dimensions. cache_directory Map tile cache root. horizontal_fov_deg Horizontal field of view in degrees. vertical_fov_deg Vertical 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
-
filename Destination path buffer. filename_size Destination capacity. image_number Shot sequence. identity Backend-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_image Optional 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.