ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_c6link_mdl_msg.h
Go to the documentation of this file.
1
14#pragma once
15
16#include <stddef.h>
17#include <stdint.h>
18
19#include "ra8_err.h"
20#include "ra8_mdl_http.h"
21#include "ra8_mdl_protocol.h"
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
52 uint32_t operation,
53 const uint8_t* request,
54 size_t request_len,
55 uint8_t* response,
56 size_t response_cap,
57 size_t* response_len);
58
70 ra8_err_t (*begin)(void* ctx, const ra8_mdl_request_t* request);
72 ra8_err_t (*read)(void* ctx,
73 uint8_t* out,
74 uint16_t cap,
75 uint16_t* got,
76 uint64_t* total_bytes,
77 bool* complete,
78 uint8_t sha256[k_ra8_mdl_sha256_bytes],
79 ra8_mdl_http_response_t* response);
80 ra8_err_t (*cancel)(void* ctx);
81 void* ctx;
83
96
123
144
161 const ra8_mdl_service_backend_t* backend);
162
188[[nodiscard]] ra8_err_t ra8_mdl_service_dispatch(void* ctx,
189 uint32_t operation,
190 const uint8_t* request,
191 size_t request_len,
192 uint8_t* response,
193 size_t response_cap,
194 size_t* response_len);
195
196#ifdef __cplusplus
197}
198#endif
mdl_format_t
Artifact format selected by a media-download composition root.
Definition mdl_format.h:35
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Definition ra8_err.h:546
Wire-neutral media HTTP request and response records.
Allocation-free constants shared by the RA8 and C6 media endpoints.
@ k_ra8_mdl_user_agent_max
Maximum User-Agent size, including NUL.
@ k_ra8_mdl_referer_max
Maximum Referer size, including NUL.
@ k_ra8_mdl_url_max
Maximum URL buffer size, including NUL.
@ k_ra8_mdl_http_date_max
Maximum HTTP-date size, including NUL.
@ k_ra8_mdl_etag_max
Maximum ETag size, including NUL.
@ k_ra8_mdl_sha256_bytes
SHA-256 digest size in bytes.
Linear allocator storage the generated decoder draws one dispatch from.
uint8_t bytes[k_ra8_mdl_decode_arena_bytes]
Fixed protobuf decode storage.
size_t used
Bytes already allocated.
HTTP status and selected response headers proven by the C6 backend.
Complete typed HTTPS request accepted by protocol version 3.
Bounded typed-artifact source seam implemented by the C6 port.
ra8_err_t(* begin)(void *ctx, const ra8_mdl_request_t *request)
Validate and begin one bounded typed HTTPS request.
ra8_err_t(* read)(void *ctx, uint8_t *out, uint16_t cap, uint16_t *got, uint64_t *total_bytes, bool *complete, uint8_t sha256[k_ra8_mdl_sha256_bytes], ra8_mdl_http_response_t *response)
Pull bytes or terminal metadata.
void * ctx
Backend callback context.
ra8_err_t(* cancel)(void *ctx)
Cancel and release the active backend job.
Caller-owned one-job portable service state.
uint32_t next_sequence
Sequence required from the next pull.
uint32_t active_job_id
Correlation id of the current job.
bool active
Whether Next or Cancel is currently valid.
uint64_t next_offset
Byte offset required from the next pull.
ra8_mdl_service_backend_t backend
Injected typed-artifact source mechanism.
ra8_mdl_decode_arena_t arena
Decode storage for the running dispatch.
uint32_t next_job_id
Monotonic id candidate for the next Start.
mdl_format_t active_format
Artifact identity of the active job.