feat(diagnostics): split error and shutdown messages
This commit is contained in:
1 parent
9646451645
commit
afafd126d7
25 files changed
+608
-225
No files matched your search
@@ -5,7 +5,9 @@ fn main() {
|
||||
let dialect = manifest_directory.join("definitions/kaptan.xml");
|
||||
let config = manifest_directory.join("definitions/kaptan/config.xml");
|
||||
let log = manifest_directory.join("definitions/kaptan/log.xml");
|
||||
for definition in [&dialect, &config, &log] {
|
||||
let error = manifest_directory.join("definitions/kaptan/error.xml");
|
||||
let shutdown = manifest_directory.join("definitions/kaptan/shutdown.xml");
|
||||
for definition in [&dialect, &config, &log, &error, &shutdown] {
|
||||
println!("cargo::rerun-if-changed={}", definition.display());
|
||||
}
|
||||
println!("cargo::rustc-check-cfg=cfg(kaptan_has_messages)");
|
||||
|
||||
@@ -4,4 +4,6 @@
|
||||
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,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>
|
||||
@@ -15,22 +15,6 @@
|
||||
<description>Message represents repeated adjacent observations.</description>
|
||||
</entry>
|
||||
</enum>
|
||||
<enum name="KAPTAN_ERROR_FLAGS" bitmask="true">
|
||||
<entry value="2" name="KAPTAN_ERROR_FLAG_TRUNCATED">
|
||||
<description>Error display text was truncated to the bounded on-wire buffer.</description>
|
||||
</entry>
|
||||
<entry value="4" name="KAPTAN_ERROR_FLAG_COALESCED">
|
||||
<description>Error represents repeated adjacent observations.</description>
|
||||
</entry>
|
||||
</enum>
|
||||
<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="51020" name="KAPTAN_LOG">
|
||||
@@ -40,15 +24,5 @@
|
||||
<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>
|
||||
<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="message_length">Number of valid UTF-8 bytes in message; at most 160.</field>
|
||||
<field type="uint8_t[160]" name="message">Bounded UTF-8 error display identity. Bytes after message_length are zero.</field>
|
||||
</message>
|
||||
<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>
|
||||
@@ -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