ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_mdl_protocol.h File Reference

Allocation-free constants shared by the RA8 and C6 media endpoints. More...

#include <stdint.h>
Include dependency graph for ra8_mdl_protocol.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  ra8_mdl_dimension_t : uint16_t {
  k_ra8_mdl_url_max = 512U ,
  k_ra8_mdl_user_agent_max = 256U ,
  k_ra8_mdl_referer_max = 512U ,
  k_ra8_mdl_etag_max = 128U ,
  k_ra8_mdl_http_date_max = 64U ,
  k_ra8_mdl_retry_after_max = 64U ,
  k_ra8_mdl_content_type_max = 128U ,
  k_ra8_mdl_chunk_data_max = 1024U ,
  k_ra8_mdl_sha256_bytes = 32U ,
  k_ra8_mdl_timeout_ms_max = 60000U
}
 Bounded dimensions shared by both protocol endpoints. More...
enum  ra8_mdl_request_bound_t : uint16_t { k_ra8_mdl_request_bytes_max }
 Largest packed inner request either endpoint has to hold. More...
enum  ra8_mdl_http_status_bound_t : uint16_t {
  k_ra8_mdl_http_status_min = 100U ,
  k_ra8_mdl_http_status_max = 599U
}
 Inclusive bounds of the HTTP status codes the protocol admits. More...
enum  ra8_mdl_protocol_version_t : uint32_t { k_ra8_mdl_protocol_version = 3U }
 Version included in every media RPC request and response. More...
enum  ra8_mdl_rpc_id_t : uint32_t {
  k_ra8_mdl_rpc_start = 0x4D440301U ,
  k_ra8_mdl_rpc_next = 0x4D440302U ,
  k_ra8_mdl_rpc_cancel = 0x4D440303U
}
 Stable CustomRpc operation IDs (MD + version + operation). More...
enum  ra8_mdl_state_t : uint8_t {
  k_ra8_mdl_state_accepted = 1U ,
  k_ra8_mdl_state_downloading = 2U ,
  k_ra8_mdl_state_complete = 3U ,
  k_ra8_mdl_state_cancelled = 4U ,
  k_ra8_mdl_state_failed = 5U
}
 Remote job state. More...

Detailed Description

Allocation-free constants shared by the RA8 and C6 media endpoints.

Tag
[Ring 4 / PAL] {World: NS}

Defines bounded HTTPS-body transfer semantics plus the selected artifact identity and downloader request/response policy. Version 3 carries the conditional request fields and response metadata required by portable mdl_fetch instead of fabricating an HTTP status on the RA8. The C6 never receives a destination path; the RA8 still validates and transactionally publishes the returned bytes.

Definition in file ra8_mdl_protocol.h.

Enumeration Type Documentation

◆ ra8_mdl_dimension_t

enum ra8_mdl_dimension_t : uint16_t

Bounded dimensions shared by both protocol endpoints.

Enumerator
k_ra8_mdl_url_max 

Maximum URL buffer size, including NUL.

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_etag_max 

Maximum ETag size, including NUL.

k_ra8_mdl_http_date_max 

Maximum HTTP-date size, including NUL.

k_ra8_mdl_retry_after_max 

Maximum Retry-After size, including NUL.

k_ra8_mdl_content_type_max 

Maximum Content-Type size, including NUL.

k_ra8_mdl_chunk_data_max 

Maximum raw body bytes in one chunk.

k_ra8_mdl_sha256_bytes 

SHA-256 digest size in bytes.

k_ra8_mdl_timeout_ms_max 

Maximum caller-selected HTTP timeout in ms.

Definition at line 22 of file ra8_mdl_protocol.h.

◆ ra8_mdl_http_status_bound_t

enum ra8_mdl_http_status_bound_t : uint16_t

Inclusive bounds of the HTTP status codes the protocol admits.

RFC 9110 assigns status codes the three-digit range 100..599, so a response outside it is malformed rather than merely unsuccessful. Both endpoints reject such a response instead of forwarding it.

Invariant
k_ra8_mdl_http_status_min <= k_ra8_mdl_http_status_max.
See also
ra8_mdl_http_response_t
Since
0.1.0
Enumerator
k_ra8_mdl_http_status_min 

Lowest well-formed HTTP status code.

k_ra8_mdl_http_status_max 

Highest well-formed HTTP status code.

Definition at line 59 of file ra8_mdl_protocol.h.

◆ ra8_mdl_protocol_version_t

enum ra8_mdl_protocol_version_t : uint32_t

Version included in every media RPC request and response.

Enumerator
k_ra8_mdl_protocol_version 

Typed HTTP-artifact transfer protocol.

Definition at line 65 of file ra8_mdl_protocol.h.

◆ ra8_mdl_request_bound_t

enum ra8_mdl_request_bound_t : uint16_t

Largest packed inner request either endpoint has to hold.

A Start request carries the bounded URL and every bounded HTTP header; the constant adds the generated encoder's per-field tag and varint overhead on top. Next and Cancel are far smaller and share the buffer.

Invariant
No legal packed inner request exceeds this bound.
See also
ra8_c6link_mdl_start_request
Since
0.1.0
Enumerator
k_ra8_mdl_request_bytes_max 

Maximum packed request bytes.

Definition at line 44 of file ra8_mdl_protocol.h.

◆ ra8_mdl_rpc_id_t

enum ra8_mdl_rpc_id_t : uint32_t

Stable CustomRpc operation IDs (MD + version + operation).

Enumerator
k_ra8_mdl_rpc_start 

Start one typed-artifact job.

k_ra8_mdl_rpc_next 

Pull one ordered bounded chunk.

k_ra8_mdl_rpc_cancel 

Cancel one active job.

Definition at line 70 of file ra8_mdl_protocol.h.

◆ ra8_mdl_state_t

enum ra8_mdl_state_t : uint8_t

Remote job state.

Enumerator
k_ra8_mdl_state_accepted 

Job was accepted but has no body bytes yet.

k_ra8_mdl_state_downloading 

Response carries non-empty ordered bytes.

k_ra8_mdl_state_complete 

Response carries terminal size and digest.

k_ra8_mdl_state_cancelled 

Job ended through explicit cancellation.

k_ra8_mdl_state_failed 

Job ended with a canonical error status.

Definition at line 77 of file ra8_mdl_protocol.h.