Loading...
Searching...
No Matches
camera_control.h
Go to the documentation of this file.
102bool usher_control_encode_request(uint8_t *bytes, size_t size, const struct usher_control_request *request);
109bool usher_control_decode_request(const uint8_t *bytes, size_t size, struct usher_control_request *request);
116bool usher_control_encode_result(uint8_t *bytes, size_t size, const struct usher_control_result *result);
123bool usher_control_decode_result(const uint8_t *bytes, size_t size, struct usher_control_result *result);
142bool usher_control_client_hello(struct usher_control_client *client, const uint8_t *bytes, size_t size, uint32_t now_us);
164bool usher_control_client_prepare(struct usher_control_client *client, uint8_t mask, uint8_t command,
171void usher_control_client_commit(struct usher_control_client *client, const struct usher_control_request *request,
180bool usher_control_client_receive(struct usher_control_client *client, const uint8_t *bytes, size_t size,
195uint8_t usher_control_client_camera_result(const struct usher_control_client *client, uint32_t ticket, uint8_t camera_id);
bool usher_control_client_hello(struct usher_control_client *client, const uint8_t *bytes, size_t size, uint32_t now_us)
Accept only a HELLO matching the current nonce-bound negotiation.
Definition camera_control.c:115
bool usher_control_encode_request(uint8_t *bytes, size_t size, const struct usher_control_request *request)
Encode one command payload with the fixed wire size and field order.
Definition camera_control.c:48
uint8_t usher_control_client_result(const struct usher_control_client *client, uint32_t ticket)
Aggregate per-camera results for one group ticket.
Definition camera_control.c:203
bool usher_control_client_ready(const struct usher_control_client *client, uint32_t now_us)
Check confirmed-session readiness and the bounded HELLO lease.
Definition camera_control.c:133
bool usher_control_encode_result(uint8_t *bytes, size_t size, const struct usher_control_result *result)
Encode one camera's correlated control result.
Definition camera_control.c:71
bool usher_control_decode_result(const uint8_t *bytes, size_t size, struct usher_control_result *result)
Validate and decode one camera result payload.
Definition camera_control.c:88
void usher_control_client_reset(struct usher_control_client *client, uint32_t nonce)
Reset session state and invalidate outstanding tickets without replay.
Definition camera_control.c:101
uint8_t usher_control_client_camera_result(const struct usher_control_client *client, uint32_t ticket, uint8_t camera_id)
Read one camera's status for a group request.
Definition camera_control.c:196
void usher_control_client_expire(struct usher_control_client *client, uint32_t now_us)
Mark expired pending commands UNKNOWN; never resubmit them.
Definition camera_control.c:138
bool usher_control_put_u32(uint8_t *bytes, size_t size, size_t offset, uint32_t value)
Encode a 32-bit value as four little-endian protocol bytes.
Definition camera_control.c:27
bool usher_control_get_u32(const uint8_t *bytes, size_t size, size_t offset, uint32_t *value)
Decode a bounded four-byte little-endian protocol value.
Definition camera_control.c:34
bool usher_control_value_valid(uint8_t command, uint8_t value)
Validate the command-specific legal value range.
Definition camera_control.c:42
void usher_control_client_commit(struct usher_control_client *client, const struct usher_control_request *request, uint32_t now_us)
Commit a prepared request after full-frame UART admission.
Definition camera_control.c:160
bool usher_control_client_prepare(struct usher_control_client *client, uint8_t mask, uint8_t command, uint8_t value, uint32_t now_us, struct usher_control_request *request)
Prepare a request without consuming its ticket before UART admission.
Definition camera_control.c:147
bool usher_control_client_receive(struct usher_control_client *client, const uint8_t *bytes, size_t size, uint32_t now_us)
Accept a result only when session, ticket, camera, and evidence correlate.
Definition camera_control.c:173
bool usher_control_decode_request(const uint8_t *bytes, size_t size, struct usher_control_request *request)
Validate and decode one fixed-size command payload.
Definition camera_control.c:61
Handshake, capability cache, and eight-camera ticket state.
Definition camera_control.h:64
One addressed command request shared with the companion protocol.
Definition camera_control.h:36
uint32_t session
Nonzero negotiated companion session and request ticket.
Definition camera_control.h:38
uint8_t camera_mask
Camera selection mask, command identifier, and command value.
Definition camera_control.h:40
Result evidence for one camera selected by a request mask.
Definition camera_control.h:44
uint8_t camera_id
One-based camera ID, terminal status, observed value, and evidence.
Definition camera_control.h:48
struct usher_control_request request
Correlated request identity; never substitute a shot number here.
Definition camera_control.h:46
Fixed pending/result slot retained for one addressable camera.
Definition camera_control.h:52
uint8_t camera_mask
Original command plus returned observation/status/evidence.
Definition camera_control.h:56
uint32_t request_id
Request ticket and monotonic send timestamp in microseconds.
Definition camera_control.h:54
Shared FC/MORA byte-stream UART framing, messages and payload layouts.