refactor: move firmware workspace under firmware
This commit is contained in:
1 parent
153b0bf262
commit
f03fc119a4
222 files changed
+56
-13
No files matched your search
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0"?>
|
||||
<mavlink>
|
||||
<!-- The root is the only bindgen input. Feature domains remain independent
|
||||
fragments so their message catalogs can evolve without a monolith. -->
|
||||
<include>kaptan/config.xml</include>
|
||||
<include>kaptan/log.xml</include>
|
||||
<include>kaptan/error.xml</include>
|
||||
<include>kaptan/shutdown.xml</include>
|
||||
</mavlink>
|
||||
@@ -0,0 +1,270 @@
|
||||
<?xml version="1.0"?>
|
||||
<mavlink>
|
||||
<version>3</version>
|
||||
<dialect>0</dialect>
|
||||
<!-- Kaptan configuration dialect. Register the development IDs before release. 42000
|
||||
belongs to Icarous and is deliberately not used here. -->
|
||||
<enums>
|
||||
<enum name="KAPTAN_CONFIG_VALUE_KIND">
|
||||
<entry value="1" name="KAPTAN_CONFIG_VALUE_KIND_BOOL"/>
|
||||
<entry value="2" name="KAPTAN_CONFIG_VALUE_KIND_I32"/>
|
||||
<entry value="3" name="KAPTAN_CONFIG_VALUE_KIND_U32"/>
|
||||
<entry value="4" name="KAPTAN_CONFIG_VALUE_KIND_U64"/>
|
||||
<entry value="5" name="KAPTAN_CONFIG_VALUE_KIND_F32"/>
|
||||
<entry value="6" name="KAPTAN_CONFIG_VALUE_KIND_F64"/>
|
||||
</enum>
|
||||
<enum name="KAPTAN_CONFIG_POLICY">
|
||||
<entry value="1" name="KAPTAN_CONFIG_POLICY_LIVE"/>
|
||||
<entry value="2" name="KAPTAN_CONFIG_POLICY_DISARMED_RESET"/>
|
||||
<entry value="3" name="KAPTAN_CONFIG_POLICY_RESTART_REQUIRED"/>
|
||||
</enum>
|
||||
<enum name="KAPTAN_CONFIG_STATE">
|
||||
<entry value="0" name="KAPTAN_CONFIG_STATE_ACTIVE"/>
|
||||
<entry value="1" name="KAPTAN_CONFIG_STATE_EDITING"/>
|
||||
<entry value="2" name="KAPTAN_CONFIG_STATE_RESTART_REQUIRED"/>
|
||||
</enum>
|
||||
<enum name="KAPTAN_CONFIG_VALUE_SOURCE">
|
||||
<entry value="0" name="KAPTAN_CONFIG_VALUE_SOURCE_ACTIVE"/>
|
||||
<entry value="1" name="KAPTAN_CONFIG_VALUE_SOURCE_COMMITTED"/>
|
||||
<entry value="2" name="KAPTAN_CONFIG_VALUE_SOURCE_TRANSACTION"/>
|
||||
</enum>
|
||||
<enum name="KAPTAN_CONFIG_OPERATION">
|
||||
<entry value="1" name="KAPTAN_CONFIG_OPERATION_QUERY"/>
|
||||
<entry value="2" name="KAPTAN_CONFIG_OPERATION_BEGIN"/>
|
||||
<entry value="3" name="KAPTAN_CONFIG_OPERATION_SET"/>
|
||||
<entry value="4" name="KAPTAN_CONFIG_OPERATION_VALIDATE"/>
|
||||
<entry value="5" name="KAPTAN_CONFIG_OPERATION_COMMIT"/>
|
||||
<entry value="6" name="KAPTAN_CONFIG_OPERATION_ABORT"/>
|
||||
<entry value="7" name="KAPTAN_CONFIG_OPERATION_IMPORT"/>
|
||||
</enum>
|
||||
<enum name="KAPTAN_CONFIG_RESULT">
|
||||
<entry value="0" name="KAPTAN_CONFIG_RESULT_ACCEPTED"/>
|
||||
<entry value="1" name="KAPTAN_CONFIG_RESULT_COMMITTED_RESTART_REQUIRED"/>
|
||||
<entry value="2" name="KAPTAN_CONFIG_RESULT_REJECTED"/>
|
||||
</enum>
|
||||
<enum name="KAPTAN_CONFIG_ERROR">
|
||||
<entry value="0" name="KAPTAN_CONFIG_ERROR_NONE"/>
|
||||
<entry value="1" name="KAPTAN_CONFIG_ERROR_BAD_TARGET"/>
|
||||
<entry value="2" name="KAPTAN_CONFIG_ERROR_AUTHORIZATION_DENIED"/>
|
||||
<entry value="3" name="KAPTAN_CONFIG_ERROR_GENERATION_CONFLICT"/>
|
||||
<entry value="4" name="KAPTAN_CONFIG_ERROR_SESSION_BUSY"/>
|
||||
<entry value="5" name="KAPTAN_CONFIG_ERROR_INVALID_SESSION"/>
|
||||
<entry value="6" name="KAPTAN_CONFIG_ERROR_STALE_REVISION"/>
|
||||
<entry value="7" name="KAPTAN_CONFIG_ERROR_BAD_STATE"/>
|
||||
<entry value="8" name="KAPTAN_CONFIG_ERROR_UNKNOWN_FIELD"/>
|
||||
<entry value="9" name="KAPTAN_CONFIG_ERROR_TYPE_MISMATCH"/>
|
||||
<entry value="10" name="KAPTAN_CONFIG_ERROR_NON_FINITE"/>
|
||||
<entry value="11" name="KAPTAN_CONFIG_ERROR_BELOW_MINIMUM"/>
|
||||
<entry value="12" name="KAPTAN_CONFIG_ERROR_ABOVE_MAXIMUM"/>
|
||||
<entry value="13" name="KAPTAN_CONFIG_ERROR_CROSS_FIELD"/>
|
||||
<entry value="14" name="KAPTAN_CONFIG_ERROR_UNSUPPORTED_CAPABILITY"/>
|
||||
<entry value="15" name="KAPTAN_CONFIG_ERROR_UNSUPPORTED_FORMAT"/>
|
||||
<entry value="16" name="KAPTAN_CONFIG_ERROR_STORAGE_FAILURE"/>
|
||||
<entry value="17" name="KAPTAN_CONFIG_ERROR_INTERNAL"/>
|
||||
<entry value="18" name="KAPTAN_CONFIG_ERROR_REQUEST_CONFLICT"/>
|
||||
<entry value="19" name="KAPTAN_CONFIG_ERROR_CBOR_MALFORMED"/>
|
||||
<entry value="20" name="KAPTAN_CONFIG_ERROR_CBOR_TOO_LARGE"/>
|
||||
<entry value="21" name="KAPTAN_CONFIG_ERROR_BLOB_CRC"/>
|
||||
<entry value="22" name="KAPTAN_CONFIG_ERROR_SCHEMA_MISMATCH"/>
|
||||
<entry value="23" name="KAPTAN_CONFIG_ERROR_IMPORT_UNAVAILABLE"/>
|
||||
</enum>
|
||||
</enums>
|
||||
<messages>
|
||||
<message id="51000" name="KAPTAN_CONFIG_INFO">
|
||||
<description>Correlated configuration protocol and active snapshot metadata.</description>
|
||||
<field type="uint64_t" name="active_generation"/>
|
||||
<field type="uint64_t" name="committed_generation"/>
|
||||
<field type="uint32_t" name="request_id"/>
|
||||
<field type="uint8_t[16]" name="schema_id"/>
|
||||
<field type="uint16_t" name="profile_format"/>
|
||||
<field type="uint16_t" name="field_count"/>
|
||||
<field type="uint8_t" name="protocol_major"/>
|
||||
<field type="uint8_t" name="protocol_minor"/>
|
||||
<field type="uint8_t" name="config_state" enum="KAPTAN_CONFIG_STATE"/>
|
||||
<field type="uint8_t" name="capability_flags"/>
|
||||
</message>
|
||||
<message id="51014" name="KAPTAN_CONFIG_INFO_REQUEST">
|
||||
<description>Requests correlated configuration protocol and schema metadata.</description>
|
||||
<field type="uint32_t" name="request_id"/>
|
||||
<field type="uint8_t" name="target_system"/>
|
||||
<field type="uint8_t" name="target_component"/>
|
||||
</message>
|
||||
<message id="51001" name="KAPTAN_CONFIG_DESCRIPTOR_REQUEST">
|
||||
<description>Requests a bounded page of field descriptors.</description>
|
||||
<field type="uint32_t" name="request_id"/>
|
||||
<field type="uint16_t" name="first"/>
|
||||
<field type="uint16_t" name="count"/>
|
||||
<field type="uint8_t" name="target_system"/>
|
||||
<field type="uint8_t" name="target_component"/>
|
||||
</message>
|
||||
<message id="51002" name="KAPTAN_CONFIG_DESCRIPTOR">
|
||||
<description>One self-describing editable scalar field.</description>
|
||||
<field type="uint64_t" name="minimum_bits"/>
|
||||
<field type="uint64_t" name="maximum_bits"/>
|
||||
<field type="uint64_t" name="default_bits"/>
|
||||
<field type="uint32_t" name="request_id"/>
|
||||
<field type="uint16_t" name="descriptor_index"/>
|
||||
<field type="uint16_t" name="field_id"/>
|
||||
<field type="char[48]" name="display_key"/>
|
||||
<field type="char[16]" name="unit"/>
|
||||
<field type="uint8_t" name="value_kind" enum="KAPTAN_CONFIG_VALUE_KIND"/>
|
||||
<field type="uint8_t" name="apply_policy" enum="KAPTAN_CONFIG_POLICY"/>
|
||||
<field type="uint8_t" name="flags"/>
|
||||
</message>
|
||||
<message id="51003" name="KAPTAN_CONFIG_VALUE_REQUEST">
|
||||
<description>Reads one active, committed, or transaction value.</description>
|
||||
<field type="uint32_t" name="request_id"/>
|
||||
<field type="uint32_t" name="session_id"/>
|
||||
<field type="uint16_t" name="field_id"/>
|
||||
<field type="uint8_t" name="source" enum="KAPTAN_CONFIG_VALUE_SOURCE"/>
|
||||
<field type="uint8_t" name="target_system"/>
|
||||
<field type="uint8_t" name="target_component"/>
|
||||
</message>
|
||||
<message id="51004" name="KAPTAN_CONFIG_VALUE">
|
||||
<description>One typed configuration scalar as canonical raw bits.</description>
|
||||
<field type="uint64_t" name="value_bits"/>
|
||||
<field type="uint32_t" name="request_id"/>
|
||||
<field type="uint32_t" name="session_id"/>
|
||||
<field type="uint32_t" name="revision"/>
|
||||
<field type="uint16_t" name="field_id"/>
|
||||
<field type="uint8_t" name="value_kind" enum="KAPTAN_CONFIG_VALUE_KIND"/>
|
||||
</message>
|
||||
<message id="51005" name="KAPTAN_CONFIG_BEGIN">
|
||||
<description>Opens the one lease-bound edit transaction.</description>
|
||||
<field type="uint64_t" name="expected_generation"/>
|
||||
<field type="uint32_t" name="request_id"/>
|
||||
<field type="uint8_t" name="target_system"/>
|
||||
<field type="uint8_t" name="target_component"/>
|
||||
</message>
|
||||
<message id="51006" name="KAPTAN_CONFIG_SET_F32">
|
||||
<description>Writes one f32 field in the open transaction.</description>
|
||||
<field type="float" name="value"/>
|
||||
<field type="uint32_t" name="request_id"/>
|
||||
<field type="uint32_t" name="session_id"/>
|
||||
<field type="uint32_t" name="expected_revision"/>
|
||||
<field type="uint16_t" name="field_id"/>
|
||||
<field type="uint8_t" name="target_system"/>
|
||||
<field type="uint8_t" name="target_component"/>
|
||||
</message>
|
||||
<message id="51007" name="KAPTAN_CONFIG_SET_I32">
|
||||
<description>Writes one i32 field in the open transaction.</description>
|
||||
<field type="int32_t" name="value"/>
|
||||
<field type="uint32_t" name="request_id"/>
|
||||
<field type="uint32_t" name="session_id"/>
|
||||
<field type="uint32_t" name="expected_revision"/>
|
||||
<field type="uint16_t" name="field_id"/>
|
||||
<field type="uint8_t" name="target_system"/>
|
||||
<field type="uint8_t" name="target_component"/>
|
||||
</message>
|
||||
<message id="51008" name="KAPTAN_CONFIG_SET_U32">
|
||||
<description>Writes one u32 field in the open transaction.</description>
|
||||
<field type="uint32_t" name="value"/>
|
||||
<field type="uint32_t" name="request_id"/>
|
||||
<field type="uint32_t" name="session_id"/>
|
||||
<field type="uint32_t" name="expected_revision"/>
|
||||
<field type="uint16_t" name="field_id"/>
|
||||
<field type="uint8_t" name="target_system"/>
|
||||
<field type="uint8_t" name="target_component"/>
|
||||
</message>
|
||||
<message id="51009" name="KAPTAN_CONFIG_SET_U64">
|
||||
<description>Writes one u64 field in the open transaction.</description>
|
||||
<field type="uint64_t" name="value"/>
|
||||
<field type="uint32_t" name="request_id"/>
|
||||
<field type="uint32_t" name="session_id"/>
|
||||
<field type="uint32_t" name="expected_revision"/>
|
||||
<field type="uint16_t" name="field_id"/>
|
||||
<field type="uint8_t" name="target_system"/>
|
||||
<field type="uint8_t" name="target_component"/>
|
||||
</message>
|
||||
<message id="51010" name="KAPTAN_CONFIG_VALIDATE">
|
||||
<description>Validates the complete open transaction.</description>
|
||||
<field type="uint32_t" name="request_id"/>
|
||||
<field type="uint32_t" name="session_id"/>
|
||||
<field type="uint32_t" name="expected_revision"/>
|
||||
<field type="uint8_t" name="target_system"/>
|
||||
<field type="uint8_t" name="target_component"/>
|
||||
</message>
|
||||
<message id="51011" name="KAPTAN_CONFIG_COMMIT">
|
||||
<description>Validates then atomically persists the open transaction.</description>
|
||||
<field type="uint64_t" name="expected_generation"/>
|
||||
<field type="uint32_t" name="request_id"/>
|
||||
<field type="uint32_t" name="session_id"/>
|
||||
<field type="uint32_t" name="expected_revision"/>
|
||||
<field type="uint8_t" name="target_system"/>
|
||||
<field type="uint8_t" name="target_component"/>
|
||||
</message>
|
||||
<message id="51012" name="KAPTAN_CONFIG_ABORT">
|
||||
<description>Discards the open RAM transaction.</description>
|
||||
<field type="uint32_t" name="request_id"/>
|
||||
<field type="uint32_t" name="session_id"/>
|
||||
<field type="uint8_t" name="target_system"/>
|
||||
<field type="uint8_t" name="target_component"/>
|
||||
</message>
|
||||
<message id="51013" name="KAPTAN_CONFIG_RESULT">
|
||||
<description>Authoritative typed completion for a configuration request.</description>
|
||||
<field type="uint64_t" name="generation"/>
|
||||
<field type="uint32_t" name="request_id"/>
|
||||
<field type="uint32_t" name="session_id"/>
|
||||
<field type="uint32_t" name="transfer_id"/>
|
||||
<field type="uint32_t" name="revision"/>
|
||||
<field type="uint16_t" name="primary_field"/>
|
||||
<field type="uint16_t" name="related_field"/>
|
||||
<field type="uint16_t" name="validation_rule"/>
|
||||
<field type="uint8_t" name="operation" enum="KAPTAN_CONFIG_OPERATION"/>
|
||||
<field type="uint8_t" name="result" enum="KAPTAN_CONFIG_RESULT"/>
|
||||
<field type="uint8_t" name="error" enum="KAPTAN_CONFIG_ERROR"/>
|
||||
<field type="uint8_t" name="config_state" enum="KAPTAN_CONFIG_STATE"/>
|
||||
</message>
|
||||
<message id="51015" name="KAPTAN_CONFIG_SET_BOOL">
|
||||
<description>Writes one boolean field in the open transaction.</description>
|
||||
<field type="uint32_t" name="request_id"/>
|
||||
<field type="uint32_t" name="session_id"/>
|
||||
<field type="uint32_t" name="expected_revision"/>
|
||||
<field type="uint16_t" name="field_id"/>
|
||||
<field type="uint8_t" name="value"/>
|
||||
<field type="uint8_t" name="target_system"/>
|
||||
<field type="uint8_t" name="target_component"/>
|
||||
</message>
|
||||
<message id="51016" name="KAPTAN_CONFIG_SET_F64">
|
||||
<description>Writes one f64 field in the open transaction.</description>
|
||||
<field type="double" name="value"/>
|
||||
<field type="uint32_t" name="request_id"/>
|
||||
<field type="uint32_t" name="session_id"/>
|
||||
<field type="uint32_t" name="expected_revision"/>
|
||||
<field type="uint16_t" name="field_id"/>
|
||||
<field type="uint8_t" name="target_system"/>
|
||||
<field type="uint8_t" name="target_component"/>
|
||||
</message>
|
||||
<message id="51017" name="KAPTAN_CONFIG_IMPORT_BEGIN">
|
||||
<description>Starts a fixed-bounded CBOR import inside an open transaction.</description>
|
||||
<field type="uint32_t" name="crc32c"/>
|
||||
<field type="uint32_t" name="request_id"/>
|
||||
<field type="uint32_t" name="session_id"/>
|
||||
<field type="uint32_t" name="expected_revision"/>
|
||||
<field type="uint16_t" name="length"/>
|
||||
<field type="uint8_t[16]" name="schema_id"/>
|
||||
<field type="uint8_t" name="target_system"/>
|
||||
<field type="uint8_t" name="target_component"/>
|
||||
</message>
|
||||
<message id="51018" name="KAPTAN_CONFIG_IMPORT_CHUNK">
|
||||
<description>One aligned, idempotent 192-byte-or-final CBOR import chunk. Chunks may arrive out of order.</description>
|
||||
<field type="uint8_t[192]" name="data"/>
|
||||
<field type="uint32_t" name="request_id"/>
|
||||
<field type="uint32_t" name="session_id"/>
|
||||
<field type="uint32_t" name="transfer_id"/>
|
||||
<field type="uint16_t" name="offset"/>
|
||||
<field type="uint8_t" name="length"/>
|
||||
<field type="uint8_t" name="target_system"/>
|
||||
<field type="uint8_t" name="target_component"/>
|
||||
</message>
|
||||
<message id="51019" name="KAPTAN_CONFIG_IMPORT_FINISH">
|
||||
<description>Validates a complete received CBOR import into the transaction.</description>
|
||||
<field type="uint32_t" name="request_id"/>
|
||||
<field type="uint32_t" name="session_id"/>
|
||||
<field type="uint32_t" name="transfer_id"/>
|
||||
<field type="uint32_t" name="expected_revision"/>
|
||||
<field type="uint8_t" name="target_system"/>
|
||||
<field type="uint8_t" name="target_component"/>
|
||||
</message>
|
||||
</messages>
|
||||
</mavlink>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0"?>
|
||||
<mavlink>
|
||||
<version>3</version>
|
||||
<dialect>0</dialect>
|
||||
<!-- Kaptan-reserved development block. Register these IDs before release. -->
|
||||
<enums>
|
||||
<enum name="KAPTAN_ERROR_FLAGS" bitmask="true">
|
||||
<entry value="2" name="KAPTAN_ERROR_FLAG_TRUNCATED">
|
||||
<description>The path or additional-information UTF-8 prefix was truncated to its bounded on-wire field.</description>
|
||||
</entry>
|
||||
<entry value="4" name="KAPTAN_ERROR_FLAG_COALESCED">
|
||||
<description>Error represents repeated adjacent observations with the same path and additional information.</description>
|
||||
</entry>
|
||||
</enum>
|
||||
</enums>
|
||||
<messages>
|
||||
<message id="51021" name="KAPTAN_ERROR">
|
||||
<description>Bounded derived or explicit runtime error. This is distinct from ordinary KAPTAN_LOG records. The display identity is generated from the Rust error type and variant when a KaptanError-derived value is available; structured configuration failures remain authoritative in KAPTAN_CONFIG_RESULT.</description>
|
||||
<field type="uint8_t" name="flags" enum="KAPTAN_ERROR_FLAGS">Known bits are TRUNCATED=2 and COALESCED=4. Receivers ignore unknown future bits.</field>
|
||||
<field type="uint8_t" name="path_length">Number of valid UTF-8 bytes in path; no more than 96.</field>
|
||||
<field type="uint8_t" name="additional_information_length">Number of valid UTF-8 bytes in additional_information; no more than 64.</field>
|
||||
<field type="uint8_t[96]" name="path">Bounded UTF-8 derived or explicit error path. Bytes after path_length are zero.</field>
|
||||
<field type="uint8_t[64]" name="additional_information">Bounded UTF-8 optional error context. Bytes after additional_information_length are zero.</field>
|
||||
</message>
|
||||
</messages>
|
||||
</mavlink>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0"?>
|
||||
<mavlink>
|
||||
<version>3</version>
|
||||
<dialect>0</dialect>
|
||||
<!-- Kaptan-reserved development block. Register these IDs before release. -->
|
||||
<enums>
|
||||
<enum name="KAPTAN_LOG_FLAGS" bitmask="true">
|
||||
<entry value="1" name="KAPTAN_LOG_FLAG_TRACE">
|
||||
<description>Record originated at Rust trace level and uses MAVLink DEBUG severity.</description>
|
||||
</entry>
|
||||
<entry value="2" name="KAPTAN_LOG_FLAG_TRUNCATED">
|
||||
<description>Message text was truncated to the bounded on-wire buffer.</description>
|
||||
</entry>
|
||||
<entry value="4" name="KAPTAN_LOG_FLAG_COALESCED">
|
||||
<description>Message represents repeated adjacent observations.</description>
|
||||
</entry>
|
||||
</enum>
|
||||
</enums>
|
||||
<messages>
|
||||
<message id="51020" name="KAPTAN_LOG">
|
||||
<description>Bounded human-readable runtime log. The receiver needs only level, flags, and the valid UTF-8 text prefix. MAVLink framing, bounded admission, DMA, retries, and local loss accounting remain platform-owned.</description>
|
||||
<field type="uint8_t" name="level">MAV_SEVERITY-compatible level. Rust TRACE uses DEBUG plus the TRACE flag.</field>
|
||||
<field type="uint8_t" name="flags" enum="KAPTAN_LOG_FLAGS">Known bits are TRACE=1, TRUNCATED=2, and COALESCED=4. Receivers ignore unknown future bits.</field>
|
||||
<field type="uint8_t" name="message_length">Number of valid UTF-8 bytes in message; at most 160.</field>
|
||||
<field type="uint8_t[160]" name="message">Bounded UTF-8 message bytes. Bytes after message_length are zero.</field>
|
||||
</message>
|
||||
</messages>
|
||||
</mavlink>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0"?>
|
||||
<mavlink>
|
||||
<version>3</version>
|
||||
<dialect>0</dialect>
|
||||
<!-- Kaptan-reserved development block. Register these IDs before release. -->
|
||||
<enums>
|
||||
<enum name="KAPTAN_SHUTDOWN_REASON">
|
||||
<entry value="1" name="KAPTAN_SHUTDOWN_REASON_OPERATOR">
|
||||
<description>An operator initiated the completed controlled firmware shutdown.</description>
|
||||
</entry>
|
||||
<entry value="2" name="KAPTAN_SHUTDOWN_REASON_SAFETY">
|
||||
<description>The safety owner initiated the completed controlled firmware shutdown.</description>
|
||||
</entry>
|
||||
</enum>
|
||||
</enums>
|
||||
<messages>
|
||||
<message id="51022" name="KAPTAN_SHUTDOWN">
|
||||
<description>Typed completed orderly firmware shutdown observation. It is emitted only after a platform coordinator has inhibited outputs. It is not a log record, a shutdown request, or a panic/hard-fault/reset report.</description>
|
||||
<field type="uint8_t" name="reason" enum="KAPTAN_SHUTDOWN_REASON">Typed shutdown reason.</field>
|
||||
</message>
|
||||
</messages>
|
||||
</mavlink>
|
||||
Reference in new issue
Block a user