diff --git a/generator/sbpg/specs/yaml2.py b/generator/sbpg/specs/yaml2.py index 60e4a8e29d..690e76bc3e 100755 --- a/generator/sbpg/specs/yaml2.py +++ b/generator/sbpg/specs/yaml2.py @@ -273,6 +273,9 @@ def mk_definition(defn): assert not short_desc.endswith("."), f"{identifier}: Remove . from: `{short_desc}`" assert all(x in string.printable for x in short_desc), f"Unprintable: {short_desc}" assert len(short_desc.splitlines()) == 1, f"Multi-line short_desc: {short_desc}" + + friendly_name = contents.get("friendly_name", "") + message_display = contents.get("message_display", "") return sbp.resolve_type(sbp.Definition(identifier=identifier, sbp_id=contents.get('id', None), short_desc=short_desc, @@ -281,6 +284,8 @@ def mk_definition(defn): fields=fs, public=contents.get('public', True), embedded_type=contents.get('embedded_type', False), + friendly_name=friendly_name, + message_display=message_display )) def mk_field(field): diff --git a/generator/sbpg/specs/yaml_schema.py b/generator/sbpg/specs/yaml_schema.py index 9b6c943b07..51b55ff6da 100755 --- a/generator/sbpg/specs/yaml_schema.py +++ b/generator/sbpg/specs/yaml_schema.py @@ -49,6 +49,8 @@ Optional('fields'): bitfield}}) definition = Schema({identifier: {Optional('id'): sbp_identifier, + Optional('friendly_name'): description, + Optional('message_display'): description, Optional('short_desc'): description, Optional('desc'): description, Optional('replaced_by'): [identifier], diff --git a/generator/sbpg/syntax.py b/generator/sbpg/syntax.py index b18505cc71..539c3339b6 100755 --- a/generator/sbpg/syntax.py +++ b/generator/sbpg/syntax.py @@ -73,7 +73,8 @@ def __repr__(self): class Definition(object): def __init__(self, identifier=None, sbp_id=None, short_desc=None, desc=None, type_id=None, - fields=None, public=False, embedded_type=False): + fields=None, public=False, embedded_type=False, + friendly_name="", message_display=""): self.identifier = identifier self.sbp_id = sbp_id self.short_desc = short_desc @@ -83,6 +84,8 @@ def __init__(self, identifier=None, self.fields = fields or [] self.public = public self.static = True + self.friendly_name = friendly_name + self.message_display = message_display @property def max_type_len(self): diff --git a/generator/sbpg/targets/resources/rust/sbp_messages_mod.rs b/generator/sbpg/targets/resources/rust/sbp_messages_mod.rs index 9690ea2c92..3b9bc68b5f 100644 --- a/generator/sbpg/targets/resources/rust/sbp_messages_mod.rs +++ b/generator/sbpg/targets/resources/rust/sbp_messages_mod.rs @@ -33,7 +33,9 @@ mod lib { pub use crate::time; pub use crate::wire_format::{PayloadParseError, WireFormat}; - pub use super::{ConcreteMessage, Sbp, SbpMessage, TryFromSbpError}; + pub use super::{ + ConcreteMessage, FriendlyName, MessageDisplay, Sbp, SbpMessage, TryFromSbpError, + }; pub use bytes::{Buf, BufMut}; @@ -96,6 +98,16 @@ pub trait ConcreteMessage: SbpMessage + TryFrom { const MESSAGE_NAME: &'static str; } +/// Friendly name representation of Sbp message +pub trait FriendlyName { + fn friendly_name() -> &'static str; +} + +/// Enriched fields display of Sbp messages +pub trait MessageDisplay { + fn message_display(&self) -> String; +} + /// The error returned when using [TryFrom] to convert [Sbp] to the wrong message type. #[derive(Debug, Clone)] pub struct TryFromSbpError; diff --git a/generator/sbpg/targets/resources/rust/sbp_messages_template.rs b/generator/sbpg/targets/resources/rust/sbp_messages_template.rs index 26cb13a4f3..37742185d8 100644 --- a/generator/sbpg/targets/resources/rust/sbp_messages_template.rs +++ b/generator/sbpg/targets/resources/rust/sbp_messages_template.rs @@ -151,6 +151,22 @@ impl TryFrom for (((m.msg_name))) { } ((* endif *)) +impl FriendlyName for (((m.msg_name))) { + fn friendly_name() -> &'static str { + "(((m.friendly_name)))" + } +} + +impl MessageDisplay for (((m.msg_name))) { + fn message_display(&self) -> String { + ((* if m.enrich_fields *)) + format!("(((m.enrich_display)))", (((m.enrich_fields))) ) + ((* else *)) + "(((m.message_display)))".to_string() + ((* endif *)) + } +} + impl WireFormat for (((m.msg_name))) { const MIN_LEN: usize = ((*- if not m.fields *)) diff --git a/generator/sbpg/targets/rust.py b/generator/sbpg/targets/rust.py index 891e41c0f8..e3f2eb9f40 100644 --- a/generator/sbpg/targets/rust.py +++ b/generator/sbpg/targets/rust.py @@ -13,6 +13,8 @@ Generator for rust target. """ +import re + from jinja2.environment import Environment from jinja2.utils import pass_environment @@ -330,6 +332,30 @@ def get_bitfield(field): return items +def get_friendly_name(msg): + if msg.friendly_name: + return msg.friendly_name + shorten_keyword = { + "TRACKING": "TRK", + "MEASUREMENT": "MEAS", + "INDEX": "IDX", + "NETWORK": "NET", + "EPHEMERIS": "EPH", + "_": " " + } + f_name = msg.identifier + if f_name.endswith("_GNSS"): + f_name = f_name[:-5] + " GNSS-only" + + # replace MSG_ + if f_name.startswith("MSG_"): + f_name = f_name[4:] + + for key, item in shorten_keyword.items(): + f_name = f_name.replace(key, item) + return f_name + + class FieldItem(object): def __init__(self, msg, package_specs, field): self.identifier = field.identifier @@ -351,6 +377,24 @@ def __init__(self, msg, package_specs, field): if self.options.get("fields", False): self.bitfield = get_bitfield(self) +# pattern to capture {{groups}} for enriched message display +# optional {{group}:1} to denote format!("{:1}", field) roundings +ENRICH_PAT = re.compile("{{([^}]+)}(:\\d+)?}") +# pattern to capture field to represent self.@field or self.#field.message_display() +ENRICH_FIELD_PAT = re.compile("([@#]\\w+)") + +# for enriched field display +def extract_self_field(match_obj): + match = match_obj.group() + assert match[0] == '#' or match[0] == '@' + if match[0] == '#': + return f"self.{match[1:]}.message_display()" + return f"self.{match[1:]}" + + +def map_to_fields(f): + return re.sub(ENRICH_FIELD_PAT, extract_self_field, f[0]) + class MsgItem(object): def __init__(self, msg, package, package_specs): @@ -370,7 +414,13 @@ def __init__(self, msg, package, package_specs): if len(field.bitfield) > 0: self.has_bitfield = True self.gps_time_fn = gps_time_fn(self) - + self.friendly_name = get_friendly_name(msg) + self.message_display = msg.message_display + if self.message_display: + # match regex, capture all {{field}} enclosed by two brackets + enrich_fields = re.findall(ENRICH_PAT, self.message_display) + self.enrich_fields = ', '.join(map(map_to_fields, enrich_fields)) + self.enrich_display = re.sub(ENRICH_PAT, "{\\2}", self.message_display) class PackageItem(object): def __init__(self, package, package_specs): diff --git a/rust/sbp/src/messages/acquisition.rs b/rust/sbp/src/messages/acquisition.rs index c00920b628..67958be1a8 100644 --- a/rust/sbp/src/messages/acquisition.rs +++ b/rust/sbp/src/messages/acquisition.rs @@ -77,6 +77,18 @@ pub mod acq_sv_profile { pub cp: u32, } + impl FriendlyName for AcqSvProfile { + fn friendly_name() -> &'static str { + "AcqSvProfile" + } + } + + impl MessageDisplay for AcqSvProfile { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for AcqSvProfile { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -190,6 +202,18 @@ pub mod acq_sv_profile_dep { pub cp: u32, } + impl FriendlyName for AcqSvProfileDep { + fn friendly_name() -> &'static str { + "AcqSvProfileDep" + } + } + + impl MessageDisplay for AcqSvProfileDep { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for AcqSvProfileDep { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -318,6 +342,18 @@ pub mod msg_acq_result { } } + impl FriendlyName for MsgAcqResult { + fn friendly_name() -> &'static str { + "ACQ RESULT" + } + } + + impl MessageDisplay for MsgAcqResult { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgAcqResult { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -414,6 +450,18 @@ pub mod msg_acq_result_dep_a { } } + impl FriendlyName for MsgAcqResultDepA { + fn friendly_name() -> &'static str { + "ACQ RESULT DEP A" + } + } + + impl MessageDisplay for MsgAcqResultDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgAcqResultDepA { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -509,6 +557,18 @@ pub mod msg_acq_result_dep_b { } } + impl FriendlyName for MsgAcqResultDepB { + fn friendly_name() -> &'static str { + "ACQ RESULT DEP B" + } + } + + impl MessageDisplay for MsgAcqResultDepB { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgAcqResultDepB { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -603,6 +663,18 @@ pub mod msg_acq_result_dep_c { } } + impl FriendlyName for MsgAcqResultDepC { + fn friendly_name() -> &'static str { + "ACQ RESULT DEP C" + } + } + + impl MessageDisplay for MsgAcqResultDepC { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgAcqResultDepC { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -689,6 +761,18 @@ pub mod msg_acq_sv_profile { } } + impl FriendlyName for MsgAcqSvProfile { + fn friendly_name() -> &'static str { + "ACQ SV PROFILE" + } + } + + impl MessageDisplay for MsgAcqSvProfile { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgAcqSvProfile { const MIN_LEN: usize = as WireFormat>::MIN_LEN; fn len(&self) -> usize { @@ -762,6 +846,18 @@ pub mod msg_acq_sv_profile_dep { } } + impl FriendlyName for MsgAcqSvProfileDep { + fn friendly_name() -> &'static str { + "ACQ SV PROFILE DEP" + } + } + + impl MessageDisplay for MsgAcqSvProfileDep { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgAcqSvProfileDep { const MIN_LEN: usize = as WireFormat>::MIN_LEN; fn len(&self) -> usize { diff --git a/rust/sbp/src/messages/bootload.rs b/rust/sbp/src/messages/bootload.rs index 61e105280c..c7f13d0101 100644 --- a/rust/sbp/src/messages/bootload.rs +++ b/rust/sbp/src/messages/bootload.rs @@ -79,6 +79,18 @@ pub mod msg_bootloader_handshake_dep_a { } } + impl FriendlyName for MsgBootloaderHandshakeDepA { + fn friendly_name() -> &'static str { + "BOOTLOADER HANDSHAKE DEP A" + } + } + + impl MessageDisplay for MsgBootloaderHandshakeDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgBootloaderHandshakeDepA { const MIN_LEN: usize = as WireFormat>::MIN_LEN; fn len(&self) -> usize { @@ -150,6 +162,18 @@ pub mod msg_bootloader_handshake_req { } } + impl FriendlyName for MsgBootloaderHandshakeReq { + fn friendly_name() -> &'static str { + "BOOTLOADER HANDSHAKE REQ" + } + } + + impl MessageDisplay for MsgBootloaderHandshakeReq { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgBootloaderHandshakeReq { const MIN_LEN: usize = 0; fn len(&self) -> usize { @@ -265,6 +289,18 @@ pub mod msg_bootloader_handshake_resp { } } + impl FriendlyName for MsgBootloaderHandshakeResp { + fn friendly_name() -> &'static str { + "BOOTLOADER HANDSHAKE RESP" + } + } + + impl MessageDisplay for MsgBootloaderHandshakeResp { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgBootloaderHandshakeResp { const MIN_LEN: usize = ::MIN_LEN + , Unterminated> as WireFormat>::MIN_LEN; @@ -340,6 +376,18 @@ pub mod msg_bootloader_jump_to_app { } } + impl FriendlyName for MsgBootloaderJumpToApp { + fn friendly_name() -> &'static str { + "BOOTLOADER JUMP TO APP" + } + } + + impl MessageDisplay for MsgBootloaderJumpToApp { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgBootloaderJumpToApp { const MIN_LEN: usize = ::MIN_LEN; fn len(&self) -> usize { @@ -414,6 +462,18 @@ pub mod msg_nap_device_dna_req { } } + impl FriendlyName for MsgNapDeviceDnaReq { + fn friendly_name() -> &'static str { + "NAP DEVICE DNA REQ" + } + } + + impl MessageDisplay for MsgNapDeviceDnaReq { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgNapDeviceDnaReq { const MIN_LEN: usize = 0; fn len(&self) -> usize { @@ -486,6 +546,18 @@ pub mod msg_nap_device_dna_resp { } } + impl FriendlyName for MsgNapDeviceDnaResp { + fn friendly_name() -> &'static str { + "NAP DEVICE DNA RESP" + } + } + + impl MessageDisplay for MsgNapDeviceDnaResp { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgNapDeviceDnaResp { const MIN_LEN: usize = <[u8; 8] as WireFormat>::MIN_LEN; fn len(&self) -> usize { diff --git a/rust/sbp/src/messages/ext_events.rs b/rust/sbp/src/messages/ext_events.rs index 34e0ca7009..0d185232b4 100644 --- a/rust/sbp/src/messages/ext_events.rs +++ b/rust/sbp/src/messages/ext_events.rs @@ -129,6 +129,18 @@ pub mod msg_ext_event { } } + impl FriendlyName for MsgExtEvent { + fn friendly_name() -> &'static str { + "EXT EVENT" + } + } + + impl MessageDisplay for MsgExtEvent { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgExtEvent { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN diff --git a/rust/sbp/src/messages/file_io.rs b/rust/sbp/src/messages/file_io.rs index 204697a7ac..a87b16183f 100644 --- a/rust/sbp/src/messages/file_io.rs +++ b/rust/sbp/src/messages/file_io.rs @@ -88,6 +88,18 @@ pub mod msg_fileio_config_req { } } + impl FriendlyName for MsgFileioConfigReq { + fn friendly_name() -> &'static str { + "FILEIO CONFIG REQ" + } + } + + impl MessageDisplay for MsgFileioConfigReq { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgFileioConfigReq { const MIN_LEN: usize = ::MIN_LEN; fn len(&self) -> usize { @@ -173,6 +185,18 @@ pub mod msg_fileio_config_resp { } } + impl FriendlyName for MsgFileioConfigResp { + fn friendly_name() -> &'static str { + "FILEIO CONFIG RESP" + } + } + + impl MessageDisplay for MsgFileioConfigResp { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgFileioConfigResp { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -271,6 +295,18 @@ pub mod msg_fileio_read_dir_req { } } + impl FriendlyName for MsgFileioReadDirReq { + fn friendly_name() -> &'static str { + "FILEIO READ DIR REQ" + } + } + + impl MessageDisplay for MsgFileioReadDirReq { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgFileioReadDirReq { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -358,6 +394,18 @@ pub mod msg_fileio_read_dir_resp { } } + impl FriendlyName for MsgFileioReadDirResp { + fn friendly_name() -> &'static str { + "FILEIO READ DIR RESP" + } + } + + impl MessageDisplay for MsgFileioReadDirResp { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgFileioReadDirResp { const MIN_LEN: usize = ::MIN_LEN + as WireFormat>::MIN_LEN; fn len(&self) -> usize { @@ -447,6 +495,18 @@ pub mod msg_fileio_read_req { } } + impl FriendlyName for MsgFileioReadReq { + fn friendly_name() -> &'static str { + "FILEIO READ REQ" + } + } + + impl MessageDisplay for MsgFileioReadReq { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgFileioReadReq { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -537,6 +597,18 @@ pub mod msg_fileio_read_resp { } } + impl FriendlyName for MsgFileioReadResp { + fn friendly_name() -> &'static str { + "FILEIO READ RESP" + } + } + + impl MessageDisplay for MsgFileioReadResp { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgFileioReadResp { const MIN_LEN: usize = ::MIN_LEN + as WireFormat>::MIN_LEN; fn len(&self) -> usize { @@ -614,6 +686,18 @@ pub mod msg_fileio_remove { } } + impl FriendlyName for MsgFileioRemove { + fn friendly_name() -> &'static str { + "FILEIO REMOVE" + } + } + + impl MessageDisplay for MsgFileioRemove { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgFileioRemove { const MIN_LEN: usize = , NullTerminated> as WireFormat>::MIN_LEN; fn len(&self) -> usize { @@ -701,6 +785,18 @@ pub mod msg_fileio_write_req { } } + impl FriendlyName for MsgFileioWriteReq { + fn friendly_name() -> &'static str { + "FILEIO WRITE REQ" + } + } + + impl MessageDisplay for MsgFileioWriteReq { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgFileioWriteReq { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -788,6 +884,18 @@ pub mod msg_fileio_write_resp { } } + impl FriendlyName for MsgFileioWriteResp { + fn friendly_name() -> &'static str { + "FILEIO WRITE RESP" + } + } + + impl MessageDisplay for MsgFileioWriteResp { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgFileioWriteResp { const MIN_LEN: usize = ::MIN_LEN; fn len(&self) -> usize { diff --git a/rust/sbp/src/messages/flash.rs b/rust/sbp/src/messages/flash.rs index c5137b8fd3..fcf8718eb8 100644 --- a/rust/sbp/src/messages/flash.rs +++ b/rust/sbp/src/messages/flash.rs @@ -101,6 +101,18 @@ pub mod msg_flash_done { } } + impl FriendlyName for MsgFlashDone { + fn friendly_name() -> &'static str { + "FLASH DONE" + } + } + + impl MessageDisplay for MsgFlashDone { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgFlashDone { const MIN_LEN: usize = ::MIN_LEN; fn len(&self) -> usize { @@ -245,6 +257,18 @@ pub mod msg_flash_erase { } } + impl FriendlyName for MsgFlashErase { + fn friendly_name() -> &'static str { + "FLASH ERASE" + } + } + + impl MessageDisplay for MsgFlashErase { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgFlashErase { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN; fn len(&self) -> usize { @@ -378,6 +402,18 @@ pub mod msg_flash_program { } } + impl FriendlyName for MsgFlashProgram { + fn friendly_name() -> &'static str { + "FLASH PROGRAM" + } + } + + impl MessageDisplay for MsgFlashProgram { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgFlashProgram { const MIN_LEN: usize = ::MIN_LEN + <[u8; 3] as WireFormat>::MIN_LEN @@ -519,6 +555,18 @@ pub mod msg_flash_read_req { } } + impl FriendlyName for MsgFlashReadReq { + fn friendly_name() -> &'static str { + "FLASH READ REQ" + } + } + + impl MessageDisplay for MsgFlashReadReq { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgFlashReadReq { const MIN_LEN: usize = ::MIN_LEN + <[u8; 3] as WireFormat>::MIN_LEN @@ -656,6 +704,18 @@ pub mod msg_flash_read_resp { } } + impl FriendlyName for MsgFlashReadResp { + fn friendly_name() -> &'static str { + "FLASH READ RESP" + } + } + + impl MessageDisplay for MsgFlashReadResp { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgFlashReadResp { const MIN_LEN: usize = ::MIN_LEN + <[u8; 3] as WireFormat>::MIN_LEN @@ -767,6 +827,18 @@ pub mod msg_m25_flash_write_status { } } + impl FriendlyName for MsgM25FlashWriteStatus { + fn friendly_name() -> &'static str { + "M25 FLASH WRITE STATUS" + } + } + + impl MessageDisplay for MsgM25FlashWriteStatus { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgM25FlashWriteStatus { const MIN_LEN: usize = <[u8; 1] as WireFormat>::MIN_LEN; fn len(&self) -> usize { @@ -840,6 +912,18 @@ pub mod msg_stm_flash_lock_sector { } } + impl FriendlyName for MsgStmFlashLockSector { + fn friendly_name() -> &'static str { + "STM FLASH LOCK SECTOR" + } + } + + impl MessageDisplay for MsgStmFlashLockSector { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgStmFlashLockSector { const MIN_LEN: usize = ::MIN_LEN; fn len(&self) -> usize { @@ -913,6 +997,18 @@ pub mod msg_stm_flash_unlock_sector { } } + impl FriendlyName for MsgStmFlashUnlockSector { + fn friendly_name() -> &'static str { + "STM FLASH UNLOCK SECTOR" + } + } + + impl MessageDisplay for MsgStmFlashUnlockSector { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgStmFlashUnlockSector { const MIN_LEN: usize = ::MIN_LEN; fn len(&self) -> usize { @@ -985,6 +1081,18 @@ pub mod msg_stm_unique_id_req { } } + impl FriendlyName for MsgStmUniqueIdReq { + fn friendly_name() -> &'static str { + "STM UNIQUE ID REQ" + } + } + + impl MessageDisplay for MsgStmUniqueIdReq { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgStmUniqueIdReq { const MIN_LEN: usize = 0; fn len(&self) -> usize { @@ -1055,6 +1163,18 @@ pub mod msg_stm_unique_id_resp { } } + impl FriendlyName for MsgStmUniqueIdResp { + fn friendly_name() -> &'static str { + "STM UNIQUE ID RESP" + } + } + + impl MessageDisplay for MsgStmUniqueIdResp { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgStmUniqueIdResp { const MIN_LEN: usize = <[u8; 12] as WireFormat>::MIN_LEN; fn len(&self) -> usize { diff --git a/rust/sbp/src/messages/gnss.rs b/rust/sbp/src/messages/gnss.rs index b82f9ab2cb..ba293e8003 100644 --- a/rust/sbp/src/messages/gnss.rs +++ b/rust/sbp/src/messages/gnss.rs @@ -45,6 +45,18 @@ pub mod carrier_phase { pub f: u8, } + impl FriendlyName for CarrierPhase { + fn friendly_name() -> &'static str { + "CarrierPhase" + } + } + + impl MessageDisplay for CarrierPhase { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for CarrierPhase { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN; fn len(&self) -> usize { @@ -91,6 +103,18 @@ pub mod gps_time { pub wn: u16, } + impl FriendlyName for GpsTime { + fn friendly_name() -> &'static str { + "GPSTime" + } + } + + impl MessageDisplay for GpsTime { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for GpsTime { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -138,6 +162,18 @@ pub mod gps_time_dep { pub wn: u16, } + impl FriendlyName for GpsTimeDep { + fn friendly_name() -> &'static str { + "GPSTimeDep" + } + } + + impl MessageDisplay for GpsTimeDep { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for GpsTimeDep { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN; fn len(&self) -> usize { @@ -179,6 +215,18 @@ pub mod gps_time_sec { pub wn: u16, } + impl FriendlyName for GpsTimeSec { + fn friendly_name() -> &'static str { + "GPSTimeSec" + } + } + + impl MessageDisplay for GpsTimeSec { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for GpsTimeSec { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN; fn len(&self) -> usize { @@ -237,6 +285,18 @@ pub mod gnss_signal { } } + impl FriendlyName for GnssSignal { + fn friendly_name() -> &'static str { + "GnssSignal" + } + } + + impl MessageDisplay for GnssSignal { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for GnssSignal { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN; fn len(&self) -> usize { @@ -378,6 +438,18 @@ pub mod gnss_signal_dep { } } + impl FriendlyName for GnssSignalDep { + fn friendly_name() -> &'static str { + "GnssSignalDep" + } + } + + impl MessageDisplay for GnssSignalDep { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for GnssSignalDep { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -496,6 +568,18 @@ pub mod sv_id { } } + impl FriendlyName for SvId { + fn friendly_name() -> &'static str { + "SvId" + } + } + + impl MessageDisplay for SvId { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for SvId { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN; fn len(&self) -> usize { diff --git a/rust/sbp/src/messages/imu.rs b/rust/sbp/src/messages/imu.rs index 2890e58aab..d43173c42f 100644 --- a/rust/sbp/src/messages/imu.rs +++ b/rust/sbp/src/messages/imu.rs @@ -123,6 +123,18 @@ pub mod msg_imu_aux { } } + impl FriendlyName for MsgImuAux { + fn friendly_name() -> &'static str { + "IMU AUX" + } + } + + impl MessageDisplay for MsgImuAux { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgImuAux { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -399,6 +411,18 @@ pub mod msg_imu_raw { } } + impl FriendlyName for MsgImuRaw { + fn friendly_name() -> &'static str { + "IMU RAW" + } + } + + impl MessageDisplay for MsgImuRaw { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgImuRaw { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN diff --git a/rust/sbp/src/messages/integrity.rs b/rust/sbp/src/messages/integrity.rs index 4b68795a8c..cd8cac55a7 100644 --- a/rust/sbp/src/messages/integrity.rs +++ b/rust/sbp/src/messages/integrity.rs @@ -55,6 +55,18 @@ pub mod integrity_ssr_header { pub chain_id: u8, } + impl FriendlyName for IntegritySSRHeader { + fn friendly_name() -> &'static str { + "IntegritySSRHeader" + } + } + + impl MessageDisplay for IntegritySSRHeader { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for IntegritySSRHeader { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -350,6 +362,18 @@ pub mod msg_ssr_flag_high_level { } } + impl FriendlyName for MsgSsrFlagHighLevel { + fn friendly_name() -> &'static str { + "SSR FLAG HIGH LEVEL" + } + } + + impl MessageDisplay for MsgSsrFlagHighLevel { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSsrFlagHighLevel { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -757,6 +781,18 @@ pub mod msg_ssr_flag_iono_grid_points { } } + impl FriendlyName for MsgSsrFlagIonoGridPoints { + fn friendly_name() -> &'static str { + "SSR FLAG IONO GRID POINTS" + } + } + + impl MessageDisplay for MsgSsrFlagIonoGridPoints { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSsrFlagIonoGridPoints { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -843,6 +879,18 @@ pub mod msg_ssr_flag_iono_grid_point_sat_los { } } + impl FriendlyName for MsgSsrFlagIonoGridPointSatLos { + fn friendly_name() -> &'static str { + "SSR FLAG IONO GRID POINT SAT LOS" + } + } + + impl MessageDisplay for MsgSsrFlagIonoGridPointSatLos { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSsrFlagIonoGridPointSatLos { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -930,6 +978,18 @@ pub mod msg_ssr_flag_iono_tile_sat_los { } } + impl FriendlyName for MsgSsrFlagIonoTileSatLos { + fn friendly_name() -> &'static str { + "SSR FLAG IONO TILE SAT LOS" + } + } + + impl MessageDisplay for MsgSsrFlagIonoTileSatLos { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSsrFlagIonoTileSatLos { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -1028,6 +1088,18 @@ pub mod msg_ssr_flag_satellites { } } + impl FriendlyName for MsgSsrFlagSatellites { + fn friendly_name() -> &'static str { + "SSR FLAG SATELLITES" + } + } + + impl MessageDisplay for MsgSsrFlagSatellites { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSsrFlagSatellites { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -1131,6 +1203,18 @@ pub mod msg_ssr_flag_tropo_grid_points { } } + impl FriendlyName for MsgSsrFlagTropoGridPoints { + fn friendly_name() -> &'static str { + "SSR FLAG TROPO GRID POINTS" + } + } + + impl MessageDisplay for MsgSsrFlagTropoGridPoints { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSsrFlagTropoGridPoints { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN diff --git a/rust/sbp/src/messages/linux.rs b/rust/sbp/src/messages/linux.rs index e5fca7b5ae..97895cc0db 100644 --- a/rust/sbp/src/messages/linux.rs +++ b/rust/sbp/src/messages/linux.rs @@ -115,6 +115,18 @@ pub mod msg_linux_cpu_state { } } + impl FriendlyName for MsgLinuxCpuState { + fn friendly_name() -> &'static str { + "LINUX CPU STATE" + } + } + + impl MessageDisplay for MsgLinuxCpuState { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgLinuxCpuState { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -254,6 +266,18 @@ pub mod msg_linux_cpu_state_dep_a { } } + impl FriendlyName for MsgLinuxCpuStateDepA { + fn friendly_name() -> &'static str { + "LINUX CPU STATE DEP A" + } + } + + impl MessageDisplay for MsgLinuxCpuStateDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgLinuxCpuStateDepA { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -377,6 +401,18 @@ pub mod msg_linux_mem_state { } } + impl FriendlyName for MsgLinuxMemState { + fn friendly_name() -> &'static str { + "LINUX MEM STATE" + } + } + + impl MessageDisplay for MsgLinuxMemState { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgLinuxMemState { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -516,6 +552,18 @@ pub mod msg_linux_mem_state_dep_a { } } + impl FriendlyName for MsgLinuxMemStateDepA { + fn friendly_name() -> &'static str { + "LINUX MEM STATE DEP A" + } + } + + impl MessageDisplay for MsgLinuxMemStateDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgLinuxMemStateDepA { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -613,6 +661,18 @@ pub mod msg_linux_process_fd_count { } } + impl FriendlyName for MsgLinuxProcessFdCount { + fn friendly_name() -> &'static str { + "LINUX PROCESS FD COUNT" + } + } + + impl MessageDisplay for MsgLinuxProcessFdCount { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgLinuxProcessFdCount { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -704,6 +764,18 @@ pub mod msg_linux_process_fd_summary { } } + impl FriendlyName for MsgLinuxProcessFdSummary { + fn friendly_name() -> &'static str { + "LINUX PROCESS FD SUMMARY" + } + } + + impl MessageDisplay for MsgLinuxProcessFdSummary { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgLinuxProcessFdSummary { const MIN_LEN: usize = ::MIN_LEN + , DoubleNullTerminated> as WireFormat>::MIN_LEN; @@ -798,6 +870,18 @@ pub mod msg_linux_process_socket_counts { } } + impl FriendlyName for MsgLinuxProcessSocketCounts { + fn friendly_name() -> &'static str { + "LINUX PROCESS SOCKET COUNTS" + } + } + + impl MessageDisplay for MsgLinuxProcessSocketCounts { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgLinuxProcessSocketCounts { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -916,6 +1000,18 @@ pub mod msg_linux_process_socket_queues { } } + impl FriendlyName for MsgLinuxProcessSocketQueues { + fn friendly_name() -> &'static str { + "LINUX PROCESS SOCKET QUEUES" + } + } + + impl MessageDisplay for MsgLinuxProcessSocketQueues { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgLinuxProcessSocketQueues { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -1029,6 +1125,18 @@ pub mod msg_linux_socket_usage { } } + impl FriendlyName for MsgLinuxSocketUsage { + fn friendly_name() -> &'static str { + "LINUX SOCKET USAGE" + } + } + + impl MessageDisplay for MsgLinuxSocketUsage { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgLinuxSocketUsage { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -1151,6 +1259,18 @@ pub mod msg_linux_sys_state { } } + impl FriendlyName for MsgLinuxSysState { + fn friendly_name() -> &'static str { + "LINUX SYS STATE" + } + } + + impl MessageDisplay for MsgLinuxSysState { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgLinuxSysState { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -1296,6 +1416,18 @@ pub mod msg_linux_sys_state_dep_a { } } + impl FriendlyName for MsgLinuxSysStateDepA { + fn friendly_name() -> &'static str { + "LINUX SYS STATE DEP A" + } + } + + impl MessageDisplay for MsgLinuxSysStateDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgLinuxSysStateDepA { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN diff --git a/rust/sbp/src/messages/logging.rs b/rust/sbp/src/messages/logging.rs index 369cb15ca6..5f90389b34 100644 --- a/rust/sbp/src/messages/logging.rs +++ b/rust/sbp/src/messages/logging.rs @@ -85,6 +85,18 @@ pub mod msg_fwd { } } + impl FriendlyName for MsgFwd { + fn friendly_name() -> &'static str { + "FWD" + } + } + + impl MessageDisplay for MsgFwd { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgFwd { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -186,6 +198,18 @@ pub mod msg_log { } } + impl FriendlyName for MsgLog { + fn friendly_name() -> &'static str { + "LOG" + } + } + + impl MessageDisplay for MsgLog { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgLog { const MIN_LEN: usize = ::MIN_LEN + , Unterminated> as WireFormat>::MIN_LEN; @@ -321,6 +345,18 @@ pub mod msg_print_dep { } } + impl FriendlyName for MsgPrintDep { + fn friendly_name() -> &'static str { + "PRINT DEP" + } + } + + impl MessageDisplay for MsgPrintDep { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgPrintDep { const MIN_LEN: usize = , Unterminated> as WireFormat>::MIN_LEN; fn len(&self) -> usize { diff --git a/rust/sbp/src/messages/mag.rs b/rust/sbp/src/messages/mag.rs index ebeb4c9d59..03d11ff7be 100644 --- a/rust/sbp/src/messages/mag.rs +++ b/rust/sbp/src/messages/mag.rs @@ -92,6 +92,18 @@ pub mod msg_mag_raw { } } + impl FriendlyName for MsgMagRaw { + fn friendly_name() -> &'static str { + "MAG RAW" + } + } + + impl MessageDisplay for MsgMagRaw { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgMagRaw { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN diff --git a/rust/sbp/src/messages/mod.rs b/rust/sbp/src/messages/mod.rs index bd511a2be7..a7b7012087 100644 --- a/rust/sbp/src/messages/mod.rs +++ b/rust/sbp/src/messages/mod.rs @@ -271,7 +271,9 @@ mod lib { pub use crate::time; pub use crate::wire_format::{PayloadParseError, WireFormat}; - pub use super::{ConcreteMessage, Sbp, SbpMessage, TryFromSbpError}; + pub use super::{ + ConcreteMessage, FriendlyName, MessageDisplay, Sbp, SbpMessage, TryFromSbpError, + }; pub use bytes::{Buf, BufMut}; @@ -334,6 +336,16 @@ pub trait ConcreteMessage: SbpMessage + TryFrom { const MESSAGE_NAME: &'static str; } +/// Friendly name representation of Sbp message +pub trait FriendlyName { + fn friendly_name() -> &'static str; +} + +/// Enriched fields display of Sbp messages +pub trait MessageDisplay { + fn message_display(&self) -> String; +} + /// The error returned when using [TryFrom] to convert [Sbp] to the wrong message type. #[derive(Debug, Clone)] pub struct TryFromSbpError; diff --git a/rust/sbp/src/messages/navigation.rs b/rust/sbp/src/messages/navigation.rs index 294223d752..0bf976080e 100644 --- a/rust/sbp/src/messages/navigation.rs +++ b/rust/sbp/src/messages/navigation.rs @@ -103,6 +103,18 @@ pub mod estimated_horizontal_error_ellipse { pub orientation: f32, } + impl FriendlyName for EstimatedHorizontalErrorEllipse { + fn friendly_name() -> &'static str { + "EstimatedHorizontalErrorEllipse" + } + } + + impl MessageDisplay for EstimatedHorizontalErrorEllipse { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for EstimatedHorizontalErrorEllipse { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -195,6 +207,18 @@ pub mod msg_age_corrections { } } + impl FriendlyName for MsgAgeCorrections { + fn friendly_name() -> &'static str { + "AGE CORRECTIONS" + } + } + + impl MessageDisplay for MsgAgeCorrections { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgAgeCorrections { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN; fn len(&self) -> usize { @@ -315,6 +339,18 @@ pub mod msg_baseline_ecef { } } + impl FriendlyName for MsgBaselineEcef { + fn friendly_name() -> &'static str { + "BASELINE ECEF" + } + } + + impl MessageDisplay for MsgBaselineEcef { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgBaselineEcef { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -525,6 +561,18 @@ pub mod msg_baseline_ecef_dep_a { } } + impl FriendlyName for MsgBaselineEcefDepA { + fn friendly_name() -> &'static str { + "BASELINE ECEF DEP A" + } + } + + impl MessageDisplay for MsgBaselineEcefDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgBaselineEcefDepA { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -781,6 +829,18 @@ pub mod msg_baseline_heading_dep_a { } } + impl FriendlyName for MsgBaselineHeadingDepA { + fn friendly_name() -> &'static str { + "BASELINE HEADING DEP A" + } + } + + impl MessageDisplay for MsgBaselineHeadingDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgBaselineHeadingDepA { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -1012,6 +1072,18 @@ pub mod msg_baseline_ned { } } + impl FriendlyName for MsgBaselineNed { + fn friendly_name() -> &'static str { + "BASELINE NED" + } + } + + impl MessageDisplay for MsgBaselineNed { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgBaselineNed { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -1231,6 +1303,18 @@ pub mod msg_baseline_ned_dep_a { } } + impl FriendlyName for MsgBaselineNedDepA { + fn friendly_name() -> &'static str { + "BASELINE NED DEP A" + } + } + + impl MessageDisplay for MsgBaselineNedDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgBaselineNedDepA { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -1484,6 +1568,18 @@ pub mod msg_dops { } } + impl FriendlyName for MsgDops { + fn friendly_name() -> &'static str { + "DOPS" + } + } + + impl MessageDisplay for MsgDops { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgDops { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -1660,6 +1756,18 @@ pub mod msg_dops_dep_a { } } + impl FriendlyName for MsgDopsDepA { + fn friendly_name() -> &'static str { + "DOPS DEP A" + } + } + + impl MessageDisplay for MsgDopsDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgDopsDepA { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -1802,6 +1910,18 @@ pub mod msg_gps_time { } } + impl FriendlyName for MsgGpsTime { + fn friendly_name() -> &'static str { + "GPS TIME" + } + } + + impl MessageDisplay for MsgGpsTime { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgGpsTime { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -1955,6 +2075,18 @@ pub mod msg_gps_time_dep_a { } } + impl FriendlyName for MsgGpsTimeDepA { + fn friendly_name() -> &'static str { + "GPS TIME DEP A" + } + } + + impl MessageDisplay for MsgGpsTimeDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgGpsTimeDepA { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -2089,6 +2221,18 @@ pub mod msg_gps_time_gnss { } } + impl FriendlyName for MsgGpsTimeGnss { + fn friendly_name() -> &'static str { + "GPS TIME GNSS-only" + } + } + + impl MessageDisplay for MsgGpsTimeGnss { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgGpsTimeGnss { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -2340,6 +2484,18 @@ pub mod msg_pose_relative { } } + impl FriendlyName for MsgPoseRelative { + fn friendly_name() -> &'static str { + "POSE RELATIVE" + } + } + + impl MessageDisplay for MsgPoseRelative { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgPoseRelative { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -2671,6 +2827,18 @@ pub mod msg_pos_ecef { } } + impl FriendlyName for MsgPosEcef { + fn friendly_name() -> &'static str { + "POS ECEF" + } + } + + impl MessageDisplay for MsgPosEcef { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgPosEcef { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -2978,6 +3146,18 @@ pub mod msg_pos_ecef_cov { } } + impl FriendlyName for MsgPosEcefCov { + fn friendly_name() -> &'static str { + "POS ECEF COV" + } + } + + impl MessageDisplay for MsgPosEcefCov { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgPosEcefCov { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -3274,6 +3454,18 @@ pub mod msg_pos_ecef_cov_gnss { } } + impl FriendlyName for MsgPosEcefCovGnss { + fn friendly_name() -> &'static str { + "POS ECEF COV GNSS-only" + } + } + + impl MessageDisplay for MsgPosEcefCovGnss { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgPosEcefCovGnss { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -3517,6 +3709,18 @@ pub mod msg_pos_ecef_dep_a { } } + impl FriendlyName for MsgPosEcefDepA { + fn friendly_name() -> &'static str { + "POS ECEF DEP A" + } + } + + impl MessageDisplay for MsgPosEcefDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgPosEcefDepA { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -3763,6 +3967,18 @@ pub mod msg_pos_ecef_gnss { } } + impl FriendlyName for MsgPosEcefGnss { + fn friendly_name() -> &'static str { + "POS ECEF GNSS-only" + } + } + + impl MessageDisplay for MsgPosEcefGnss { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgPosEcefGnss { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -3992,6 +4208,18 @@ pub mod msg_pos_llh { } } + impl FriendlyName for MsgPosLlh { + fn friendly_name() -> &'static str { + "POS LLH" + } + } + + impl MessageDisplay for MsgPosLlh { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgPosLlh { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -4351,6 +4579,18 @@ pub mod msg_pos_llh_acc { } } + impl FriendlyName for MsgPosLlhAcc { + fn friendly_name() -> &'static str { + "POS LLH ACC" + } + } + + impl MessageDisplay for MsgPosLlhAcc { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgPosLlhAcc { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -4752,6 +4992,18 @@ pub mod msg_pos_llh_cov { } } + impl FriendlyName for MsgPosLlhCov { + fn friendly_name() -> &'static str { + "POS LLH COV" + } + } + + impl MessageDisplay for MsgPosLlhCov { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgPosLlhCov { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -5048,6 +5300,18 @@ pub mod msg_pos_llh_cov_gnss { } } + impl FriendlyName for MsgPosLlhCovGnss { + fn friendly_name() -> &'static str { + "POS LLH COV GNSS-only" + } + } + + impl MessageDisplay for MsgPosLlhCovGnss { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgPosLlhCovGnss { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -5313,6 +5577,18 @@ pub mod msg_pos_llh_dep_a { } } + impl FriendlyName for MsgPosLlhDepA { + fn friendly_name() -> &'static str { + "POS LLH DEP A" + } + } + + impl MessageDisplay for MsgPosLlhDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgPosLlhDepA { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -5598,6 +5874,18 @@ pub mod msg_pos_llh_gnss { } } + impl FriendlyName for MsgPosLlhGnss { + fn friendly_name() -> &'static str { + "POS LLH GNSS-only" + } + } + + impl MessageDisplay for MsgPosLlhGnss { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgPosLlhGnss { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -6011,6 +6299,18 @@ pub mod msg_protection_level { } } + impl FriendlyName for MsgProtectionLevel { + fn friendly_name() -> &'static str { + "PROTECTION LEVEL" + } + } + + impl MessageDisplay for MsgProtectionLevel { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgProtectionLevel { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -6333,6 +6633,18 @@ pub mod msg_protection_level_dep_a { } } + impl FriendlyName for MsgProtectionLevelDepA { + fn friendly_name() -> &'static str { + "PROTECTION LEVEL DEP A" + } + } + + impl MessageDisplay for MsgProtectionLevelDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgProtectionLevelDepA { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -6524,6 +6836,18 @@ pub mod msg_reference_frame_param { } } + impl FriendlyName for MsgReferenceFrameParam { + fn friendly_name() -> &'static str { + "REFERENCE FRAME PARAM" + } + } + + impl MessageDisplay for MsgReferenceFrameParam { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgReferenceFrameParam { const MIN_LEN: usize = ::MIN_LEN + as WireFormat>::MIN_LEN @@ -6698,6 +7022,18 @@ pub mod msg_utc_leap_second { } } + impl FriendlyName for MsgUtcLeapSecond { + fn friendly_name() -> &'static str { + "UTC LEAP SECOND" + } + } + + impl MessageDisplay for MsgUtcLeapSecond { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgUtcLeapSecond { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -6867,6 +7203,18 @@ pub mod msg_utc_time { } } + impl FriendlyName for MsgUtcTime { + fn friendly_name() -> &'static str { + "UTC TIME" + } + } + + impl MessageDisplay for MsgUtcTime { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgUtcTime { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -7106,6 +7454,18 @@ pub mod msg_utc_time_gnss { } } + impl FriendlyName for MsgUtcTimeGnss { + fn friendly_name() -> &'static str { + "UTC TIME GNSS-only" + } + } + + impl MessageDisplay for MsgUtcTimeGnss { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgUtcTimeGnss { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -7360,6 +7720,18 @@ pub mod msg_vel_body { } } + impl FriendlyName for MsgVelBody { + fn friendly_name() -> &'static str { + "VEL BODY" + } + } + + impl MessageDisplay for MsgVelBody { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgVelBody { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -7689,6 +8061,18 @@ pub mod msg_vel_cog { } } + impl FriendlyName for MsgVelCog { + fn friendly_name() -> &'static str { + "VEL COG" + } + } + + impl MessageDisplay for MsgVelCog { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgVelCog { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -8084,6 +8468,18 @@ pub mod msg_vel_ecef { } } + impl FriendlyName for MsgVelEcef { + fn friendly_name() -> &'static str { + "VEL ECEF" + } + } + + impl MessageDisplay for MsgVelEcef { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgVelEcef { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -8368,6 +8764,18 @@ pub mod msg_vel_ecef_cov { } } + impl FriendlyName for MsgVelEcefCov { + fn friendly_name() -> &'static str { + "VEL ECEF COV" + } + } + + impl MessageDisplay for MsgVelEcefCov { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgVelEcefCov { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -8644,6 +9052,18 @@ pub mod msg_vel_ecef_cov_gnss { } } + impl FriendlyName for MsgVelEcefCovGnss { + fn friendly_name() -> &'static str { + "VEL ECEF COV GNSS-only" + } + } + + impl MessageDisplay for MsgVelEcefCovGnss { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgVelEcefCovGnss { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -8824,6 +9244,18 @@ pub mod msg_vel_ecef_dep_a { } } + impl FriendlyName for MsgVelEcefDepA { + fn friendly_name() -> &'static str { + "VEL ECEF DEP A" + } + } + + impl MessageDisplay for MsgVelEcefDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgVelEcefDepA { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -8965,6 +9397,18 @@ pub mod msg_vel_ecef_gnss { } } + impl FriendlyName for MsgVelEcefGnss { + fn friendly_name() -> &'static str { + "VEL ECEF GNSS-only" + } + } + + impl MessageDisplay for MsgVelEcefGnss { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgVelEcefGnss { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -9173,6 +9617,18 @@ pub mod msg_vel_ned { } } + impl FriendlyName for MsgVelNed { + fn friendly_name() -> &'static str { + "VEL NED" + } + } + + impl MessageDisplay for MsgVelNed { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgVelNed { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -9464,6 +9920,18 @@ pub mod msg_vel_ned_cov { } } + impl FriendlyName for MsgVelNedCov { + fn friendly_name() -> &'static str { + "VEL NED COV" + } + } + + impl MessageDisplay for MsgVelNedCov { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgVelNedCov { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -9743,6 +10211,18 @@ pub mod msg_vel_ned_cov_gnss { } } + impl FriendlyName for MsgVelNedCovGnss { + fn friendly_name() -> &'static str { + "VEL NED COV GNSS-only" + } + } + + impl MessageDisplay for MsgVelNedCovGnss { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgVelNedCovGnss { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -9927,6 +10407,18 @@ pub mod msg_vel_ned_dep_a { } } + impl FriendlyName for MsgVelNedDepA { + fn friendly_name() -> &'static str { + "VEL NED DEP A" + } + } + + impl MessageDisplay for MsgVelNedDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgVelNedDepA { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -10076,6 +10568,18 @@ pub mod msg_vel_ned_gnss { } } + impl FriendlyName for MsgVelNedGnss { + fn friendly_name() -> &'static str { + "VEL NED GNSS-only" + } + } + + impl MessageDisplay for MsgVelNedGnss { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgVelNedGnss { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN diff --git a/rust/sbp/src/messages/ndb.rs b/rust/sbp/src/messages/ndb.rs index 119ac9a204..765eaf121c 100644 --- a/rust/sbp/src/messages/ndb.rs +++ b/rust/sbp/src/messages/ndb.rs @@ -157,6 +157,18 @@ pub mod msg_ndb_event { } } + impl FriendlyName for MsgNdbEvent { + fn friendly_name() -> &'static str { + "NDB EVENT" + } + } + + impl MessageDisplay for MsgNdbEvent { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgNdbEvent { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN diff --git a/rust/sbp/src/messages/observation.rs b/rust/sbp/src/messages/observation.rs index 25db874bc9..b2b4c00be0 100644 --- a/rust/sbp/src/messages/observation.rs +++ b/rust/sbp/src/messages/observation.rs @@ -114,6 +114,18 @@ pub mod almanac_common_content { pub health_bits: u8, } + impl FriendlyName for AlmanacCommonContent { + fn friendly_name() -> &'static str { + "AlmanacCommonContent" + } + } + + impl MessageDisplay for AlmanacCommonContent { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for AlmanacCommonContent { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -194,6 +206,18 @@ pub mod almanac_common_content_dep { pub health_bits: u8, } + impl FriendlyName for AlmanacCommonContentDep { + fn friendly_name() -> &'static str { + "AlmanacCommonContentDep" + } + } + + impl MessageDisplay for AlmanacCommonContentDep { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for AlmanacCommonContentDep { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -256,6 +280,18 @@ pub mod carrier_phase_dep_a { pub f: u8, } + impl FriendlyName for CarrierPhaseDepA { + fn friendly_name() -> &'static str { + "CarrierPhaseDepA" + } + } + + impl MessageDisplay for CarrierPhaseDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for CarrierPhaseDepA { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN; fn len(&self) -> usize { @@ -299,6 +335,18 @@ pub mod doppler { pub f: u8, } + impl FriendlyName for Doppler { + fn friendly_name() -> &'static str { + "Doppler" + } + } + + impl MessageDisplay for Doppler { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for Doppler { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN; fn len(&self) -> usize { @@ -351,6 +399,18 @@ pub mod ephemeris_common_content { pub health_bits: u8, } + impl FriendlyName for EphemerisCommonContent { + fn friendly_name() -> &'static str { + "EphemerisCommonContent" + } + } + + impl MessageDisplay for EphemerisCommonContent { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for EphemerisCommonContent { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -421,6 +481,18 @@ pub mod ephemeris_common_content_dep_a { pub health_bits: u8, } + impl FriendlyName for EphemerisCommonContentDepA { + fn friendly_name() -> &'static str { + "EphemerisCommonContentDepA" + } + } + + impl MessageDisplay for EphemerisCommonContentDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for EphemerisCommonContentDepA { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -490,6 +562,18 @@ pub mod ephemeris_common_content_dep_b { pub health_bits: u8, } + impl FriendlyName for EphemerisCommonContentDepB { + fn friendly_name() -> &'static str { + "EphemerisCommonContentDepB" + } + } + + impl MessageDisplay for EphemerisCommonContentDepB { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for EphemerisCommonContentDepB { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -586,6 +670,18 @@ pub mod gnss_capb { pub gal_e5: u64, } + impl FriendlyName for GnssCapb { + fn friendly_name() -> &'static str { + "GnssCapb" + } + } + + impl MessageDisplay for GnssCapb { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for GnssCapb { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -739,6 +835,18 @@ pub mod msg_almanac_glo { } } + impl FriendlyName for MsgAlmanacGlo { + fn friendly_name() -> &'static str { + "ALMANAC GLO" + } + } + + impl MessageDisplay for MsgAlmanacGlo { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgAlmanacGlo { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -865,6 +973,18 @@ pub mod msg_almanac_glo_dep { } } + impl FriendlyName for MsgAlmanacGloDep { + fn friendly_name() -> &'static str { + "ALMANAC GLO DEP" + } + } + + impl MessageDisplay for MsgAlmanacGloDep { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgAlmanacGloDep { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -996,6 +1116,18 @@ pub mod msg_almanac_gps { } } + impl FriendlyName for MsgAlmanacGps { + fn friendly_name() -> &'static str { + "ALMANAC GPS" + } + } + + impl MessageDisplay for MsgAlmanacGps { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgAlmanacGps { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -1135,6 +1267,18 @@ pub mod msg_almanac_gps_dep { } } + impl FriendlyName for MsgAlmanacGpsDep { + fn friendly_name() -> &'static str { + "ALMANAC GPS DEP" + } + } + + impl MessageDisplay for MsgAlmanacGpsDep { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgAlmanacGpsDep { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -1254,6 +1398,18 @@ pub mod msg_base_pos_ecef { } } + impl FriendlyName for MsgBasePosEcef { + fn friendly_name() -> &'static str { + "BASE POS ECEF" + } + } + + impl MessageDisplay for MsgBasePosEcef { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgBasePosEcef { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -1342,6 +1498,18 @@ pub mod msg_base_pos_llh { } } + impl FriendlyName for MsgBasePosLlh { + fn friendly_name() -> &'static str { + "BASE POS LLH" + } + } + + impl MessageDisplay for MsgBasePosLlh { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgBasePosLlh { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -1501,6 +1669,18 @@ pub mod msg_ephemeris_bds { } } + impl FriendlyName for MsgEphemerisBds { + fn friendly_name() -> &'static str { + "EPH BDS" + } + } + + impl MessageDisplay for MsgEphemerisBds { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgEphemerisBds { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -1745,6 +1925,18 @@ pub mod msg_ephemeris_dep_a { } } + impl FriendlyName for MsgEphemerisDepA { + fn friendly_name() -> &'static str { + "EPH DEP A" + } + } + + impl MessageDisplay for MsgEphemerisDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgEphemerisDepA { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -2000,6 +2192,18 @@ pub mod msg_ephemeris_dep_b { } } + impl FriendlyName for MsgEphemerisDepB { + fn friendly_name() -> &'static str { + "EPH DEP B" + } + } + + impl MessageDisplay for MsgEphemerisDepB { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgEphemerisDepB { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -2268,6 +2472,18 @@ pub mod msg_ephemeris_dep_c { } } + impl FriendlyName for MsgEphemerisDepC { + fn friendly_name() -> &'static str { + "EPH DEP C" + } + } + + impl MessageDisplay for MsgEphemerisDepC { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgEphemerisDepC { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -2544,6 +2760,18 @@ pub mod msg_ephemeris_dep_d { } } + impl FriendlyName for MsgEphemerisDepD { + fn friendly_name() -> &'static str { + "EPH DEP D" + } + } + + impl MessageDisplay for MsgEphemerisDepD { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgEphemerisDepD { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -2808,6 +3036,18 @@ pub mod msg_ephemeris_gal { } } + impl FriendlyName for MsgEphemerisGal { + fn friendly_name() -> &'static str { + "EPH GAL" + } + } + + impl MessageDisplay for MsgEphemerisGal { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgEphemerisGal { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -3051,6 +3291,18 @@ pub mod msg_ephemeris_gal_dep_a { } } + impl FriendlyName for MsgEphemerisGalDepA { + fn friendly_name() -> &'static str { + "EPH GAL DEP A" + } + } + + impl MessageDisplay for MsgEphemerisGalDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgEphemerisGalDepA { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -3243,6 +3495,18 @@ pub mod msg_ephemeris_glo { } } + impl FriendlyName for MsgEphemerisGlo { + fn friendly_name() -> &'static str { + "EPH GLO" + } + } + + impl MessageDisplay for MsgEphemerisGlo { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgEphemerisGlo { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -3366,6 +3630,18 @@ pub mod msg_ephemeris_glo_dep_a { } } + impl FriendlyName for MsgEphemerisGloDepA { + fn friendly_name() -> &'static str { + "EPH GLO DEP A" + } + } + + impl MessageDisplay for MsgEphemerisGloDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgEphemerisGloDepA { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -3477,6 +3753,18 @@ pub mod msg_ephemeris_glo_dep_b { } } + impl FriendlyName for MsgEphemerisGloDepB { + fn friendly_name() -> &'static str { + "EPH GLO DEP B" + } + } + + impl MessageDisplay for MsgEphemerisGloDepB { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgEphemerisGloDepB { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -3594,6 +3882,18 @@ pub mod msg_ephemeris_glo_dep_c { } } + impl FriendlyName for MsgEphemerisGloDepC { + fn friendly_name() -> &'static str { + "EPH GLO DEP C" + } + } + + impl MessageDisplay for MsgEphemerisGloDepC { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgEphemerisGloDepC { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -3720,6 +4020,18 @@ pub mod msg_ephemeris_glo_dep_d { } } + impl FriendlyName for MsgEphemerisGloDepD { + fn friendly_name() -> &'static str { + "EPH GLO DEP D" + } + } + + impl MessageDisplay for MsgEphemerisGloDepD { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgEphemerisGloDepD { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -3898,6 +4210,18 @@ pub mod msg_ephemeris_gps { } } + impl FriendlyName for MsgEphemerisGps { + fn friendly_name() -> &'static str { + "EPH GPS" + } + } + + impl MessageDisplay for MsgEphemerisGps { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgEphemerisGps { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -4132,6 +4456,18 @@ pub mod msg_ephemeris_gps_dep_e { } } + impl FriendlyName for MsgEphemerisGpsDepE { + fn friendly_name() -> &'static str { + "EPH GPS DEP E" + } + } + + impl MessageDisplay for MsgEphemerisGpsDepE { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgEphemerisGpsDepE { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -4364,6 +4700,18 @@ pub mod msg_ephemeris_gps_dep_f { } } + impl FriendlyName for MsgEphemerisGpsDepF { + fn friendly_name() -> &'static str { + "EPH GPS DEP F" + } + } + + impl MessageDisplay for MsgEphemerisGpsDepF { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgEphemerisGpsDepF { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -4596,6 +4944,18 @@ pub mod msg_ephemeris_qzss { } } + impl FriendlyName for MsgEphemerisQzss { + fn friendly_name() -> &'static str { + "EPH QZSS" + } + } + + impl MessageDisplay for MsgEphemerisQzss { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgEphemerisQzss { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -4768,6 +5128,18 @@ pub mod msg_ephemeris_sbas { } } + impl FriendlyName for MsgEphemerisSbas { + fn friendly_name() -> &'static str { + "EPH SBAS" + } + } + + impl MessageDisplay for MsgEphemerisSbas { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgEphemerisSbas { const MIN_LEN: usize = ::MIN_LEN + <[f64; 3] as WireFormat>::MIN_LEN @@ -4872,6 +5244,18 @@ pub mod msg_ephemeris_sbas_dep_a { } } + impl FriendlyName for MsgEphemerisSbasDepA { + fn friendly_name() -> &'static str { + "EPH SBAS DEP A" + } + } + + impl MessageDisplay for MsgEphemerisSbasDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgEphemerisSbasDepA { const MIN_LEN: usize = ::MIN_LEN + <[f64; 3] as WireFormat>::MIN_LEN @@ -4981,6 +5365,18 @@ pub mod msg_ephemeris_sbas_dep_b { } } + impl FriendlyName for MsgEphemerisSbasDepB { + fn friendly_name() -> &'static str { + "EPH SBAS DEP B" + } + } + + impl MessageDisplay for MsgEphemerisSbasDepB { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgEphemerisSbasDepB { const MIN_LEN: usize = ::MIN_LEN + <[f64; 3] as WireFormat>::MIN_LEN @@ -5088,6 +5484,18 @@ pub mod msg_glo_biases { } } + impl FriendlyName for MsgGloBiases { + fn friendly_name() -> &'static str { + "GLO BIASES" + } + } + + impl MessageDisplay for MsgGloBiases { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgGloBiases { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -5176,6 +5584,18 @@ pub mod msg_gnss_capb { } } + impl FriendlyName for MsgGnssCapb { + fn friendly_name() -> &'static str { + "GNSS CAPB" + } + } + + impl MessageDisplay for MsgGnssCapb { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgGnssCapb { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN; @@ -5265,6 +5685,18 @@ pub mod msg_group_delay { } } + impl FriendlyName for MsgGroupDelay { + fn friendly_name() -> &'static str { + "GROUP DELAY" + } + } + + impl MessageDisplay for MsgGroupDelay { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgGroupDelay { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -5371,6 +5803,18 @@ pub mod msg_group_delay_dep_a { } } + impl FriendlyName for MsgGroupDelayDepA { + fn friendly_name() -> &'static str { + "GROUP DELAY DEP A" + } + } + + impl MessageDisplay for MsgGroupDelayDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgGroupDelayDepA { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -5477,6 +5921,18 @@ pub mod msg_group_delay_dep_b { } } + impl FriendlyName for MsgGroupDelayDepB { + fn friendly_name() -> &'static str { + "GROUP DELAY DEP B" + } + } + + impl MessageDisplay for MsgGroupDelayDepB { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgGroupDelayDepB { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -5588,6 +6044,18 @@ pub mod msg_iono { } } + impl FriendlyName for MsgIono { + fn friendly_name() -> &'static str { + "IONO" + } + } + + impl MessageDisplay for MsgIono { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgIono { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -5714,6 +6182,18 @@ pub mod msg_obs { } } + impl FriendlyName for MsgObs { + fn friendly_name() -> &'static str { + "OBS" + } + } + + impl MessageDisplay for MsgObs { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgObs { const MIN_LEN: usize = ::MIN_LEN + as WireFormat>::MIN_LEN; @@ -5806,6 +6286,18 @@ pub mod msg_obs_dep_a { } } + impl FriendlyName for MsgObsDepA { + fn friendly_name() -> &'static str { + "OBS DEP A" + } + } + + impl MessageDisplay for MsgObsDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgObsDepA { const MIN_LEN: usize = ::MIN_LEN + as WireFormat>::MIN_LEN; @@ -5901,6 +6393,18 @@ pub mod msg_obs_dep_b { } } + impl FriendlyName for MsgObsDepB { + fn friendly_name() -> &'static str { + "OBS DEP B" + } + } + + impl MessageDisplay for MsgObsDepB { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgObsDepB { const MIN_LEN: usize = ::MIN_LEN + as WireFormat>::MIN_LEN; @@ -5998,6 +6502,18 @@ pub mod msg_obs_dep_c { } } + impl FriendlyName for MsgObsDepC { + fn friendly_name() -> &'static str { + "OBS DEP C" + } + } + + impl MessageDisplay for MsgObsDepC { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgObsDepC { const MIN_LEN: usize = ::MIN_LEN + as WireFormat>::MIN_LEN; @@ -6091,6 +6607,18 @@ pub mod msg_osr { } } + impl FriendlyName for MsgOsr { + fn friendly_name() -> &'static str { + "OSR" + } + } + + impl MessageDisplay for MsgOsr { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgOsr { const MIN_LEN: usize = ::MIN_LEN + as WireFormat>::MIN_LEN; @@ -6168,6 +6696,18 @@ pub mod msg_sv_az_el { } } + impl FriendlyName for MsgSvAzEl { + fn friendly_name() -> &'static str { + "SV AZ EL" + } + } + + impl MessageDisplay for MsgSvAzEl { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSvAzEl { const MIN_LEN: usize = as WireFormat>::MIN_LEN; fn len(&self) -> usize { @@ -6244,6 +6784,18 @@ pub mod msg_sv_configuration_gps_dep { } } + impl FriendlyName for MsgSvConfigurationGpsDep { + fn friendly_name() -> &'static str { + "SV CONFIGURATION GPS DEP" + } + } + + impl MessageDisplay for MsgSvConfigurationGpsDep { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSvConfigurationGpsDep { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN; fn len(&self) -> usize { @@ -6287,6 +6839,18 @@ pub mod observation_header { pub n_obs: u8, } + impl FriendlyName for ObservationHeader { + fn friendly_name() -> &'static str { + "ObservationHeader" + } + } + + impl MessageDisplay for ObservationHeader { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for ObservationHeader { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN; fn len(&self) -> usize { @@ -6329,6 +6893,18 @@ pub mod observation_header_dep { pub n_obs: u8, } + impl FriendlyName for ObservationHeaderDep { + fn friendly_name() -> &'static str { + "ObservationHeaderDep" + } + } + + impl MessageDisplay for ObservationHeaderDep { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for ObservationHeaderDep { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN; fn len(&self) -> usize { @@ -6470,6 +7046,18 @@ pub mod packed_obs_content { } } + impl FriendlyName for PackedObsContent { + fn friendly_name() -> &'static str { + "PackedObsContent" + } + } + + impl MessageDisplay for PackedObsContent { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for PackedObsContent { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -6710,6 +7298,18 @@ pub mod packed_obs_content_dep_a { pub prn: u8, } + impl FriendlyName for PackedObsContentDepA { + fn friendly_name() -> &'static str { + "PackedObsContentDepA" + } + } + + impl MessageDisplay for PackedObsContentDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for PackedObsContentDepA { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -6777,6 +7377,18 @@ pub mod packed_obs_content_dep_b { pub sid: GnssSignalDep, } + impl FriendlyName for PackedObsContentDepB { + fn friendly_name() -> &'static str { + "PackedObsContentDepB" + } + } + + impl MessageDisplay for PackedObsContentDepB { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for PackedObsContentDepB { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -6845,6 +7457,18 @@ pub mod packed_obs_content_dep_c { pub sid: GnssSignalDep, } + impl FriendlyName for PackedObsContentDepC { + fn friendly_name() -> &'static str { + "PackedObsContentDepC" + } + } + + impl MessageDisplay for PackedObsContentDepC { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for PackedObsContentDepC { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -7001,6 +7625,18 @@ pub mod packed_osr_content { } } + impl FriendlyName for PackedOsrContent { + fn friendly_name() -> &'static str { + "PackedOsrContent" + } + } + + impl MessageDisplay for PackedOsrContent { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for PackedOsrContent { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -7233,6 +7869,18 @@ pub mod sv_az_el { pub el: i8, } + impl FriendlyName for SvAzEl { + fn friendly_name() -> &'static str { + "SvAzEl" + } + } + + impl MessageDisplay for SvAzEl { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for SvAzEl { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN diff --git a/rust/sbp/src/messages/orientation.rs b/rust/sbp/src/messages/orientation.rs index a1c203f327..4f3ac0af9a 100644 --- a/rust/sbp/src/messages/orientation.rs +++ b/rust/sbp/src/messages/orientation.rs @@ -118,6 +118,18 @@ pub mod msg_angular_rate { } } + impl FriendlyName for MsgAngularRate { + fn friendly_name() -> &'static str { + "ANGULAR RATE" + } + } + + impl MessageDisplay for MsgAngularRate { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgAngularRate { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -274,6 +286,18 @@ pub mod msg_baseline_heading { } } + impl FriendlyName for MsgBaselineHeading { + fn friendly_name() -> &'static str { + "BASELINE HEADING" + } + } + + impl MessageDisplay for MsgBaselineHeading { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgBaselineHeading { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -449,6 +473,18 @@ pub mod msg_orient_euler { } } + impl FriendlyName for MsgOrientEuler { + fn friendly_name() -> &'static str { + "ORIENT EULER" + } + } + + impl MessageDisplay for MsgOrientEuler { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgOrientEuler { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -636,6 +672,18 @@ pub mod msg_orient_quat { } } + impl FriendlyName for MsgOrientQuat { + fn friendly_name() -> &'static str { + "ORIENT QUAT" + } + } + + impl MessageDisplay for MsgOrientQuat { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgOrientQuat { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN diff --git a/rust/sbp/src/messages/piksi.rs b/rust/sbp/src/messages/piksi.rs index 8511ff5e9c..4fb8a1bad4 100644 --- a/rust/sbp/src/messages/piksi.rs +++ b/rust/sbp/src/messages/piksi.rs @@ -77,6 +77,21 @@ pub mod latency { pub current: i32, } + impl FriendlyName for Latency { + fn friendly_name() -> &'static str { + "Latency" + } + } + + impl MessageDisplay for Latency { + fn message_display(&self) -> String { + format!( + "{:1} {:1} {:1} {:1}", + self.avg, self.lmin, self.lmax, self.current + ) + } + } + impl WireFormat for Latency { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -159,6 +174,18 @@ pub mod msg_almanac { } } + impl FriendlyName for MsgAlmanac { + fn friendly_name() -> &'static str { + "ALMANAC" + } + } + + impl MessageDisplay for MsgAlmanac { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgAlmanac { const MIN_LEN: usize = 0; fn len(&self) -> usize { @@ -235,6 +262,21 @@ pub mod msg_cell_modem_status { } } + impl FriendlyName for MsgCellModemStatus { + fn friendly_name() -> &'static str { + "CELL MODEM STATUS" + } + } + + impl MessageDisplay for MsgCellModemStatus { + fn message_display(&self) -> String { + format!( + "{} dBm | {:1} %", + self.signal_strength, self.signal_error_rate + ) + } + } + impl WireFormat for MsgCellModemStatus { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -321,6 +363,18 @@ pub mod msg_command_output { } } + impl FriendlyName for MsgCommandOutput { + fn friendly_name() -> &'static str { + "COMMAND OUTPUT" + } + } + + impl MessageDisplay for MsgCommandOutput { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgCommandOutput { const MIN_LEN: usize = ::MIN_LEN + , Unterminated> as WireFormat>::MIN_LEN; @@ -402,6 +456,18 @@ pub mod msg_command_req { } } + impl FriendlyName for MsgCommandReq { + fn friendly_name() -> &'static str { + "COMMAND REQ" + } + } + + impl MessageDisplay for MsgCommandReq { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgCommandReq { const MIN_LEN: usize = ::MIN_LEN + , NullTerminated> as WireFormat>::MIN_LEN; @@ -482,6 +548,18 @@ pub mod msg_command_resp { } } + impl FriendlyName for MsgCommandResp { + fn friendly_name() -> &'static str { + "COMMAND RESP" + } + } + + impl MessageDisplay for MsgCommandResp { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgCommandResp { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN; fn len(&self) -> usize { @@ -556,6 +634,18 @@ pub mod msg_cw_results { } } + impl FriendlyName for MsgCwResults { + fn friendly_name() -> &'static str { + "CW RESULTS" + } + } + + impl MessageDisplay for MsgCwResults { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgCwResults { const MIN_LEN: usize = 0; fn len(&self) -> usize { @@ -623,6 +713,18 @@ pub mod msg_cw_start { } } + impl FriendlyName for MsgCwStart { + fn friendly_name() -> &'static str { + "CW START" + } + } + + impl MessageDisplay for MsgCwStart { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgCwStart { const MIN_LEN: usize = 0; fn len(&self) -> usize { @@ -705,6 +807,21 @@ pub mod msg_device_monitor { } } + impl FriendlyName for MsgDeviceMonitor { + fn friendly_name() -> &'static str { + "DEVICE MONITOR" + } + } + + impl MessageDisplay for MsgDeviceMonitor { + fn message_display(&self) -> String { + format!( + "Vin: {:2} V | Tcpu: {:1} C | Trf: {:1} C", + self.dev_vin, self.cpu_temperature, self.fe_temperature + ) + } + } + impl WireFormat for MsgDeviceMonitor { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -803,6 +920,18 @@ pub mod msg_front_end_gain { } } + impl FriendlyName for MsgFrontEndGain { + fn friendly_name() -> &'static str { + "FRONT END GAIN" + } + } + + impl MessageDisplay for MsgFrontEndGain { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgFrontEndGain { const MIN_LEN: usize = <[i8; 8] as WireFormat>::MIN_LEN + <[i8; 8] as WireFormat>::MIN_LEN; fn len(&self) -> usize { @@ -880,6 +1009,18 @@ pub mod msg_iar_state { } } + impl FriendlyName for MsgIarState { + fn friendly_name() -> &'static str { + "IAR STATE" + } + } + + impl MessageDisplay for MsgIarState { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgIarState { const MIN_LEN: usize = ::MIN_LEN; fn len(&self) -> usize { @@ -950,6 +1091,18 @@ pub mod msg_init_base_dep { } } + impl FriendlyName for MsgInitBaseDep { + fn friendly_name() -> &'static str { + "INIT BASE DEP" + } + } + + impl MessageDisplay for MsgInitBaseDep { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgInitBaseDep { const MIN_LEN: usize = 0; fn len(&self) -> usize { @@ -1052,6 +1205,18 @@ pub mod msg_mask_satellite { } } + impl FriendlyName for MsgMaskSatellite { + fn friendly_name() -> &'static str { + "MASK SATELLITE" + } + } + + impl MessageDisplay for MsgMaskSatellite { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgMaskSatellite { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN; fn len(&self) -> usize { @@ -1224,6 +1389,18 @@ pub mod msg_mask_satellite_dep { } } + impl FriendlyName for MsgMaskSatelliteDep { + fn friendly_name() -> &'static str { + "MASK SATELLITE DEP" + } + } + + impl MessageDisplay for MsgMaskSatelliteDep { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgMaskSatelliteDep { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN; fn len(&self) -> usize { @@ -1363,6 +1540,18 @@ pub mod msg_network_bandwidth_usage { } } + impl FriendlyName for MsgNetworkBandwidthUsage { + fn friendly_name() -> &'static str { + "NET BANDWIDTH USAGE" + } + } + + impl MessageDisplay for MsgNetworkBandwidthUsage { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgNetworkBandwidthUsage { const MIN_LEN: usize = as WireFormat>::MIN_LEN; fn len(&self) -> usize { @@ -1434,6 +1623,18 @@ pub mod msg_network_state_req { } } + impl FriendlyName for MsgNetworkStateReq { + fn friendly_name() -> &'static str { + "NET STATE REQ" + } + } + + impl MessageDisplay for MsgNetworkStateReq { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgNetworkStateReq { const MIN_LEN: usize = 0; fn len(&self) -> usize { @@ -1744,6 +1945,18 @@ pub mod msg_network_state_resp { } } + impl FriendlyName for MsgNetworkStateResp { + fn friendly_name() -> &'static str { + "NET STATE RESP" + } + } + + impl MessageDisplay for MsgNetworkStateResp { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgNetworkStateResp { const MIN_LEN: usize = <[u8; 4] as WireFormat>::MIN_LEN + ::MIN_LEN @@ -1861,6 +2074,18 @@ pub mod msg_reset { } } + impl FriendlyName for MsgReset { + fn friendly_name() -> &'static str { + "RESET" + } + } + + impl MessageDisplay for MsgReset { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgReset { const MIN_LEN: usize = ::MIN_LEN; fn len(&self) -> usize { @@ -1963,6 +2188,18 @@ pub mod msg_reset_dep { } } + impl FriendlyName for MsgResetDep { + fn friendly_name() -> &'static str { + "RESET DEP" + } + } + + impl MessageDisplay for MsgResetDep { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgResetDep { const MIN_LEN: usize = 0; fn len(&self) -> usize { @@ -2051,6 +2288,18 @@ pub mod msg_reset_filters { } } + impl FriendlyName for MsgResetFilters { + fn friendly_name() -> &'static str { + "RESET FILTERS" + } + } + + impl MessageDisplay for MsgResetFilters { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgResetFilters { const MIN_LEN: usize = ::MIN_LEN; fn len(&self) -> usize { @@ -2157,6 +2406,18 @@ pub mod msg_set_time { } } + impl FriendlyName for MsgSetTime { + fn friendly_name() -> &'static str { + "SET TIME" + } + } + + impl MessageDisplay for MsgSetTime { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSetTime { const MIN_LEN: usize = 0; fn len(&self) -> usize { @@ -2243,6 +2504,18 @@ pub mod msg_specan { } } + impl FriendlyName for MsgSpecan { + fn friendly_name() -> &'static str { + "SPECTRUM ANALYZER" + } + } + + impl MessageDisplay for MsgSpecan { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSpecan { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -2358,6 +2631,18 @@ pub mod msg_specan_dep { } } + impl FriendlyName for MsgSpecanDep { + fn friendly_name() -> &'static str { + "SPECAN DEP" + } + } + + impl MessageDisplay for MsgSpecanDep { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSpecanDep { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -2464,6 +2749,18 @@ pub mod msg_thread_state { } } + impl FriendlyName for MsgThreadState { + fn friendly_name() -> &'static str { + "THREAD STATE" + } + } + + impl MessageDisplay for MsgThreadState { + fn message_display(&self) -> String { + format!("{} | {:1} | {} B", self.name, self.cpu, self.stack_free) + } + } + impl WireFormat for MsgThreadState { const MIN_LEN: usize = as WireFormat>::MIN_LEN + ::MIN_LEN @@ -2564,6 +2861,25 @@ pub mod msg_uart_state { } } + impl FriendlyName for MsgUartState { + fn friendly_name() -> &'static str { + "UART STATE" + } + } + + impl MessageDisplay for MsgUartState { + fn message_display(&self) -> String { + format!( + "{} | {} | {} | {} | {}", + self.uart_a.message_display(), + self.uart_b.message_display(), + self.uart_ftdi.message_display(), + self.latency.message_display(), + self.obs_period.message_display() + ) + } + } + impl WireFormat for MsgUartState { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -2662,6 +2978,18 @@ pub mod msg_uart_state_depa { } } + impl FriendlyName for MsgUartStateDepa { + fn friendly_name() -> &'static str { + "UART STATE DEPA" + } + } + + impl MessageDisplay for MsgUartStateDepa { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgUartStateDepa { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -2727,6 +3055,18 @@ pub mod network_usage { pub interface_name: SbpString<[u8; 16], Unterminated>, } + impl FriendlyName for NetworkUsage { + fn friendly_name() -> &'static str { + "NetworkUsage" + } + } + + impl MessageDisplay for NetworkUsage { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for NetworkUsage { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -2793,6 +3133,21 @@ pub mod period { pub current: i32, } + impl FriendlyName for Period { + fn friendly_name() -> &'static str { + "Period" + } + } + + impl MessageDisplay for Period { + fn message_display(&self) -> String { + format!( + "{:1} {:1} {:1} {:1}", + self.avg, self.pmin, self.pmax, self.current + ) + } + } + impl WireFormat for Period { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -2857,6 +3212,26 @@ pub mod uart_channel { pub rx_buffer_level: u8, } + impl FriendlyName for UARTChannel { + fn friendly_name() -> &'static str { + "UARTChannel" + } + } + + impl MessageDisplay for UARTChannel { + fn message_display(&self) -> String { + format!( + "{:1} {:1} {} {} {:1} {:1}", + self.tx_throughput, + self.rx_throughput, + self.crc_error_count, + self.io_error_count, + self.tx_buffer_level, + self.rx_buffer_level + ) + } + } + impl WireFormat for UARTChannel { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN diff --git a/rust/sbp/src/messages/sbas.rs b/rust/sbp/src/messages/sbas.rs index 7f8433cfe7..1e4fd65e48 100644 --- a/rust/sbp/src/messages/sbas.rs +++ b/rust/sbp/src/messages/sbas.rs @@ -90,6 +90,18 @@ pub mod msg_sbas_raw { } } + impl FriendlyName for MsgSbasRaw { + fn friendly_name() -> &'static str { + "SBAS RAW" + } + } + + impl MessageDisplay for MsgSbasRaw { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSbasRaw { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN diff --git a/rust/sbp/src/messages/settings.rs b/rust/sbp/src/messages/settings.rs index 4f316bf587..eb587c8af3 100644 --- a/rust/sbp/src/messages/settings.rs +++ b/rust/sbp/src/messages/settings.rs @@ -101,6 +101,18 @@ pub mod msg_settings_read_by_index_done { } } + impl FriendlyName for MsgSettingsReadByIndexDone { + fn friendly_name() -> &'static str { + "SETTINGS READ BY IDX DONE" + } + } + + impl MessageDisplay for MsgSettingsReadByIndexDone { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSettingsReadByIndexDone { const MIN_LEN: usize = 0; fn len(&self) -> usize { @@ -170,6 +182,18 @@ pub mod msg_settings_read_by_index_req { } } + impl FriendlyName for MsgSettingsReadByIndexReq { + fn friendly_name() -> &'static str { + "SETTINGS READ BY IDX REQ" + } + } + + impl MessageDisplay for MsgSettingsReadByIndexReq { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSettingsReadByIndexReq { const MIN_LEN: usize = ::MIN_LEN; fn len(&self) -> usize { @@ -256,6 +280,18 @@ pub mod msg_settings_read_by_index_resp { } } + impl FriendlyName for MsgSettingsReadByIndexResp { + fn friendly_name() -> &'static str { + "SETTINGS READ BY IDX RESP" + } + } + + impl MessageDisplay for MsgSettingsReadByIndexResp { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSettingsReadByIndexResp { const MIN_LEN: usize = ::MIN_LEN + , Multipart> as WireFormat>::MIN_LEN; @@ -339,6 +375,18 @@ pub mod msg_settings_read_req { } } + impl FriendlyName for MsgSettingsReadReq { + fn friendly_name() -> &'static str { + "SETTINGS READ REQ" + } + } + + impl MessageDisplay for MsgSettingsReadReq { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSettingsReadReq { const MIN_LEN: usize = , Multipart> as WireFormat>::MIN_LEN; fn len(&self) -> usize { @@ -417,6 +465,18 @@ pub mod msg_settings_read_resp { } } + impl FriendlyName for MsgSettingsReadResp { + fn friendly_name() -> &'static str { + "SETTINGS READ RESP" + } + } + + impl MessageDisplay for MsgSettingsReadResp { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSettingsReadResp { const MIN_LEN: usize = , Multipart> as WireFormat>::MIN_LEN; fn len(&self) -> usize { @@ -492,6 +552,18 @@ pub mod msg_settings_register { } } + impl FriendlyName for MsgSettingsRegister { + fn friendly_name() -> &'static str { + "SETTINGS REGISTER" + } + } + + impl MessageDisplay for MsgSettingsRegister { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSettingsRegister { const MIN_LEN: usize = , Multipart> as WireFormat>::MIN_LEN; fn len(&self) -> usize { @@ -588,6 +660,18 @@ pub mod msg_settings_register_resp { } } + impl FriendlyName for MsgSettingsRegisterResp { + fn friendly_name() -> &'static str { + "SETTINGS REGISTER RESP" + } + } + + impl MessageDisplay for MsgSettingsRegisterResp { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSettingsRegisterResp { const MIN_LEN: usize = ::MIN_LEN + , Multipart> as WireFormat>::MIN_LEN; @@ -713,6 +797,18 @@ pub mod msg_settings_save { } } + impl FriendlyName for MsgSettingsSave { + fn friendly_name() -> &'static str { + "SETTINGS SAVE" + } + } + + impl MessageDisplay for MsgSettingsSave { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSettingsSave { const MIN_LEN: usize = 0; fn len(&self) -> usize { @@ -787,6 +883,18 @@ pub mod msg_settings_write { } } + impl FriendlyName for MsgSettingsWrite { + fn friendly_name() -> &'static str { + "SETTINGS WRITE" + } + } + + impl MessageDisplay for MsgSettingsWrite { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSettingsWrite { const MIN_LEN: usize = , Multipart> as WireFormat>::MIN_LEN; fn len(&self) -> usize { @@ -885,6 +993,18 @@ pub mod msg_settings_write_resp { } } + impl FriendlyName for MsgSettingsWriteResp { + fn friendly_name() -> &'static str { + "SETTINGS WRITE RESP" + } + } + + impl MessageDisplay for MsgSettingsWriteResp { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSettingsWriteResp { const MIN_LEN: usize = ::MIN_LEN + , Multipart> as WireFormat>::MIN_LEN; diff --git a/rust/sbp/src/messages/signing.rs b/rust/sbp/src/messages/signing.rs index 79c4a0581c..cb4939ba3d 100644 --- a/rust/sbp/src/messages/signing.rs +++ b/rust/sbp/src/messages/signing.rs @@ -77,6 +77,18 @@ pub mod msg_ed25519_certificate { } } + impl FriendlyName for MsgEd25519Certificate { + fn friendly_name() -> &'static str { + "ED25519 CERTIFICATE" + } + } + + impl MessageDisplay for MsgEd25519Certificate { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgEd25519Certificate { const MIN_LEN: usize = ::MIN_LEN + <[u8; 20] as WireFormat>::MIN_LEN @@ -173,6 +185,18 @@ pub mod msg_ed25519_signature { } } + impl FriendlyName for MsgEd25519Signature { + fn friendly_name() -> &'static str { + "ED25519 SIGNATURE" + } + } + + impl MessageDisplay for MsgEd25519Signature { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgEd25519Signature { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -264,6 +288,18 @@ pub mod msg_ed25519_signature_dep { } } + impl FriendlyName for MsgEd25519SignatureDep { + fn friendly_name() -> &'static str { + "ED25519 SIGNATURE DEP" + } + } + + impl MessageDisplay for MsgEd25519SignatureDep { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgEd25519SignatureDep { const MIN_LEN: usize = <[u8; 64] as WireFormat>::MIN_LEN + <[u8; 20] as WireFormat>::MIN_LEN diff --git a/rust/sbp/src/messages/solution_meta.rs b/rust/sbp/src/messages/solution_meta.rs index fdb90105dc..a9350d2738 100644 --- a/rust/sbp/src/messages/solution_meta.rs +++ b/rust/sbp/src/messages/solution_meta.rs @@ -60,6 +60,18 @@ pub mod gnss_input_type { } } + impl FriendlyName for GnssInputType { + fn friendly_name() -> &'static str { + "GNSSInputType" + } + } + + impl MessageDisplay for GnssInputType { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for GnssInputType { const MIN_LEN: usize = ::MIN_LEN; fn len(&self) -> usize { @@ -178,6 +190,18 @@ pub mod imu_input_type { } } + impl FriendlyName for ImuInputType { + fn friendly_name() -> &'static str { + "IMUInputType" + } + } + + impl MessageDisplay for ImuInputType { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for ImuInputType { const MIN_LEN: usize = ::MIN_LEN; fn len(&self) -> usize { @@ -442,6 +466,18 @@ pub mod msg_soln_meta { } } + impl FriendlyName for MsgSolnMeta { + fn friendly_name() -> &'static str { + "SOLN META" + } + } + + impl MessageDisplay for MsgSolnMeta { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSolnMeta { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -624,6 +660,18 @@ pub mod msg_soln_meta_dep_a { } } + impl FriendlyName for MsgSolnMetaDepA { + fn friendly_name() -> &'static str { + "SOLN META DEP A" + } + } + + impl MessageDisplay for MsgSolnMetaDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSolnMetaDepA { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -793,6 +841,18 @@ pub mod odo_input_type { } } + impl FriendlyName for OdoInputType { + fn friendly_name() -> &'static str { + "OdoInputType" + } + } + + impl MessageDisplay for OdoInputType { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for OdoInputType { const MIN_LEN: usize = ::MIN_LEN; fn len(&self) -> usize { @@ -974,6 +1034,18 @@ pub mod solution_input_type { } } + impl FriendlyName for SolutionInputType { + fn friendly_name() -> &'static str { + "SolutionInputType" + } + } + + impl MessageDisplay for SolutionInputType { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for SolutionInputType { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN; fn len(&self) -> usize { diff --git a/rust/sbp/src/messages/ssr.rs b/rust/sbp/src/messages/ssr.rs index a04d42fbc4..fe748af79b 100644 --- a/rust/sbp/src/messages/ssr.rs +++ b/rust/sbp/src/messages/ssr.rs @@ -78,6 +78,18 @@ pub mod bounds_header { pub sol_id: u8, } + impl FriendlyName for BoundsHeader { + fn friendly_name() -> &'static str { + "BoundsHeader" + } + } + + impl MessageDisplay for BoundsHeader { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for BoundsHeader { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -135,6 +147,18 @@ pub mod code_biases_content { pub value: i16, } + impl FriendlyName for CodeBiasesContent { + fn friendly_name() -> &'static str { + "CodeBiasesContent" + } + } + + impl MessageDisplay for CodeBiasesContent { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for CodeBiasesContent { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN; fn len(&self) -> usize { @@ -186,6 +210,18 @@ pub mod code_phase_biases_sat_sig { pub phase_bias_bound_sig: u8, } + impl FriendlyName for CodePhaseBiasesSatSig { + fn friendly_name() -> &'static str { + "CodePhaseBiasesSatSig" + } + } + + impl MessageDisplay for CodePhaseBiasesSatSig { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for CodePhaseBiasesSatSig { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -260,6 +296,18 @@ pub mod grid_definition_header_dep_a { pub seq_num: u8, } + impl FriendlyName for GridDefinitionHeaderDepA { + fn friendly_name() -> &'static str { + "GridDefinitionHeaderDepA" + } + } + + impl MessageDisplay for GridDefinitionHeaderDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for GridDefinitionHeaderDepA { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -340,6 +388,18 @@ pub mod gridded_correction_header { pub tropo_quality_indicator: u8, } + impl FriendlyName for GriddedCorrectionHeader { + fn friendly_name() -> &'static str { + "GriddedCorrectionHeader" + } + } + + impl MessageDisplay for GriddedCorrectionHeader { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for GriddedCorrectionHeader { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -422,6 +482,18 @@ pub mod gridded_correction_header_dep_a { pub tropo_quality_indicator: u8, } + impl FriendlyName for GriddedCorrectionHeaderDepA { + fn friendly_name() -> &'static str { + "GriddedCorrectionHeaderDepA" + } + } + + impl MessageDisplay for GriddedCorrectionHeaderDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for GriddedCorrectionHeaderDepA { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -530,6 +602,18 @@ pub mod msg_ssr_code_biases { } } + impl FriendlyName for MsgSsrCodeBiases { + fn friendly_name() -> &'static str { + "SSR CODE BIASES" + } + } + + impl MessageDisplay for MsgSsrCodeBiases { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSsrCodeBiases { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -627,6 +711,18 @@ pub mod msg_ssr_code_phase_biases_bounds { } } + impl FriendlyName for MsgSsrCodePhaseBiasesBounds { + fn friendly_name() -> &'static str { + "SSR CODE PHASE BIASES BOUNDS" + } + } + + impl MessageDisplay for MsgSsrCodePhaseBiasesBounds { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSsrCodePhaseBiasesBounds { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -727,6 +823,18 @@ pub mod msg_ssr_gridded_correction { } } + impl FriendlyName for MsgSsrGriddedCorrection { + fn friendly_name() -> &'static str { + "SSR GRIDDED CORRECTION" + } + } + + impl MessageDisplay for MsgSsrGriddedCorrection { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSsrGriddedCorrection { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -850,6 +958,18 @@ pub mod msg_ssr_gridded_correction_bounds { } } + impl FriendlyName for MsgSsrGriddedCorrectionBounds { + fn friendly_name() -> &'static str { + "SSR GRIDDED CORRECTION BOUNDS" + } + } + + impl MessageDisplay for MsgSsrGriddedCorrectionBounds { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSsrGriddedCorrectionBounds { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -976,6 +1096,18 @@ pub mod msg_ssr_gridded_correction_dep_a { } } + impl FriendlyName for MsgSsrGriddedCorrectionDepA { + fn friendly_name() -> &'static str { + "SSR GRIDDED CORRECTION DEP A" + } + } + + impl MessageDisplay for MsgSsrGriddedCorrectionDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSsrGriddedCorrectionDepA { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -1066,6 +1198,18 @@ pub mod msg_ssr_gridded_correction_no_std_dep_a { } } + impl FriendlyName for MsgSsrGriddedCorrectionNoStdDepA { + fn friendly_name() -> &'static str { + "SSR GRIDDED CORRECTION NO STD DEP A" + } + } + + impl MessageDisplay for MsgSsrGriddedCorrectionNoStdDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSsrGriddedCorrectionNoStdDepA { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -1153,6 +1297,18 @@ pub mod msg_ssr_grid_definition_dep_a { } } + impl FriendlyName for MsgSsrGridDefinitionDepA { + fn friendly_name() -> &'static str { + "SSR GRID DEFINITION DEP A" + } + } + + impl MessageDisplay for MsgSsrGridDefinitionDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSsrGridDefinitionDepA { const MIN_LEN: usize = ::MIN_LEN + as WireFormat>::MIN_LEN; @@ -1272,6 +1428,18 @@ pub mod msg_ssr_orbit_clock { } } + impl FriendlyName for MsgSsrOrbitClock { + fn friendly_name() -> &'static str { + "SSR ORBIT CLOCK" + } + } + + impl MessageDisplay for MsgSsrOrbitClock { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSsrOrbitClock { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -1413,6 +1581,18 @@ pub mod msg_ssr_orbit_clock_bounds { } } + impl FriendlyName for MsgSsrOrbitClockBounds { + fn friendly_name() -> &'static str { + "SSR ORBIT CLOCK BOUNDS" + } + } + + impl MessageDisplay for MsgSsrOrbitClockBounds { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSsrOrbitClockBounds { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -1512,6 +1692,18 @@ pub mod msg_ssr_orbit_clock_bounds_degradation { } } + impl FriendlyName for MsgSsrOrbitClockBoundsDegradation { + fn friendly_name() -> &'static str { + "SSR ORBIT CLOCK BOUNDS DEGRADATION" + } + } + + impl MessageDisplay for MsgSsrOrbitClockBoundsDegradation { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSsrOrbitClockBoundsDegradation { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -1638,6 +1830,18 @@ pub mod msg_ssr_orbit_clock_dep_a { } } + impl FriendlyName for MsgSsrOrbitClockDepA { + fn friendly_name() -> &'static str { + "SSR ORBIT CLOCK DEP A" + } + } + + impl MessageDisplay for MsgSsrOrbitClockDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSsrOrbitClockDepA { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -1793,6 +1997,18 @@ pub mod msg_ssr_phase_biases { } } + impl FriendlyName for MsgSsrPhaseBiases { + fn friendly_name() -> &'static str { + "SSR PHASE BIASES" + } + } + + impl MessageDisplay for MsgSsrPhaseBiases { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSsrPhaseBiases { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -1894,6 +2110,18 @@ pub mod msg_ssr_satellite_apc { } } + impl FriendlyName for MsgSsrSatelliteApc { + fn friendly_name() -> &'static str { + "SSR SATELLITE APC" + } + } + + impl MessageDisplay for MsgSsrSatelliteApc { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSsrSatelliteApc { const MIN_LEN: usize = as WireFormat>::MIN_LEN; fn len(&self) -> usize { @@ -1978,6 +2206,18 @@ pub mod msg_ssr_stec_correction { } } + impl FriendlyName for MsgSsrStecCorrection { + fn friendly_name() -> &'static str { + "SSR STEC CORRECTION" + } + } + + impl MessageDisplay for MsgSsrStecCorrection { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSsrStecCorrection { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -2079,6 +2319,18 @@ pub mod msg_ssr_stec_correction_dep { } } + impl FriendlyName for MsgSsrStecCorrectionDep { + fn friendly_name() -> &'static str { + "SSR STEC CORRECTION DEP" + } + } + + impl MessageDisplay for MsgSsrStecCorrectionDep { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSsrStecCorrectionDep { const MIN_LEN: usize = ::MIN_LEN + as WireFormat>::MIN_LEN; @@ -2154,6 +2406,18 @@ pub mod msg_ssr_stec_correction_dep_a { } } + impl FriendlyName for MsgSsrStecCorrectionDepA { + fn friendly_name() -> &'static str { + "SSR STEC CORRECTION DEP A" + } + } + + impl MessageDisplay for MsgSsrStecCorrectionDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSsrStecCorrectionDepA { const MIN_LEN: usize = ::MIN_LEN + as WireFormat>::MIN_LEN; @@ -2301,6 +2565,18 @@ pub mod msg_ssr_tile_definition { } } + impl FriendlyName for MsgSsrTileDefinition { + fn friendly_name() -> &'static str { + "SSR TILE DEFINITION" + } + } + + impl MessageDisplay for MsgSsrTileDefinition { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSsrTileDefinition { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -2478,6 +2754,18 @@ pub mod msg_ssr_tile_definition_dep { } } + impl FriendlyName for MsgSsrTileDefinitionDep { + fn friendly_name() -> &'static str { + "SSR TILE DEFINITION DEP" + } + } + + impl MessageDisplay for MsgSsrTileDefinitionDep { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSsrTileDefinitionDep { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -2572,6 +2860,18 @@ pub mod orbit_clock_bound { pub clock_bound_sig: u8, } + impl FriendlyName for OrbitClockBound { + fn friendly_name() -> &'static str { + "OrbitClockBound" + } + } + + impl MessageDisplay for OrbitClockBound { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for OrbitClockBound { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -2664,6 +2964,18 @@ pub mod orbit_clock_bound_degradation { pub clock_bound_sig_dot: u8, } + impl FriendlyName for OrbitClockBoundDegradation { + fn friendly_name() -> &'static str { + "OrbitClockBoundDegradation" + } + } + + impl MessageDisplay for OrbitClockBoundDegradation { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for OrbitClockBoundDegradation { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -2742,6 +3054,18 @@ pub mod phase_biases_content { pub bias: i32, } + impl FriendlyName for PhaseBiasesContent { + fn friendly_name() -> &'static str { + "PhaseBiasesContent" + } + } + + impl MessageDisplay for PhaseBiasesContent { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for PhaseBiasesContent { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -2815,6 +3139,18 @@ pub mod stec_header { pub iod_atmo: u8, } + impl FriendlyName for STECHeader { + fn friendly_name() -> &'static str { + "STECHeader" + } + } + + impl MessageDisplay for STECHeader { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for STECHeader { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -2890,6 +3226,18 @@ pub mod stec_header_dep_a { pub iod_atmo: u8, } + impl FriendlyName for STECHeaderDepA { + fn friendly_name() -> &'static str { + "STECHeaderDepA" + } + } + + impl MessageDisplay for STECHeaderDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for STECHeaderDepA { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -2950,6 +3298,18 @@ pub mod stec_residual { pub stddev: u8, } + impl FriendlyName for STECResidual { + fn friendly_name() -> &'static str { + "STECResidual" + } + } + + impl MessageDisplay for STECResidual { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for STECResidual { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -2997,6 +3357,18 @@ pub mod stec_residual_no_std { pub residual: i16, } + impl FriendlyName for STECResidualNoStd { + fn friendly_name() -> &'static str { + "STECResidualNoStd" + } + } + + impl MessageDisplay for STECResidualNoStd { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for STECResidualNoStd { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN; fn len(&self) -> usize { @@ -3043,6 +3415,18 @@ pub mod stec_sat_element { pub stec_coeff: [i16; 4], } + impl FriendlyName for STECSatElement { + fn friendly_name() -> &'static str { + "STECSatElement" + } + } + + impl MessageDisplay for STECSatElement { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for STECSatElement { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -3099,6 +3483,18 @@ pub mod stec_sat_element_integrity { pub stec_bound_sig_dot: u8, } + impl FriendlyName for STECSatElementIntegrity { + fn friendly_name() -> &'static str { + "STECSatElementIntegrity" + } + } + + impl MessageDisplay for STECSatElementIntegrity { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for STECSatElementIntegrity { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -3183,6 +3579,18 @@ pub mod satellite_apc { } } + impl FriendlyName for SatelliteAPC { + fn friendly_name() -> &'static str { + "SatelliteAPC" + } + } + + impl MessageDisplay for SatelliteAPC { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for SatelliteAPC { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -3363,6 +3771,18 @@ pub mod tropospheric_delay_correction { pub stddev: u8, } + impl FriendlyName for TroposphericDelayCorrection { + fn friendly_name() -> &'static str { + "TroposphericDelayCorrection" + } + } + + impl MessageDisplay for TroposphericDelayCorrection { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for TroposphericDelayCorrection { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -3410,6 +3830,18 @@ pub mod tropospheric_delay_correction_no_std { pub wet: i8, } + impl FriendlyName for TroposphericDelayCorrectionNoStd { + fn friendly_name() -> &'static str { + "TroposphericDelayCorrectionNoStd" + } + } + + impl MessageDisplay for TroposphericDelayCorrectionNoStd { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for TroposphericDelayCorrectionNoStd { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN; fn len(&self) -> usize { diff --git a/rust/sbp/src/messages/system.rs b/rust/sbp/src/messages/system.rs index 222938ebc0..0353d764e1 100644 --- a/rust/sbp/src/messages/system.rs +++ b/rust/sbp/src/messages/system.rs @@ -90,6 +90,18 @@ pub mod msg_csac_telemetry { } } + impl FriendlyName for MsgCsacTelemetry { + fn friendly_name() -> &'static str { + "CSAC TELEMETRY" + } + } + + impl MessageDisplay for MsgCsacTelemetry { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgCsacTelemetry { const MIN_LEN: usize = ::MIN_LEN + , Unterminated> as WireFormat>::MIN_LEN; @@ -171,6 +183,18 @@ pub mod msg_csac_telemetry_labels { } } + impl FriendlyName for MsgCsacTelemetryLabels { + fn friendly_name() -> &'static str { + "CSAC TELEMETRY LABELS" + } + } + + impl MessageDisplay for MsgCsacTelemetryLabels { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgCsacTelemetryLabels { const MIN_LEN: usize = ::MIN_LEN + , Unterminated> as WireFormat>::MIN_LEN; @@ -273,6 +297,18 @@ pub mod msg_dgnss_status { } } + impl FriendlyName for MsgDgnssStatus { + fn friendly_name() -> &'static str { + "DGNSS STATUS" + } + } + + impl MessageDisplay for MsgDgnssStatus { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgDgnssStatus { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -403,6 +439,18 @@ pub mod msg_gnss_time_offset { } } + impl FriendlyName for MsgGnssTimeOffset { + fn friendly_name() -> &'static str { + "GNSS TIME OFFSET" + } + } + + impl MessageDisplay for MsgGnssTimeOffset { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgGnssTimeOffset { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -515,6 +563,18 @@ pub mod msg_group_meta { } } + impl FriendlyName for MsgGroupMeta { + fn friendly_name() -> &'static str { + "GROUP META" + } + } + + impl MessageDisplay for MsgGroupMeta { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgGroupMeta { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -757,6 +817,18 @@ pub mod msg_heartbeat { } } + impl FriendlyName for MsgHeartbeat { + fn friendly_name() -> &'static str { + "HEARTBEAT" + } + } + + impl MessageDisplay for MsgHeartbeat { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgHeartbeat { const MIN_LEN: usize = ::MIN_LEN; fn len(&self) -> usize { @@ -1086,6 +1158,18 @@ pub mod msg_ins_status { } } + impl FriendlyName for MsgInsStatus { + fn friendly_name() -> &'static str { + "INS STATUS" + } + } + + impl MessageDisplay for MsgInsStatus { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgInsStatus { const MIN_LEN: usize = ::MIN_LEN; fn len(&self) -> usize { @@ -1696,6 +1780,18 @@ pub mod msg_ins_updates { } } + impl FriendlyName for MsgInsUpdates { + fn friendly_name() -> &'static str { + "INS UPDATES" + } + } + + impl MessageDisplay for MsgInsUpdates { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgInsUpdates { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -1832,6 +1928,18 @@ pub mod msg_pps_time { } } + impl FriendlyName for MsgPpsTime { + fn friendly_name() -> &'static str { + "PPS TIME" + } + } + + impl MessageDisplay for MsgPpsTime { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgPpsTime { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN; fn len(&self) -> usize { @@ -1986,6 +2094,18 @@ pub mod msg_sensor_aid_event { } } + impl FriendlyName for MsgSensorAidEvent { + fn friendly_name() -> &'static str { + "SENSOR AID EVENT" + } + } + + impl MessageDisplay for MsgSensorAidEvent { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgSensorAidEvent { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -2183,6 +2303,18 @@ pub mod msg_startup { } } + impl FriendlyName for MsgStartup { + fn friendly_name() -> &'static str { + "STARTUP" + } + } + + impl MessageDisplay for MsgStartup { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgStartup { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -2404,6 +2536,18 @@ pub mod msg_status_journal { } } + impl FriendlyName for MsgStatusJournal { + fn friendly_name() -> &'static str { + "STATUS JOURNAL" + } + } + + impl MessageDisplay for MsgStatusJournal { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgStatusJournal { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -2597,6 +2741,18 @@ pub mod msg_status_report { } } + impl FriendlyName for MsgStatusReport { + fn friendly_name() -> &'static str { + "STATUS REPORT" + } + } + + impl MessageDisplay for MsgStatusReport { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgStatusReport { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -2683,6 +2839,18 @@ pub mod status_journal_item { pub report: SubSystemReport, } + impl FriendlyName for StatusJournalItem { + fn friendly_name() -> &'static str { + "StatusJournalItem" + } + } + + impl MessageDisplay for StatusJournalItem { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for StatusJournalItem { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN; @@ -2758,6 +2926,18 @@ pub mod sub_system_report { } } + impl FriendlyName for SubSystemReport { + fn friendly_name() -> &'static str { + "SubSystemReport" + } + } + + impl MessageDisplay for SubSystemReport { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for SubSystemReport { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN diff --git a/rust/sbp/src/messages/tracking.rs b/rust/sbp/src/messages/tracking.rs index edcdcc343a..8fbc30e427 100644 --- a/rust/sbp/src/messages/tracking.rs +++ b/rust/sbp/src/messages/tracking.rs @@ -87,6 +87,18 @@ pub mod msg_measurement_state { } } + impl FriendlyName for MsgMeasurementState { + fn friendly_name() -> &'static str { + "MEAS STATE" + } + } + + impl MessageDisplay for MsgMeasurementState { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgMeasurementState { const MIN_LEN: usize = as WireFormat>::MIN_LEN; fn len(&self) -> usize { @@ -167,6 +179,18 @@ pub mod msg_tracking_iq { } } + impl FriendlyName for MsgTrackingIq { + fn friendly_name() -> &'static str { + "TRK IQ" + } + } + + impl MessageDisplay for MsgTrackingIq { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgTrackingIq { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -254,6 +278,18 @@ pub mod msg_tracking_iq_dep_a { } } + impl FriendlyName for MsgTrackingIqDepA { + fn friendly_name() -> &'static str { + "TRK IQ DEP A" + } + } + + impl MessageDisplay for MsgTrackingIqDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgTrackingIqDepA { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -342,6 +378,18 @@ pub mod msg_tracking_iq_dep_b { } } + impl FriendlyName for MsgTrackingIqDepB { + fn friendly_name() -> &'static str { + "TRK IQ DEP B" + } + } + + impl MessageDisplay for MsgTrackingIqDepB { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgTrackingIqDepB { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -425,6 +473,18 @@ pub mod msg_tracking_state { } } + impl FriendlyName for MsgTrackingState { + fn friendly_name() -> &'static str { + "TRK STATE" + } + } + + impl MessageDisplay for MsgTrackingState { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgTrackingState { const MIN_LEN: usize = as WireFormat>::MIN_LEN; fn len(&self) -> usize { @@ -498,6 +558,18 @@ pub mod msg_tracking_state_dep_a { } } + impl FriendlyName for MsgTrackingStateDepA { + fn friendly_name() -> &'static str { + "TRK STATE DEP A" + } + } + + impl MessageDisplay for MsgTrackingStateDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgTrackingStateDepA { const MIN_LEN: usize = as WireFormat>::MIN_LEN; fn len(&self) -> usize { @@ -571,6 +643,18 @@ pub mod msg_tracking_state_dep_b { } } + impl FriendlyName for MsgTrackingStateDepB { + fn friendly_name() -> &'static str { + "TRK STATE DEP B" + } + } + + impl MessageDisplay for MsgTrackingStateDepB { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgTrackingStateDepB { const MIN_LEN: usize = as WireFormat>::MIN_LEN; fn len(&self) -> usize { @@ -990,6 +1074,18 @@ pub mod msg_tracking_state_detailed_dep { } } + impl FriendlyName for MsgTrackingStateDetailedDep { + fn friendly_name() -> &'static str { + "TRK STATE DETAILED DEP" + } + } + + impl MessageDisplay for MsgTrackingStateDetailedDep { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgTrackingStateDetailedDep { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -2008,6 +2104,18 @@ pub mod msg_tracking_state_detailed_dep_a { } } + impl FriendlyName for MsgTrackingStateDetailedDepA { + fn friendly_name() -> &'static str { + "TRK STATE DETAILED DEP A" + } + } + + impl MessageDisplay for MsgTrackingStateDetailedDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgTrackingStateDetailedDepA { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -2650,6 +2758,18 @@ pub mod measurement_state { pub cn0: u8, } + impl FriendlyName for MeasurementState { + fn friendly_name() -> &'static str { + "MeasurementState" + } + } + + impl MessageDisplay for MeasurementState { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MeasurementState { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN; fn len(&self) -> usize { @@ -2691,6 +2811,18 @@ pub mod tracking_channel_correlation { pub q: i16, } + impl FriendlyName for TrackingChannelCorrelation { + fn friendly_name() -> &'static str { + "TrackingChannelCorrelation" + } + } + + impl MessageDisplay for TrackingChannelCorrelation { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for TrackingChannelCorrelation { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN; fn len(&self) -> usize { @@ -2732,6 +2864,18 @@ pub mod tracking_channel_correlation_dep { pub q: i32, } + impl FriendlyName for TrackingChannelCorrelationDep { + fn friendly_name() -> &'static str { + "TrackingChannelCorrelationDep" + } + } + + impl MessageDisplay for TrackingChannelCorrelationDep { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for TrackingChannelCorrelationDep { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN; fn len(&self) -> usize { @@ -2777,6 +2921,18 @@ pub mod tracking_channel_state { pub cn0: u8, } + impl FriendlyName for TrackingChannelState { + fn friendly_name() -> &'static str { + "TrackingChannelState" + } + } + + impl MessageDisplay for TrackingChannelState { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for TrackingChannelState { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -2841,6 +2997,18 @@ pub mod tracking_channel_state_dep_a { } } + impl FriendlyName for TrackingChannelStateDepA { + fn friendly_name() -> &'static str { + "TrackingChannelStateDepA" + } + } + + impl MessageDisplay for TrackingChannelStateDepA { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for TrackingChannelStateDepA { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -2935,6 +3103,18 @@ pub mod tracking_channel_state_dep_b { } } + impl FriendlyName for TrackingChannelStateDepB { + fn friendly_name() -> &'static str { + "TrackingChannelStateDepB" + } + } + + impl MessageDisplay for TrackingChannelStateDepB { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for TrackingChannelStateDepB { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN diff --git a/rust/sbp/src/messages/user.rs b/rust/sbp/src/messages/user.rs index 9af15b2dae..3230c76c6a 100644 --- a/rust/sbp/src/messages/user.rs +++ b/rust/sbp/src/messages/user.rs @@ -71,6 +71,18 @@ pub mod msg_user_data { } } + impl FriendlyName for MsgUserData { + fn friendly_name() -> &'static str { + "USER DATA" + } + } + + impl MessageDisplay for MsgUserData { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgUserData { const MIN_LEN: usize = as WireFormat>::MIN_LEN; fn len(&self) -> usize { diff --git a/rust/sbp/src/messages/vehicle.rs b/rust/sbp/src/messages/vehicle.rs index d2a38ced7c..1dbe12d0c5 100644 --- a/rust/sbp/src/messages/vehicle.rs +++ b/rust/sbp/src/messages/vehicle.rs @@ -140,6 +140,18 @@ pub mod msg_odometry { } } + impl FriendlyName for MsgOdometry { + fn friendly_name() -> &'static str { + "ODOMETRY" + } + } + + impl MessageDisplay for MsgOdometry { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgOdometry { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN @@ -402,6 +414,18 @@ pub mod msg_wheeltick { } } + impl FriendlyName for MsgWheeltick { + fn friendly_name() -> &'static str { + "WHEELTICK" + } + } + + impl MessageDisplay for MsgWheeltick { + fn message_display(&self) -> String { + "".to_string() + } + } + impl WireFormat for MsgWheeltick { const MIN_LEN: usize = ::MIN_LEN + ::MIN_LEN diff --git a/spec/example/yaml/example.yaml b/spec/example/yaml/example.yaml index 98cb1ffb44..f8470d42dd 100644 --- a/spec/example/yaml/example.yaml +++ b/spec/example/yaml/example.yaml @@ -82,6 +82,16 @@ definitions: - UARTChannel: desc: State of the UART channel. + + # Message display (also mentioned below in MSG_UART_STATE) creates + # an enriched display format for this struct. + # The syntax of {{field}:x} represents formatting '{:x}' or 'rounding' + # + # In this example, UARTChannel will create a rust implementation of + # + # format!("{:1} | {:2}", self.tx_throughput, self.crc_error_count) + + message_display: "{{@tx_throughput}:1} | {{@crc_error_count}:2}" fields: - tx_throughput: type: float @@ -97,6 +107,25 @@ definitions: - MSG_UART_STATE: id: 0x0018 + + # Friendly name of this message, in replacement of MSG_UART_STATE + # will be displayed as UART STATE instead, this is usually autogenerated + # by shortening keywords in generator but can be manually specified here. + + friendly_name: UART STATE + + # This field creates an enriched display format for the end-user. + # Available syntax: + # {{...}} + # - enclosed in double braces represents input argument i.e. f"{args}" in python + # - this syntax begins all the following possible patterns. + # @fieldX + # - denotes some field from the current class, should be picked from one of + # the defined fields below. + # #uart0 + # - to access fields that has type using message_display + message_display: "channel: {{#uart0}}" + desc: Piksi message about the state of UART0. fields: - uart0: diff --git a/spec/yaml/swiftnav/sbp/piksi.yaml b/spec/yaml/swiftnav/sbp/piksi.yaml index 454dbb50dd..3159d299b0 100644 --- a/spec/yaml/swiftnav/sbp/piksi.yaml +++ b/spec/yaml/swiftnav/sbp/piksi.yaml @@ -104,6 +104,7 @@ definitions: - MSG_THREAD_STATE: id: 0x0017 + message_display: "{{@name}} | {{@cpu}:1} | {{@stack_free}} B" short_desc: State of an RTOS thread desc: > The thread usage message from the device reports real-time @@ -127,6 +128,7 @@ definitions: - UARTChannel: short_desc: State of the UART channel + message_display: "{{@tx_throughput}:1} {{@rx_throughput}:1} {{@crc_error_count}} {{@io_error_count}} {{@tx_buffer_level}:1} {{@rx_buffer_level}:1}" desc: > Throughput, utilization, and error counts on the RX/TX buffers of this UART channel. The reported percentage values must @@ -158,6 +160,7 @@ definitions: 0 to 255) - Period: short_desc: base station observation message receipt period + message_display: "{{@avg}:1} {{@pmin}:1} {{@pmax}:1} {{@current}:1}" desc: > Statistics on the period of observations received from the base station. As complete observation sets are received, their time @@ -185,6 +188,7 @@ definitions: - Latency: short_desc: Receiver-to-base station latency + message_display: "{{@avg}:1} {{@lmin}:1} {{@lmax}:1} {{@current}:1}" desc: > Statistics on the latency of observations received from the base station. As observation packets are received their GPS time is @@ -212,6 +216,7 @@ definitions: - MSG_UART_STATE: id: 0x001D short_desc: State of the UART channels + message_display: "{{#uart_a}} | {{#uart_b}} | {{#uart_ftdi}} | {{#latency}} | {{#obs_period}}" desc: > The UART message reports data latency and throughput of the UART channels providing SBP I/O. On the default Piksi configuration, @@ -328,6 +333,7 @@ definitions: - MSG_DEVICE_MONITOR: id: 0x00B5 + message_display: "Vin: {{@dev_vin}:2} V | Tcpu: {{@cpu_temperature}:1} C | Trf: {{@fe_temperature}:1} C" short_desc: Device temperature and voltage levels desc: > This message contains temperature and voltage level measurements from the @@ -521,6 +527,7 @@ definitions: - MSG_CELL_MODEM_STATUS: id: 0x00BE + message_display: "{{@signal_strength}} dBm | {{@signal_error_rate}:1} %" short_desc: Cell modem information update message desc: > If a cell modem is present on a piksi device, this message @@ -581,6 +588,7 @@ definitions: - MSG_SPECAN: id: 0x0051 + friendly_name: SPECTRUM ANALYZER short_desc: Spectrum analyzer desc: > Spectrum analyzer packet.