Parent-side protocol for USHER's persistent Tiny1-C LWIR capture server. More...


Go to the source code of this file.
Functions | |
| void | lwir_cam_pipe_configure (const struct camera_backend_host *host) |
| Bind the owner's long-lived shutdown flag before starting workers. | |
| int | lwir_cam_pipe_init (const char *unused) |
| Start and qualify the persistent LWIR capture server. | |
| int | lwir_cam_pipe_init_cancelable (const char *unused, const volatile sig_atomic_t *keep_running) |
| Start the server but abort promptly when USHER begins shutdown. | |
| void | lwir_cam_pipe_set_photo_directory (const char *directory) |
| Override the output directory for an isolated standalone benchmark. | |
| int | lwir_cam_pipe_warmup (void) |
| Open, stabilize, and close the sensor without writing an image. | |
| void | lwir_cam_pipe_set_native_raw (int enabled) |
| Select whether successful captures keep an explicit .raw companion. | |
| int | lwir_cam_pipe_set_config (const char *path) |
| Apply a bounded worker configuration before starting the capture server. | |
| int | lwir_cam_pipe_set_calibration (const char *path) |
| Set the optional calibration file used by server-side geolocation. | |
| int | lwir_cam_pipe_process_mock (char *filename) |
| Process a mock thermal image for hardware-free local testing. | |
| int | lwir_cam_pipe_geolocate (char *filename) |
| Add thermal hotspot/geolocation metadata through the running server. | |
| double | lwir_cam_pipe_capture_delay (void) |
| Return the delay of the last successful capture request in seconds. | |
| struct capture_timing | lwir_cam_pipe_capture_timing (void) |
| Return detailed callback or polling timing evidence for the last capture. | |
| int | lwir_cam_pipe_shoot (char *filename, size_t filename_size, int image_number) |
| Request one thermal JPEG from an initialized capture server. | |
| void | lwir_cam_pipe_deinit (void) |
| Stop, reap, and forget the persistent LWIR capture server. | |
Detailed Description
Parent-side protocol for USHER's persistent Tiny1-C LWIR capture server.
USHER uses this interface to keep the thermal stream warmed between shots. A line protocol carries capture and geolocation requests; the implementation handles bounded server lifecycle, response validation, and capture timing evidence. USHER's recovery worker owns retry policy.
Definition in file lwir_cam_pipe.h.
Function Documentation
◆ lwir_cam_pipe_capture_delay()
| double lwir_cam_pipe_capture_delay | ( | void | ) |
Return the delay of the last successful capture request in seconds.
- Returns
- Nonnegative delay, or a negative value when no timing is available.
Definition at line 242 of file lwir_cam_pipe.c.
◆ lwir_cam_pipe_capture_timing()
| struct capture_timing lwir_cam_pipe_capture_timing | ( | void | ) |
Return detailed callback or polling timing evidence for the last capture.
- Returns
- Timing structure; use capture_timing_valid() before consuming it.
Definition at line 202 of file lwir_cam_pipe.c.
◆ lwir_cam_pipe_configure()
| void lwir_cam_pipe_configure | ( | const struct camera_backend_host * | host | ) |
Bind the owner's long-lived shutdown flag before starting workers.
- Parameters
-
host Only its running flag is retained; NULL clears the binding.
Definition at line 90 of file lwir_cam_pipe.c.
◆ lwir_cam_pipe_deinit()
| void lwir_cam_pipe_deinit | ( | void | ) |
Stop, reap, and forget the persistent LWIR capture server.
Definition at line 707 of file lwir_cam_pipe.c.
◆ lwir_cam_pipe_geolocate()
| int lwir_cam_pipe_geolocate | ( | char * | filename | ) |
Add thermal hotspot/geolocation metadata through the running server.
- Parameters
-
[in] filename JPEG to update.
- Returns
- 0 on success or -1 if the operation cannot be completed.
Definition at line 623 of file lwir_cam_pipe.c.
◆ lwir_cam_pipe_init()
| int lwir_cam_pipe_init | ( | const char * | unused | ) |
Start and qualify the persistent LWIR capture server.
- Parameters
-
unused Reserved common backend argument.
- Returns
- 0 after the server reports ready, otherwise -1.
Definition at line 520 of file lwir_cam_pipe.c.
◆ lwir_cam_pipe_init_cancelable()
| int lwir_cam_pipe_init_cancelable | ( | const char * | unused, |
| const volatile sig_atomic_t * | keep_running ) |
Start the server but abort promptly when USHER begins shutdown.
- Parameters
-
unused Reserved common backend argument. keep_running Signal-safe flag that remains nonzero while startup may continue.
- Returns
- 0 after the server reports ready, otherwise -1 after cleanup.
Definition at line 525 of file lwir_cam_pipe.c.
◆ lwir_cam_pipe_process_mock()
| int lwir_cam_pipe_process_mock | ( | char * | filename | ) |
Process a mock thermal image for hardware-free local testing.
- Parameters
-
[in,out] filename Input/output image path.
- Returns
- 0 on success or -1 on processing failure.
Definition at line 612 of file lwir_cam_pipe.c.
◆ lwir_cam_pipe_set_calibration()
| int lwir_cam_pipe_set_calibration | ( | const char * | path | ) |
Set the optional calibration file used by server-side geolocation.
- Parameters
-
path Nonempty calibration YAML path.
- Returns
- 0 on acceptance or -1 for an invalid path.
Definition at line 194 of file lwir_cam_pipe.c.
◆ lwir_cam_pipe_set_config()
| int lwir_cam_pipe_set_config | ( | const char * | path | ) |
Apply a bounded worker configuration before starting the capture server.
- Parameters
-
[in] path Configuration file path.
- Returns
- 0 when accepted, otherwise -1; live reconfiguration is not implied.
Definition at line 95 of file lwir_cam_pipe.c.
◆ lwir_cam_pipe_set_native_raw()
| void lwir_cam_pipe_set_native_raw | ( | int | enabled | ) |
Select whether successful captures keep an explicit .raw companion.
- Parameters
-
enabled Nonzero to request native raw output.
Definition at line 189 of file lwir_cam_pipe.c.
◆ lwir_cam_pipe_set_photo_directory()
| void lwir_cam_pipe_set_photo_directory | ( | const char * | directory | ) |
Override the output directory for an isolated standalone benchmark.
Definition at line 184 of file lwir_cam_pipe.c.
◆ lwir_cam_pipe_shoot()
| int lwir_cam_pipe_shoot | ( | char * | filename, |
| size_t | filename_size, | ||
| int | image_number ) |
Request one thermal JPEG from an initialized capture server.
- Parameters
-
filename Output path buffer, cleared on failure. filename_size Output path capacity. image_number USHER shot sequence.
- Returns
- 0 only for a verified nonempty output image, otherwise -1; USHER owns retry policy.
Definition at line 653 of file lwir_cam_pipe.c.
◆ lwir_cam_pipe_warmup()
| int lwir_cam_pipe_warmup | ( | void | ) |
Open, stabilize, and close the sensor without writing an image.
- Returns
- 0 after a stable warmup frame, otherwise -1.
Open the sensor once, wait past its power-on "wiggly" image, then close it again. Runs regardless of whether LWIR ends up selected for a shot, so a later real open (persistent server or standalone capture) never has to absorb that transient inline. Failure here is not fatal to USHER.
Definition at line 531 of file lwir_cam_pipe.c.