Loading...
Searching...
No Matches
ear_cam_pipe.h
Go to the documentation of this file.
39 * @details Never invoked by the audio reader or finalizer; shared navigation state stays owner-local.
51 * @return True for a complete bounded copy; false while supervision is active or input is invalid. */
61 * @param session_id Token retained in audit rows; backend admission validates it before this call.
68 * @param session_id Token identifying the completed snapshot, not necessarily the current session.
70 * @details Only the log worker accesses its FILE. A dropped audit row is not a lost point completion.
85 * @return Core solver status: 0 for an estimate, -1 for invalid/insufficient evidence or arguments.
86 * @details Worker-safe; shared core workspace serializes concurrent solves. No ownership transfer.
88int ear_cam_pipe_snapshot_solve(const struct ear_session_snapshot *snapshot, struct ear_loudest_spot *result);
107int ear_cam_pipe_snapshot_render(const struct ear_session_snapshot *snapshot, uint32_t session_id,
137 * @return True after the live handshake or simulated initialization; false after teardown/lost readiness.
178 * @return Core solver status: 0 for an estimate, -1 for insufficient evidence or invalid arguments.
190 * @return Core solver status: 0 for an estimate, -1 for insufficient evidence or invalid arguments.
207int ear_cam_pipe_render(const struct ear_loudest_spot *result, char *filename, size_t filename_size,
Sensor observation times, aligned poses, and optional frame-arrival evidence.
bool ear_cam_pipe_set_settings(const char *settings)
Copy an assignment path before the microphone supervisor starts.
Definition ear_cam_pipe.c:165
bool ear_cam_pipe_set_device(const char *device)
Copy a startup ALSA PCM name into bounded adapter-owned storage.
Definition ear_cam_pipe.c:224
int ear_cam_pipe_snapshot_solve(const struct ear_session_snapshot *snapshot, struct ear_loudest_spot *result)
Solve immutable detached evidence without touching current-session state.
Definition ear_cam_pipe.c:1095
bool ear_cam_pipe_ready(void)
Report readiness of the configured live or simulated measurement source.
Definition ear_cam_pipe.c:925
int ear_cam_pipe_init(const char *unused)
Start EARcam sampling or its deterministic simulated-source replacement.
Definition ear_cam_pipe.c:871
int ear_cam_pipe_snapshot_render(const struct ear_session_snapshot *snapshot, uint32_t session_id, const struct ear_loudest_spot *result, char *filename, size_t filename_size, bool simulated)
Render detached evidence using collision-safe session-tagged JPEG/CSV names.
Definition ear_cam_pipe.c:1221
int32_t ear_cam_pipe_snapshot_number(const struct ear_session_snapshot *snapshot)
Read the last request number from immutable evidence.
Definition ear_cam_pipe.c:1102
void ear_cam_pipe_set_pose_lookup(bool(*lookup)(struct capture_observation *, uint64_t))
Set the startup-only pose callback, later called without waiting on the serial owner.
Definition ear_cam_pipe.c:219
void ear_cam_pipe_log_result(uint32_t session_id, const struct ear_loudest_spot *result)
Best-effort enqueue of a correlated result row on the serial owner.
Definition ear_cam_pipe.c:1247
int ear_cam_pipe_finish(struct ear_loudest_spot *result)
Fuse the session into its final loudest-spot result and clear stored samples.
Definition ear_cam_pipe.c:1259
void ear_cam_pipe_deinit(void)
Stop EARcam activity and release its process and descriptors.
Definition ear_cam_pipe.c:909
struct ear_session_snapshot * ear_cam_pipe_detach_session(void)
Transfer active storage to an immutable worker snapshot without copying samples.
Definition ear_cam_pipe.c:1078
bool ear_cam_pipe_begin_session(uint32_t session_id)
Begin/reset active collection without solving or waiting for log I/O.
Definition ear_cam_pipe.c:1054
int ear_cam_pipe_solve(struct ear_loudest_spot *result)
Solve the accumulated session without clearing it.
Definition ear_cam_pipe.c:1231
int ear_cam_pipe_render(const struct ear_loudest_spot *result, char *filename, size_t filename_size, bool simulated)
Render the current session as a north-up acoustic evidence JPEG.
Definition ear_cam_pipe.c:1214
void ear_cam_pipe_update_pose(void)
Retry bounded pending audio windows when the serial owner receives new poses.
Definition ear_cam_pipe.c:1012
int ear_cam_pipe_record(const union dc_shot_union *shot)
Associate the newest sound window with one flight-controller shot pose.
Definition ear_cam_pipe.c:1018
void ear_cam_pipe_set_band(double low_cut_hz, double high_cut_hz)
Set the live EARcam tone-search band.
Definition ear_cam_pipe.c:254
void ear_cam_pipe_snapshot_release(struct ear_session_snapshot *snapshot)
Return detached storage to admission after all snapshot access has ended.
Definition ear_cam_pipe.c:1107
int32_t ear_cam_pipe_last_shot_nr(void)
Get the shot number associated with the newest stored acoustic sample.
Definition ear_cam_pipe.c:1049
void ear_cam_pipe_set_simulated_source(double lat_deg, double lon_deg, double level_db_at_1m)
Replace microphone input with a virtual fixed loudspeaker for NPS or desk tests.
Definition ear_cam_pipe.c:241
Sensor-independent acoustic samples and ground-source estimates.
Definition capture_timing.h:41
Estimated ground source, not a surveyed target or guaranteed alarm detection.
Definition earcam_core.h:37
Statically reserved sample buffer with a single active or detached owner.
Definition ear_cam_pipe.c:187
Definition usher_protocol.h:51
Shared FC/MORA byte-stream UART framing, messages and payload layouts.