diff --git a/generator/sbpg/targets/resources/sbp_messages_mod.rs b/generator/sbpg/targets/resources/sbp_messages_mod.rs index 9d6fb565f2..20b9579158 100644 --- a/generator/sbpg/targets/resources/sbp_messages_mod.rs +++ b/generator/sbpg/targets/resources/sbp_messages_mod.rs @@ -35,7 +35,7 @@ pub trait SBPMessage: SbpSerialize { } #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] pub enum SBP { ((*- for m in msgs *)) (((m.identifier|camel_case)))( (((m.identifier|camel_case))) ), diff --git a/generator/sbpg/targets/resources/sbp_messages_template.rs b/generator/sbpg/targets/resources/sbp_messages_template.rs index e16340968a..eda5ab8723 100644 --- a/generator/sbpg/targets/resources/sbp_messages_template.rs +++ b/generator/sbpg/targets/resources/sbp_messages_template.rs @@ -34,7 +34,7 @@ use super::(((i)))::*; /// ((*- endif *)) #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct (((m.identifier|camel_case))) { ((*- if m.sbp_id *)) diff --git a/rust/sbp/src/lib.rs b/rust/sbp/src/lib.rs index b57b57c5d1..a7b679b7ce 100644 --- a/rust/sbp/src/lib.rs +++ b/rust/sbp/src/lib.rs @@ -194,13 +194,12 @@ mod tests { let packet = vec![ // Start with a mostly valid message, with a single byte error 0x55, 0x0c, // This byte should be 0x0b, changed to intentionally cause a CRC error - 0x02, 0xd3, 0x88, 0x14, 0x28, 0xf4, 0x7a, 0x13, 0x96, - 0x62, 0xee, 0xff, 0xbe, 0x40, 0x14, 0x00, 0xf6, 0xa3, 0x09, 0x00, 0x00, 0x00, 0x0e, - 0x00, 0xdb, 0xbf, 0xde, 0xad, 0xbe, 0xef, - // Include another valid message to properly parse - 0x55u8, 0x0b, 0x02, 0xd3, 0x88, 0x14, 0x28, 0xf4, 0x7a, 0x13, 0x96, - 0x62, 0xee, 0xff, 0xbe, 0x40, 0x14, 0x00, 0xf6, 0xa3, 0x09, 0x00, 0x00, 0x00, 0x0e, - 0x00, 0xdb, 0xbf, 0xde, 0xad, 0xbe, 0xef, + 0x02, 0xd3, 0x88, 0x14, 0x28, 0xf4, 0x7a, 0x13, 0x96, 0x62, 0xee, 0xff, 0xbe, 0x40, + 0x14, 0x00, 0xf6, 0xa3, 0x09, 0x00, 0x00, 0x00, 0x0e, 0x00, 0xdb, 0xbf, 0xde, 0xad, + 0xbe, 0xef, // Include another valid message to properly parse + 0x55u8, 0x0b, 0x02, 0xd3, 0x88, 0x14, 0x28, 0xf4, 0x7a, 0x13, 0x96, 0x62, 0xee, 0xff, + 0xbe, 0x40, 0x14, 0x00, 0xf6, 0xa3, 0x09, 0x00, 0x00, 0x00, 0x0e, 0x00, 0xdb, 0xbf, + 0xde, 0xad, 0xbe, 0xef, ]; let mut reader = std::io::Cursor::new(packet); let mut parser = crate::parser::Parser::new(); @@ -209,7 +208,7 @@ mod tests { let sbp_result = parser.parse(&mut reader); assert!(sbp_result.is_err()); match sbp_result.unwrap_err() { - crate::Error::CrcError => {}, + crate::Error::CrcError => {} e => { assert!(false, "Unexpected error: {:?}", e); } diff --git a/rust/sbp/src/messages/acquisition.rs b/rust/sbp/src/messages/acquisition.rs index b3bffb89ea..173cbd8f15 100644 --- a/rust/sbp/src/messages/acquisition.rs +++ b/rust/sbp/src/messages/acquisition.rs @@ -28,7 +28,7 @@ use serde::{Deserialize, Serialize}; /// The message is used to debug and measure the performance. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct AcqSvProfile { /// SV search job type (deep, fallback, etc) @@ -131,7 +131,7 @@ impl crate::serialize::SbpSerialize for AcqSvProfile { /// Deprecated. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct AcqSvProfileDep { /// SV search job type (deep, fallback, etc) @@ -241,7 +241,7 @@ impl crate::serialize::SbpSerialize for AcqSvProfileDep { /// ratio. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgAcqResult { pub sender_id: Option, @@ -309,7 +309,7 @@ impl crate::serialize::SbpSerialize for MsgAcqResult { /// Deprecated. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgAcqResultDepA { pub sender_id: Option, @@ -379,7 +379,7 @@ impl crate::serialize::SbpSerialize for MsgAcqResultDepA { /// Deprecated. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgAcqResultDepB { pub sender_id: Option, @@ -448,7 +448,7 @@ impl crate::serialize::SbpSerialize for MsgAcqResultDepB { /// Deprecated. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgAcqResultDepC { pub sender_id: Option, @@ -517,7 +517,7 @@ impl crate::serialize::SbpSerialize for MsgAcqResultDepC { /// The message is used to debug and measure the performance. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgAcqSvProfile { pub sender_id: Option, @@ -570,7 +570,7 @@ impl crate::serialize::SbpSerialize for MsgAcqSvProfile { /// Deprecated. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgAcqSvProfileDep { pub sender_id: Option, diff --git a/rust/sbp/src/messages/bootload.rs b/rust/sbp/src/messages/bootload.rs index 5b6c8b335a..a61d05e7a3 100644 --- a/rust/sbp/src/messages/bootload.rs +++ b/rust/sbp/src/messages/bootload.rs @@ -30,7 +30,7 @@ use serde::{Deserialize, Serialize}; /// Deprecated. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgBootloaderHandshakeDepA { pub sender_id: Option, @@ -85,7 +85,7 @@ impl crate::serialize::SbpSerialize for MsgBootloaderHandshakeDepA { /// response from the device is MSG_BOOTLOADER_HANDSHAKE_RESP. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgBootloaderHandshakeReq { pub sender_id: Option, @@ -133,7 +133,7 @@ impl crate::serialize::SbpSerialize for MsgBootloaderHandshakeReq { /// protocol version number. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgBootloaderHandshakeResp { pub sender_id: Option, @@ -191,7 +191,7 @@ impl crate::serialize::SbpSerialize for MsgBootloaderHandshakeResp { /// The host initiates the bootloader to jump to the application. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgBootloaderJumpToApp { pub sender_id: Option, @@ -249,7 +249,7 @@ impl crate::serialize::SbpSerialize for MsgBootloaderJumpToApp { /// and not related to the Piksi's serial number. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgNapDeviceDnaReq { pub sender_id: Option, @@ -298,7 +298,7 @@ impl crate::serialize::SbpSerialize for MsgNapDeviceDnaReq { /// and not related to the Piksi's serial number. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgNapDeviceDnaResp { pub sender_id: Option, diff --git a/rust/sbp/src/messages/ext_events.rs b/rust/sbp/src/messages/ext_events.rs index 416ff557e5..819f188e8f 100644 --- a/rust/sbp/src/messages/ext_events.rs +++ b/rust/sbp/src/messages/ext_events.rs @@ -28,7 +28,7 @@ use serde::{Deserialize, Serialize}; /// which pin it was and whether it was rising or falling. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgExtEvent { pub sender_id: Option, diff --git a/rust/sbp/src/messages/file_io.rs b/rust/sbp/src/messages/file_io.rs index 31429f0750..09da862738 100644 --- a/rust/sbp/src/messages/file_io.rs +++ b/rust/sbp/src/messages/file_io.rs @@ -36,7 +36,7 @@ use serde::{Deserialize, Serialize}; /// that can be in-flight during read or write operations. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgFileioConfigReq { pub sender_id: Option, @@ -93,7 +93,7 @@ impl crate::serialize::SbpSerialize for MsgFileioConfigReq { /// that can be in-flight during read or write operations. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgFileioConfigResp { pub sender_id: Option, @@ -170,7 +170,7 @@ impl crate::serialize::SbpSerialize for MsgFileioConfigResp { /// from sender ID 0x42. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgFileioReadDirReq { pub sender_id: Option, @@ -238,7 +238,7 @@ impl crate::serialize::SbpSerialize for MsgFileioReadDirReq { /// the response is preserved from the request. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgFileioReadDirResp { pub sender_id: Option, @@ -303,7 +303,7 @@ impl crate::serialize::SbpSerialize for MsgFileioReadDirResp { /// to this message when it is received from sender ID 0x42. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgFileioReadReq { pub sender_id: Option, @@ -375,7 +375,7 @@ impl crate::serialize::SbpSerialize for MsgFileioReadReq { /// preserved from the request. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgFileioReadResp { pub sender_id: Option, @@ -436,7 +436,7 @@ impl crate::serialize::SbpSerialize for MsgFileioReadResp { /// process this message when it is received from sender ID 0x42. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgFileioRemove { pub sender_id: Option, @@ -496,7 +496,7 @@ impl crate::serialize::SbpSerialize for MsgFileioRemove { /// 0x42. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgFileioWriteReq { pub sender_id: Option, @@ -568,7 +568,7 @@ impl crate::serialize::SbpSerialize for MsgFileioWriteReq { /// request. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgFileioWriteResp { pub sender_id: Option, diff --git a/rust/sbp/src/messages/flash.rs b/rust/sbp/src/messages/flash.rs index a679d04e8f..8f6a18fcb7 100644 --- a/rust/sbp/src/messages/flash.rs +++ b/rust/sbp/src/messages/flash.rs @@ -33,7 +33,7 @@ use serde::{Deserialize, Serialize}; /// MSG_FLASH_PROGRAM, may return this message on failure. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgFlashDone { pub sender_id: Option, @@ -90,7 +90,7 @@ impl crate::serialize::SbpSerialize for MsgFlashDone { /// invalid. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgFlashErase { pub sender_id: Option, @@ -153,7 +153,7 @@ impl crate::serialize::SbpSerialize for MsgFlashErase { /// erased before addresses can be programmed. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgFlashProgram { pub sender_id: Option, @@ -227,7 +227,7 @@ impl crate::serialize::SbpSerialize for MsgFlashProgram { /// range. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgFlashReadReq { pub sender_id: Option, @@ -296,7 +296,7 @@ impl crate::serialize::SbpSerialize for MsgFlashReadReq { /// range. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgFlashReadResp { pub sender_id: Option, @@ -360,7 +360,7 @@ impl crate::serialize::SbpSerialize for MsgFlashReadResp { /// register. The device replies with a MSG_FLASH_DONE message. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgM25FlashWriteStatus { pub sender_id: Option, @@ -414,7 +414,7 @@ impl crate::serialize::SbpSerialize for MsgM25FlashWriteStatus { /// memory. The device replies with a MSG_FLASH_DONE message. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgStmFlashLockSector { pub sender_id: Option, @@ -468,7 +468,7 @@ impl crate::serialize::SbpSerialize for MsgStmFlashLockSector { /// memory. The device replies with a MSG_FLASH_DONE message. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgStmFlashUnlockSector { pub sender_id: Option, @@ -525,7 +525,7 @@ impl crate::serialize::SbpSerialize for MsgStmFlashUnlockSector { /// ID in the payload. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgStmUniqueIdReq { pub sender_id: Option, @@ -573,7 +573,7 @@ impl crate::serialize::SbpSerialize for MsgStmUniqueIdReq { /// ID in the payload.. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgStmUniqueIdResp { pub sender_id: Option, diff --git a/rust/sbp/src/messages/gnss.rs b/rust/sbp/src/messages/gnss.rs index 24189c451d..6f940f1090 100644 --- a/rust/sbp/src/messages/gnss.rs +++ b/rust/sbp/src/messages/gnss.rs @@ -28,7 +28,7 @@ use serde::{Deserialize, Serialize}; /// same sign as the pseudorange. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct CarrierPhase { /// Carrier phase whole cycles @@ -84,7 +84,7 @@ impl crate::serialize::SbpSerialize for CarrierPhase { /// so ns field will be 0. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct GPSTime { /// Milliseconds since start of GPS week @@ -145,7 +145,7 @@ impl crate::serialize::SbpSerialize for GPSTime { /// transition. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct GPSTimeDep { /// Milliseconds since start of GPS week @@ -200,7 +200,7 @@ impl crate::serialize::SbpSerialize for GPSTimeDep { /// transition. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct GPSTimeSec { /// Seconds since start of GPS week @@ -253,7 +253,7 @@ impl crate::serialize::SbpSerialize for GPSTimeSec { /// Signal identifier containing constellation, band, and satellite identifier /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct GnssSignal { /// Constellation-specific satellite identifier. This field for Glonass can @@ -307,7 +307,7 @@ impl crate::serialize::SbpSerialize for GnssSignal { /// Deprecated. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct GnssSignalDep { /// Constellation-specific satellite identifier. Note: unlike GnssSignal, @@ -371,7 +371,7 @@ impl crate::serialize::SbpSerialize for GnssSignalDep { /// a space vehicle /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct SvId { /// ID of the space vehicle within its constellation diff --git a/rust/sbp/src/messages/imu.rs b/rust/sbp/src/messages/imu.rs index 4068f50821..440e5825b7 100644 --- a/rust/sbp/src/messages/imu.rs +++ b/rust/sbp/src/messages/imu.rs @@ -27,7 +27,7 @@ use serde::{Deserialize, Serialize}; /// depends on the value of `imu_type`. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgImuAux { pub sender_id: Option, @@ -93,7 +93,7 @@ impl crate::serialize::SbpSerialize for MsgImuAux { /// device hardware and settings, are communicated via the MSG_IMU_AUX message. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgImuRaw { pub sender_id: Option, diff --git a/rust/sbp/src/messages/linux.rs b/rust/sbp/src/messages/linux.rs index 415598bbbb..c924086582 100644 --- a/rust/sbp/src/messages/linux.rs +++ b/rust/sbp/src/messages/linux.rs @@ -27,7 +27,7 @@ use serde::{Deserialize, Serialize}; /// consumers of CPU on the system. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgLinuxCpuState { pub sender_id: Option, @@ -101,7 +101,7 @@ impl crate::serialize::SbpSerialize for MsgLinuxCpuState { /// consumers of memory on the system. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgLinuxMemState { pub sender_id: Option, @@ -174,7 +174,7 @@ impl crate::serialize::SbpSerialize for MsgLinuxMemState { /// Top 10 list of processes with a large number of open file descriptors. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgLinuxProcessFdCount { pub sender_id: Option, @@ -242,7 +242,7 @@ impl crate::serialize::SbpSerialize for MsgLinuxProcessFdCount { /// Summary of open file descriptors on the system. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgLinuxProcessFdSummary { pub sender_id: Option, @@ -304,7 +304,7 @@ impl crate::serialize::SbpSerialize for MsgLinuxProcessFdSummary { /// Top 10 list of processes with high socket counts. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgLinuxProcessSocketCounts { pub sender_id: Option, @@ -386,7 +386,7 @@ impl crate::serialize::SbpSerialize for MsgLinuxProcessSocketCounts { /// Top 10 list of sockets with deep queues. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgLinuxProcessSocketQueues { pub sender_id: Option, @@ -479,7 +479,7 @@ impl crate::serialize::SbpSerialize for MsgLinuxProcessSocketQueues { /// Summaries the socket usage across the system. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgLinuxSocketUsage { pub sender_id: Option, @@ -551,7 +551,7 @@ impl crate::serialize::SbpSerialize for MsgLinuxSocketUsage { /// This presents a summary of CPU and memory utilization. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgLinuxSysState { pub sender_id: Option, diff --git a/rust/sbp/src/messages/logging.rs b/rust/sbp/src/messages/logging.rs index 9df7cd07a3..d4329cf90f 100644 --- a/rust/sbp/src/messages/logging.rs +++ b/rust/sbp/src/messages/logging.rs @@ -32,7 +32,7 @@ use serde::{Deserialize, Serialize}; /// Protocol 0 represents SBP and the remaining values are implementation defined. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgFwd { pub sender_id: Option, @@ -97,7 +97,7 @@ impl crate::serialize::SbpSerialize for MsgFwd { /// ERROR, WARNING, DEBUG, INFO logging levels. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgLog { pub sender_id: Option, @@ -155,7 +155,7 @@ impl crate::serialize::SbpSerialize for MsgLog { /// Deprecated. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgPrintDep { pub sender_id: Option, diff --git a/rust/sbp/src/messages/mag.rs b/rust/sbp/src/messages/mag.rs index 820395e43e..90c55739b1 100644 --- a/rust/sbp/src/messages/mag.rs +++ b/rust/sbp/src/messages/mag.rs @@ -25,7 +25,7 @@ use serde::{Deserialize, Serialize}; /// Raw data from the magnetometer. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgMagRaw { pub sender_id: Option, diff --git a/rust/sbp/src/messages/mod.rs b/rust/sbp/src/messages/mod.rs index 1d2e2144cf..8e7b58db3c 100644 --- a/rust/sbp/src/messages/mod.rs +++ b/rust/sbp/src/messages/mod.rs @@ -229,7 +229,7 @@ pub trait SBPMessage: SbpSerialize { } #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] pub enum SBP { MsgPrintDep(MsgPrintDep), MsgTrackingStateDetailedDep(MsgTrackingStateDetailedDep), diff --git a/rust/sbp/src/messages/navigation.rs b/rust/sbp/src/messages/navigation.rs index 85ac163ddc..a01657a25a 100644 --- a/rust/sbp/src/messages/navigation.rs +++ b/rust/sbp/src/messages/navigation.rs @@ -44,7 +44,7 @@ use serde::{Deserialize, Serialize}; /// Differential solution /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgAgeCorrections { pub sender_id: Option, @@ -106,7 +106,7 @@ impl crate::serialize::SbpSerialize for MsgAgeCorrections { /// matching time-of-week (tow). /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgBaselineECEF { pub sender_id: Option, @@ -193,7 +193,7 @@ impl crate::serialize::SbpSerialize for MsgBaselineECEF { /// matching time-of-week (tow). /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgBaselineECEFDepA { pub sender_id: Option, @@ -278,7 +278,7 @@ impl crate::serialize::SbpSerialize for MsgBaselineECEFDepA { /// preceding MSG_GPS_TIME with the matching time-of-week (tow). /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgBaselineHeadingDepA { pub sender_id: Option, @@ -351,7 +351,7 @@ impl crate::serialize::SbpSerialize for MsgBaselineHeadingDepA { /// preceding MSG_GPS_TIME with the matching time-of-week (tow). /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgBaselineNED { pub sender_id: Option, @@ -444,7 +444,7 @@ impl crate::serialize::SbpSerialize for MsgBaselineNED { /// preceding MSG_GPS_TIME with the matching time-of-week (tow). /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgBaselineNEDDepA { pub sender_id: Option, @@ -535,7 +535,7 @@ impl crate::serialize::SbpSerialize for MsgBaselineNEDDepA { /// corresponds to differential or SPP solution. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgDops { pub sender_id: Option, @@ -620,7 +620,7 @@ impl crate::serialize::SbpSerialize for MsgDops { /// precision. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgDopsDepA { pub sender_id: Option, @@ -710,7 +710,7 @@ impl crate::serialize::SbpSerialize for MsgDopsDepA { /// these messages. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgGPSTime { pub sender_id: Option, @@ -791,7 +791,7 @@ impl crate::serialize::SbpSerialize for MsgGPSTime { /// these messages. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgGPSTimeDepA { pub sender_id: Option, @@ -867,7 +867,7 @@ impl crate::serialize::SbpSerialize for MsgGPSTimeDepA { /// MSG_GPS_TIME with the matching time-of-week (tow). /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgPosECEF { pub sender_id: Option, @@ -958,7 +958,7 @@ impl crate::serialize::SbpSerialize for MsgPosECEF { /// MSG_GPS_TIME with the matching time-of-week (tow). /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgPosECEFCov { pub sender_id: Option, @@ -1074,7 +1074,7 @@ impl crate::serialize::SbpSerialize for MsgPosECEFCov { /// MSG_GPS_TIME with the matching time-of-week (tow). /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgPosECEFCovGnss { pub sender_id: Option, @@ -1189,7 +1189,7 @@ impl crate::serialize::SbpSerialize for MsgPosECEFCovGnss { /// MSG_GPS_TIME with the matching time-of-week (tow). /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgPosECEFDepA { pub sender_id: Option, @@ -1279,7 +1279,7 @@ impl crate::serialize::SbpSerialize for MsgPosECEFDepA { /// MSG_GPS_TIME with the matching time-of-week (tow). /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgPosECEFGnss { pub sender_id: Option, @@ -1369,7 +1369,7 @@ impl crate::serialize::SbpSerialize for MsgPosECEFGnss { /// matching time-of-week (tow). /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgPosLLH { pub sender_id: Option, @@ -1464,7 +1464,7 @@ impl crate::serialize::SbpSerialize for MsgPosLLH { /// measurement and care should be taken with the sign convention. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgPosLLHCov { pub sender_id: Option, @@ -1579,7 +1579,7 @@ impl crate::serialize::SbpSerialize for MsgPosLLHCov { /// measurement and care should be taken with the sign convention. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgPosLLHCovGnss { pub sender_id: Option, @@ -1694,7 +1694,7 @@ impl crate::serialize::SbpSerialize for MsgPosLLHCovGnss { /// matching time-of-week (tow). /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgPosLLHDepA { pub sender_id: Option, @@ -1789,7 +1789,7 @@ impl crate::serialize::SbpSerialize for MsgPosLLHDepA { /// matching time-of-week (tow). /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgPosLLHGnss { pub sender_id: Option, @@ -1879,7 +1879,7 @@ impl crate::serialize::SbpSerialize for MsgPosLLHGnss { /// by the preceding MSG_GPS_TIME with the matching time-of-week (tow). /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgProtectionLevel { pub sender_id: Option, @@ -1963,7 +1963,7 @@ impl crate::serialize::SbpSerialize for MsgProtectionLevel { /// which indicate the source of the UTC offset value and source of the time fix. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgUtcTime { pub sender_id: Option, @@ -2063,7 +2063,7 @@ impl crate::serialize::SbpSerialize for MsgUtcTime { /// products and is not available from Piksi Multi or Duro. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgVelBody { pub sender_id: Option, @@ -2173,7 +2173,7 @@ impl crate::serialize::SbpSerialize for MsgVelBody { /// MSG_GPS_TIME with the matching time-of-week (tow). /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgVelECEF { pub sender_id: Option, @@ -2258,7 +2258,7 @@ impl crate::serialize::SbpSerialize for MsgVelECEF { /// MSG_GPS_TIME with the matching time-of-week (tow). /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgVelECEFCov { pub sender_id: Option, @@ -2368,7 +2368,7 @@ impl crate::serialize::SbpSerialize for MsgVelECEFCov { /// MSG_GPS_TIME with the matching time-of-week (tow). /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgVelECEFCovGnss { pub sender_id: Option, @@ -2478,7 +2478,7 @@ impl crate::serialize::SbpSerialize for MsgVelECEFCovGnss { /// MSG_GPS_TIME with the matching time-of-week (tow). /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgVelECEFDepA { pub sender_id: Option, @@ -2563,7 +2563,7 @@ impl crate::serialize::SbpSerialize for MsgVelECEFDepA { /// MSG_GPS_TIME with the matching time-of-week (tow). /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgVelECEFGnss { pub sender_id: Option, @@ -2649,7 +2649,7 @@ impl crate::serialize::SbpSerialize for MsgVelECEFGnss { /// given by the preceding MSG_GPS_TIME with the matching time-of-week (tow). /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgVelNED { pub sender_id: Option, @@ -2742,7 +2742,7 @@ impl crate::serialize::SbpSerialize for MsgVelNED { /// portion of the 3x3 covariance matrix. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgVelNEDCov { pub sender_id: Option, @@ -2855,7 +2855,7 @@ impl crate::serialize::SbpSerialize for MsgVelNEDCov { /// portion of the 3x3 covariance matrix. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgVelNEDCovGnss { pub sender_id: Option, @@ -2966,7 +2966,7 @@ impl crate::serialize::SbpSerialize for MsgVelNEDCovGnss { /// given by the preceding MSG_GPS_TIME with the matching time-of-week (tow). /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgVelNEDDepA { pub sender_id: Option, @@ -3057,7 +3057,7 @@ impl crate::serialize::SbpSerialize for MsgVelNEDDepA { /// given by the preceding MSG_GPS_TIME with the matching time-of-week (tow). /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgVelNEDGnss { pub sender_id: Option, diff --git a/rust/sbp/src/messages/ndb.rs b/rust/sbp/src/messages/ndb.rs index 2875750bb7..5c98cf5644 100644 --- a/rust/sbp/src/messages/ndb.rs +++ b/rust/sbp/src/messages/ndb.rs @@ -28,7 +28,7 @@ use serde::{Deserialize, Serialize}; /// message could also be sent out when fetching an object from NDB. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgNdbEvent { pub sender_id: Option, diff --git a/rust/sbp/src/messages/observation.rs b/rust/sbp/src/messages/observation.rs index 0ebb1c0f7f..0a27197e70 100644 --- a/rust/sbp/src/messages/observation.rs +++ b/rust/sbp/src/messages/observation.rs @@ -22,7 +22,7 @@ use super::gnss::*; use serde::{Deserialize, Serialize}; #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct AlmanacCommonContent { /// GNSS signal identifier @@ -103,7 +103,7 @@ impl crate::serialize::SbpSerialize for AlmanacCommonContent { } #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct AlmanacCommonContentDep { /// GNSS signal identifier @@ -192,7 +192,7 @@ impl crate::serialize::SbpSerialize for AlmanacCommonContentDep { /// the opposite sign as the pseudorange. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct CarrierPhaseDepA { /// Carrier phase whole cycles @@ -251,7 +251,7 @@ impl crate::serialize::SbpSerialize for CarrierPhaseDepA { /// as positive for approaching satellites. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct Doppler { /// Doppler whole Hz @@ -300,7 +300,7 @@ impl crate::serialize::SbpSerialize for Doppler { } #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct EphemerisCommonContent { /// GNSS signal identifier (16 bit) @@ -373,7 +373,7 @@ impl crate::serialize::SbpSerialize for EphemerisCommonContent { } #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct EphemerisCommonContentDepA { /// GNSS signal identifier @@ -446,7 +446,7 @@ impl crate::serialize::SbpSerialize for EphemerisCommonContentDepA { } #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct EphemerisCommonContentDepB { /// GNSS signal identifier (16 bit) @@ -519,7 +519,7 @@ impl crate::serialize::SbpSerialize for EphemerisCommonContentDepB { } #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct GnssCapb { /// GPS SV active mask @@ -642,7 +642,7 @@ impl crate::serialize::SbpSerialize for GnssCapb { /// almanac" for details. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgAlmanacGlo { pub sender_id: Option, @@ -734,7 +734,7 @@ impl crate::serialize::SbpSerialize for MsgAlmanacGlo { /// almanac" for details. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgAlmanacGloDep { pub sender_id: Option, @@ -826,7 +826,7 @@ impl crate::serialize::SbpSerialize for MsgAlmanacGloDep { /// (ICD-GPS-200, Chapter 20.3.3.5.1.2 Almanac Data) for more details. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgAlmanacGPS { pub sender_id: Option, @@ -927,7 +927,7 @@ impl crate::serialize::SbpSerialize for MsgAlmanacGPS { /// (ICD-GPS-200, Chapter 20.3.3.5.1.2 Almanac Data) for more details. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgAlmanacGPSDep { pub sender_id: Option, @@ -1030,7 +1030,7 @@ impl crate::serialize::SbpSerialize for MsgAlmanacGPSDep { /// pseudo-absolute position output. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgBasePosECEF { pub sender_id: Option, @@ -1097,7 +1097,7 @@ impl crate::serialize::SbpSerialize for MsgBasePosECEF { /// error in the pseudo-absolute position output. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgBasePosLLH { pub sender_id: Option, @@ -1163,7 +1163,7 @@ impl crate::serialize::SbpSerialize for MsgBasePosLLH { /// Satellite System SIS-ICD Version 2.1, Table 5-9 for more details. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgEphemerisBds { pub sender_id: Option, @@ -1335,7 +1335,7 @@ impl crate::serialize::SbpSerialize for MsgEphemerisBds { /// Deprecated. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgEphemerisDepA { pub sender_id: Option, @@ -1517,7 +1517,7 @@ impl crate::serialize::SbpSerialize for MsgEphemerisDepA { /// Deprecated. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgEphemerisDepB { pub sender_id: Option, @@ -1708,7 +1708,7 @@ impl crate::serialize::SbpSerialize for MsgEphemerisDepB { /// 20-III) for more details. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgEphemerisDepC { pub sender_id: Option, @@ -1909,7 +1909,7 @@ impl crate::serialize::SbpSerialize for MsgEphemerisDepC { /// 20-III) for more details. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgEphemerisDepD { pub sender_id: Option, @@ -2109,7 +2109,7 @@ impl crate::serialize::SbpSerialize for MsgEphemerisDepD { /// OS SIS ICD, Issue 1.3, December 2016 for more details. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgEphemerisGal { pub sender_id: Option, @@ -2287,7 +2287,7 @@ impl crate::serialize::SbpSerialize for MsgEphemerisGal { /// an ephemeris message with explicit source of NAV data. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgEphemerisGalDepA { pub sender_id: Option, @@ -2463,7 +2463,7 @@ impl crate::serialize::SbpSerialize for MsgEphemerisGalDepA { /// for more details. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgEphemerisGlo { pub sender_id: Option, @@ -2560,7 +2560,7 @@ impl crate::serialize::SbpSerialize for MsgEphemerisGlo { /// for more details. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgEphemerisGloDepA { pub sender_id: Option, @@ -2642,7 +2642,7 @@ impl crate::serialize::SbpSerialize for MsgEphemerisGloDepA { /// for more details. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgEphemerisGloDepB { pub sender_id: Option, @@ -2724,7 +2724,7 @@ impl crate::serialize::SbpSerialize for MsgEphemerisGloDepB { /// for more details. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgEphemerisGloDepC { pub sender_id: Option, @@ -2813,7 +2813,7 @@ impl crate::serialize::SbpSerialize for MsgEphemerisGloDepC { /// ephemeris message using floats for size reduction. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgEphemerisGloDepD { pub sender_id: Option, @@ -2910,7 +2910,7 @@ impl crate::serialize::SbpSerialize for MsgEphemerisGloDepD { /// 20-III) for more details. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgEphemerisGPS { pub sender_id: Option, @@ -3081,7 +3081,7 @@ impl crate::serialize::SbpSerialize for MsgEphemerisGPS { /// 20-III) for more details. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgEphemerisGPSDepE { pub sender_id: Option, @@ -3249,7 +3249,7 @@ impl crate::serialize::SbpSerialize for MsgEphemerisGPSDepE { /// ephemeris message using floats for size reduction. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgEphemerisGPSDepF { pub sender_id: Option, @@ -3418,7 +3418,7 @@ impl crate::serialize::SbpSerialize for MsgEphemerisGPSDepF { /// velocity, and clock offset. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgEphemerisQzss { pub sender_id: Option, @@ -3581,7 +3581,7 @@ impl crate::serialize::SbpSerialize for MsgEphemerisQzss { } #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgEphemerisSbas { pub sender_id: Option, @@ -3655,7 +3655,7 @@ impl crate::serialize::SbpSerialize for MsgEphemerisSbas { } #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgEphemerisSbasDepA { pub sender_id: Option, @@ -3734,7 +3734,7 @@ impl crate::serialize::SbpSerialize for MsgEphemerisSbasDepA { /// ephemeris message using floats for size reduction. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgEphemerisSbasDepB { pub sender_id: Option, @@ -3815,7 +3815,7 @@ impl crate::serialize::SbpSerialize for MsgEphemerisSbasDepB { /// manufacturers) /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgGloBiases { pub sender_id: Option, @@ -3884,7 +3884,7 @@ impl crate::serialize::SbpSerialize for MsgGloBiases { } #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgGnssCapb { pub sender_id: Option, @@ -3942,7 +3942,7 @@ impl crate::serialize::SbpSerialize for MsgGnssCapb { /// Please see ICD-GPS-200 (30.3.3.3.1.1) for more details. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgGroupDelay { pub sender_id: Option, @@ -4018,7 +4018,7 @@ impl crate::serialize::SbpSerialize for MsgGroupDelay { /// Please see ICD-GPS-200 (30.3.3.3.1.1) for more details. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgGroupDelayDepA { pub sender_id: Option, @@ -4094,7 +4094,7 @@ impl crate::serialize::SbpSerialize for MsgGroupDelayDepA { /// Please see ICD-GPS-200 (30.3.3.3.1.1) for more details. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgGroupDelayDepB { pub sender_id: Option, @@ -4172,7 +4172,7 @@ impl crate::serialize::SbpSerialize for MsgGroupDelayDepB { /// Please see ICD-GPS-200 (Chapter 20.3.3.5.1.7) for more details. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgIono { pub sender_id: Option, @@ -4263,7 +4263,7 @@ impl crate::serialize::SbpSerialize for MsgIono { /// with typical RTCMv3 GNSS observations. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgObs { pub sender_id: Option, @@ -4321,7 +4321,7 @@ impl crate::serialize::SbpSerialize for MsgObs { /// Deprecated. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgObsDepA { pub sender_id: Option, @@ -4384,7 +4384,7 @@ impl crate::serialize::SbpSerialize for MsgObsDepA { /// observations. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgObsDepB { pub sender_id: Option, @@ -4448,7 +4448,7 @@ impl crate::serialize::SbpSerialize for MsgObsDepB { /// with typical RTCMv3 GNSS observations. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgObsDepC { pub sender_id: Option, @@ -4506,7 +4506,7 @@ impl crate::serialize::SbpSerialize for MsgObsDepC { /// The OSR message contains network corrections in an observation-like format /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgOsr { pub sender_id: Option, @@ -4565,7 +4565,7 @@ impl crate::serialize::SbpSerialize for MsgOsr { /// that the device does have ephemeris or almanac for. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgSvAzEl { pub sender_id: Option, @@ -4618,7 +4618,7 @@ impl crate::serialize::SbpSerialize for MsgSvAzEl { /// Please see ICD-GPS-200 (Chapter 20.3.3.5.1.4) for more details. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgSvConfigurationGPSDep { pub sender_id: Option, @@ -4676,7 +4676,7 @@ impl crate::serialize::SbpSerialize for MsgSvConfigurationGPSDep { /// Header of a GNSS observation message. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct ObservationHeader { /// GNSS time of this observation @@ -4733,7 +4733,7 @@ impl crate::serialize::SbpSerialize for ObservationHeader { /// Header of a GPS observation message. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct ObservationHeaderDep { /// GPS time of this observation @@ -4796,7 +4796,7 @@ impl crate::serialize::SbpSerialize for ObservationHeaderDep { /// peformed. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct PackedObsContent { /// Pseudorange observation @@ -4884,7 +4884,7 @@ impl crate::serialize::SbpSerialize for PackedObsContent { /// Deprecated. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct PackedObsContentDepA { /// Pseudorange observation @@ -4958,7 +4958,7 @@ impl crate::serialize::SbpSerialize for PackedObsContentDepA { /// tracked. Pseudoranges are referenced to a nominal pseudorange. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct PackedObsContentDepB { /// Pseudorange observation @@ -5033,7 +5033,7 @@ impl crate::serialize::SbpSerialize for PackedObsContentDepB { /// receivers and conform with typical RTCMv3 GNSS observations. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct PackedObsContentDepC { /// Pseudorange observation @@ -5106,7 +5106,7 @@ impl crate::serialize::SbpSerialize for PackedObsContentDepC { /// Pseudorange and carrier phase network corrections for a satellite signal. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct PackedOsrContent { /// Pseudorange observation @@ -5197,7 +5197,7 @@ impl crate::serialize::SbpSerialize for PackedOsrContent { /// Satellite azimuth and elevation. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct SvAzEl { /// GNSS signal identifier diff --git a/rust/sbp/src/messages/orientation.rs b/rust/sbp/src/messages/orientation.rs index e7817c2558..b45e6c9981 100644 --- a/rust/sbp/src/messages/orientation.rs +++ b/rust/sbp/src/messages/orientation.rs @@ -33,7 +33,7 @@ use serde::{Deserialize, Serialize}; /// and is not produced by Piksi Multi or Duro. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgAngularRate { pub sender_id: Option, @@ -109,7 +109,7 @@ impl crate::serialize::SbpSerialize for MsgAngularRate { /// that time-matched RTK mode is used when the base station is moving. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgBaselineHeading { pub sender_id: Option, @@ -181,7 +181,7 @@ impl crate::serialize::SbpSerialize for MsgBaselineHeading { /// INS versions of Swift Products and is not produced by Piksi Multi or Duro. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgOrientEuler { pub sender_id: Option, @@ -273,7 +273,7 @@ impl crate::serialize::SbpSerialize for MsgOrientEuler { /// or Duro. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgOrientQuat { pub sender_id: Option, diff --git a/rust/sbp/src/messages/piksi.rs b/rust/sbp/src/messages/piksi.rs index c410f5fb4b..bdb343493f 100644 --- a/rust/sbp/src/messages/piksi.rs +++ b/rust/sbp/src/messages/piksi.rs @@ -33,7 +33,7 @@ use serde::{Deserialize, Serialize}; /// communication latency in the system. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct Latency { /// Average latency @@ -97,7 +97,7 @@ impl crate::serialize::SbpSerialize for Latency { /// alamanac onto the Piksi's flash memory from the host. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgAlmanac { pub sender_id: Option, @@ -143,7 +143,7 @@ impl crate::serialize::SbpSerialize for MsgAlmanac { /// of the modem and its various parameters. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgCellModemStatus { pub sender_id: Option, @@ -209,7 +209,7 @@ impl crate::serialize::SbpSerialize for MsgCellModemStatus { /// the correct command. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgCommandOutput { pub sender_id: Option, @@ -269,7 +269,7 @@ impl crate::serialize::SbpSerialize for MsgCommandOutput { /// code will be returned with MSG_COMMAND_RESP. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgCommandReq { pub sender_id: Option, @@ -328,7 +328,7 @@ impl crate::serialize::SbpSerialize for MsgCommandReq { /// the command. A return code of zero indicates success. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgCommandResp { pub sender_id: Option, @@ -388,7 +388,7 @@ impl crate::serialize::SbpSerialize for MsgCommandResp { /// removed in a future release. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgCwResults { pub sender_id: Option, @@ -434,7 +434,7 @@ impl crate::serialize::SbpSerialize for MsgCwResults { /// be removed in a future release. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgCwStart { pub sender_id: Option, @@ -480,7 +480,7 @@ impl crate::serialize::SbpSerialize for MsgCwStart { /// available. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgDeviceMonitor { pub sender_id: Option, @@ -558,7 +558,7 @@ impl crate::serialize::SbpSerialize for MsgDeviceMonitor { /// A negative value implies an error for the particular gain stage as reported by the frontend. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgFrontEndGain { pub sender_id: Option, @@ -619,7 +619,7 @@ impl crate::serialize::SbpSerialize for MsgFrontEndGain { /// from satellite observations. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgIarState { pub sender_id: Option, @@ -672,7 +672,7 @@ impl crate::serialize::SbpSerialize for MsgIarState { /// Deprecated /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgInitBaseDep { pub sender_id: Option, @@ -717,7 +717,7 @@ impl crate::serialize::SbpSerialize for MsgInitBaseDep { /// from being used in various Piksi subsystems. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgMaskSatellite { pub sender_id: Option, @@ -775,7 +775,7 @@ impl crate::serialize::SbpSerialize for MsgMaskSatellite { /// Deprecated. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgMaskSatelliteDep { pub sender_id: Option, @@ -833,7 +833,7 @@ impl crate::serialize::SbpSerialize for MsgMaskSatelliteDep { /// The bandwidth usage, a list of usage by interface. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgNetworkBandwidthUsage { pub sender_id: Option, @@ -887,7 +887,7 @@ impl crate::serialize::SbpSerialize for MsgNetworkBandwidthUsage { /// Output will be sent in MSG_NETWORK_STATE_RESP messages /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgNetworkStateReq { pub sender_id: Option, @@ -933,7 +933,7 @@ impl crate::serialize::SbpSerialize for MsgNetworkStateReq { /// in c. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgNetworkStateResp { pub sender_id: Option, @@ -1022,7 +1022,7 @@ impl crate::serialize::SbpSerialize for MsgNetworkStateResp { /// bootloader. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgReset { pub sender_id: Option, @@ -1076,7 +1076,7 @@ impl crate::serialize::SbpSerialize for MsgReset { /// bootloader. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgResetDep { pub sender_id: Option, @@ -1121,7 +1121,7 @@ impl crate::serialize::SbpSerialize for MsgResetDep { /// Ambiguity Resolution (IAR) process. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgResetFilters { pub sender_id: Option, @@ -1175,7 +1175,7 @@ impl crate::serialize::SbpSerialize for MsgResetFilters { /// time estimate sent by the host. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgSetTime { pub sender_id: Option, @@ -1219,7 +1219,7 @@ impl crate::serialize::SbpSerialize for MsgSetTime { /// Spectrum analyzer packet. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgSpecan { pub sender_id: Option, @@ -1302,7 +1302,7 @@ impl crate::serialize::SbpSerialize for MsgSpecan { /// Deprecated. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgSpecanDep { pub sender_id: Option, @@ -1387,7 +1387,7 @@ impl crate::serialize::SbpSerialize for MsgSpecanDep { /// thread. The reported percentage values must be normalized. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgThreadState { pub sender_id: Option, @@ -1459,7 +1459,7 @@ impl crate::serialize::SbpSerialize for MsgThreadState { /// period indicates their likelihood of transmission. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgUartState { pub sender_id: Option, @@ -1532,7 +1532,7 @@ impl crate::serialize::SbpSerialize for MsgUartState { /// Deprecated /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgUartStateDepa { pub sender_id: Option, @@ -1605,7 +1605,7 @@ impl crate::serialize::SbpSerialize for MsgUartStateDepa { /// though may not necessarily be populated with a value. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct NetworkUsage { /// Duration over which the measurement was collected @@ -1678,7 +1678,7 @@ impl crate::serialize::SbpSerialize for NetworkUsage { /// can cause momentary RTK solution outages. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct Period { /// Average period @@ -1743,7 +1743,7 @@ impl crate::serialize::SbpSerialize for Period { /// be normalized. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct UARTChannel { /// UART transmit throughput diff --git a/rust/sbp/src/messages/sbas.rs b/rust/sbp/src/messages/sbas.rs index c161ef6d1e..b9e8f3a79d 100644 --- a/rust/sbp/src/messages/sbas.rs +++ b/rust/sbp/src/messages/sbas.rs @@ -27,7 +27,7 @@ use serde::{Deserialize, Serialize}; /// parity of the data block and sends only blocks that pass the check. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgSbasRaw { pub sender_id: Option, diff --git a/rust/sbp/src/messages/settings.rs b/rust/sbp/src/messages/settings.rs index 3350bc0167..30ad628fae 100644 --- a/rust/sbp/src/messages/settings.rs +++ b/rust/sbp/src/messages/settings.rs @@ -51,7 +51,7 @@ use serde::{Deserialize, Serialize}; /// The settings message for indicating end of the settings values. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgSettingsReadByIndexDone { pub sender_id: Option, @@ -97,7 +97,7 @@ impl crate::serialize::SbpSerialize for MsgSettingsReadByIndexDone { /// "MSG_SETTINGS_READ_BY_INDEX_RESP". /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgSettingsReadByIndexReq { pub sender_id: Option, @@ -160,7 +160,7 @@ impl crate::serialize::SbpSerialize for MsgSettingsReadByIndexReq { /// the device is "simulator\0enabled\0True\0enum:True,False\0" /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgSettingsReadByIndexResp { pub sender_id: Option, @@ -227,7 +227,7 @@ impl crate::serialize::SbpSerialize for MsgSettingsReadByIndexResp { /// message (msg_id 0x00A5). /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgSettingsReadReq { pub sender_id: Option, @@ -287,7 +287,7 @@ impl crate::serialize::SbpSerialize for MsgSettingsReadReq { /// "solution\0soln_freq\010\0". /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgSettingsReadResp { pub sender_id: Option, @@ -343,7 +343,7 @@ impl crate::serialize::SbpSerialize for MsgSettingsReadResp { /// for this setting to set the initial value. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgSettingsRegister { pub sender_id: Option, @@ -400,7 +400,7 @@ impl crate::serialize::SbpSerialize for MsgSettingsRegister { /// and had a different value. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgSettingsRegisterResp { pub sender_id: Option, @@ -461,7 +461,7 @@ impl crate::serialize::SbpSerialize for MsgSettingsRegisterResp { /// configuration to its onboard flash memory file system. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgSettingsSave { pub sender_id: Option, @@ -511,7 +511,7 @@ impl crate::serialize::SbpSerialize for MsgSettingsSave { /// "solution\0soln_freq\010\0". /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgSettingsWrite { pub sender_id: Option, @@ -571,7 +571,7 @@ impl crate::serialize::SbpSerialize for MsgSettingsWrite { /// "solution\0soln_freq\010\0". /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgSettingsWriteResp { pub sender_id: Option, diff --git a/rust/sbp/src/messages/ssr.rs b/rust/sbp/src/messages/ssr.rs index 786a587c6f..9a26d447c7 100644 --- a/rust/sbp/src/messages/ssr.rs +++ b/rust/sbp/src/messages/ssr.rs @@ -27,7 +27,7 @@ use serde::{Deserialize, Serialize}; /// The corrections conform with typical RTCMv3 MT1059 and 1065. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct CodeBiasesContent { /// Signal constellation, band and code @@ -84,7 +84,7 @@ impl crate::serialize::SbpSerialize for CodeBiasesContent { /// Also includes an RLE encoded validity list. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct GridDefinitionHeader { /// region_size (deg) = 10 / region_size_inverse 0 is an invalid value. @@ -163,7 +163,7 @@ impl crate::serialize::SbpSerialize for GridDefinitionHeader { /// stddev) for each satellite at the grid point. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct GridElement { /// Index of the grid point @@ -222,7 +222,7 @@ impl crate::serialize::SbpSerialize for GridElement { /// grid point. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct GridElementNoStd { /// Index of the grid point @@ -285,7 +285,7 @@ impl crate::serialize::SbpSerialize for GridElementNoStd { /// be identified by the index. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct GriddedCorrectionHeader { /// GNSS reference time of the correction @@ -366,7 +366,7 @@ impl crate::serialize::SbpSerialize for GriddedCorrectionHeader { /// an equivalent to the 1059 and 1065 RTCM message types /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgSsrCodeBiases { pub sender_id: Option, @@ -442,7 +442,7 @@ impl crate::serialize::SbpSerialize for MsgSsrCodeBiases { /// It is typically equivalent to the QZSS CLAS Sub Type 9 messages /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgSsrGriddedCorrection { pub sender_id: Option, @@ -502,7 +502,7 @@ impl crate::serialize::SbpSerialize for MsgSsrGriddedCorrection { /// were added. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgSsrGriddedCorrectionNoStd { pub sender_id: Option, @@ -561,7 +561,7 @@ impl crate::serialize::SbpSerialize for MsgSsrGriddedCorrectionNoStd { /// OMA-LPPe-ValidityArea from OMA-TS-LPPe-V2_0-20141202-C /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgSsrGridDefinition { pub sender_id: Option, @@ -625,7 +625,7 @@ impl crate::serialize::SbpSerialize for MsgSsrGridDefinition { /// and 1066 RTCM message types /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgSsrOrbitClock { pub sender_id: Option, @@ -748,7 +748,7 @@ impl crate::serialize::SbpSerialize for MsgSsrOrbitClock { /// and 1066 RTCM message types /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgSsrOrbitClockDepA { pub sender_id: Option, @@ -873,7 +873,7 @@ impl crate::serialize::SbpSerialize for MsgSsrOrbitClockDepA { /// It is typically an equivalent to the 1265 RTCM message types /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgSsrPhaseBiases { pub sender_id: Option, @@ -971,7 +971,7 @@ impl crate::serialize::SbpSerialize for MsgSsrPhaseBiases { /// delay. It is typically equivalent to the QZSS CLAS Sub Type 8 messages /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgSsrStecCorrection { pub sender_id: Option, @@ -1030,7 +1030,7 @@ impl crate::serialize::SbpSerialize for MsgSsrStecCorrection { /// The corrections conform with typical RTCMv3 MT1059 and 1065. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct PhaseBiasesContent { /// Signal constellation, band and code @@ -1104,7 +1104,7 @@ impl crate::serialize::SbpSerialize for PhaseBiasesContent { /// is used to tie multiple SBP messages into a sequence. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct STECHeader { /// GNSS reference time of the correction @@ -1174,7 +1174,7 @@ impl crate::serialize::SbpSerialize for STECHeader { /// at the grid point, /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct STECResidual { /// space vehicle identifier @@ -1232,7 +1232,7 @@ impl crate::serialize::SbpSerialize for STECResidual { /// STEC residual for the given satellite at the grid point. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct STECResidualNoStd { /// space vehicle identifier @@ -1288,7 +1288,7 @@ impl crate::serialize::SbpSerialize for STECResidualNoStd { /// STEC polynomial for the given satellite. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct STECSatElement { /// Unique space vehicle identifier @@ -1351,7 +1351,7 @@ impl crate::serialize::SbpSerialize for STECSatElement { /// point. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct TroposphericDelayCorrection { /// Hydrostatic vertical delay @@ -1412,7 +1412,7 @@ impl crate::serialize::SbpSerialize for TroposphericDelayCorrection { /// Troposphere vertical delays at the grid point. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct TroposphericDelayCorrectionNoStd { /// Hydrostatic vertical delay diff --git a/rust/sbp/src/messages/system.rs b/rust/sbp/src/messages/system.rs index 7fcf98aa71..e5c4eff6fb 100644 --- a/rust/sbp/src/messages/system.rs +++ b/rust/sbp/src/messages/system.rs @@ -27,7 +27,7 @@ use serde::{Deserialize, Serialize}; /// It is intended to be a low rate message for status purposes. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgCsacTelemetry { pub sender_id: Option, @@ -88,7 +88,7 @@ impl crate::serialize::SbpSerialize for MsgCsacTelemetry { /// rate than the MSG_CSAC_TELEMETRY. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgCsacTelemetryLabels { pub sender_id: Option, @@ -149,7 +149,7 @@ impl crate::serialize::SbpSerialize for MsgCsacTelemetryLabels { /// corrections packet. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgDgnssStatus { pub sender_id: Option, @@ -226,7 +226,7 @@ impl crate::serialize::SbpSerialize for MsgDgnssStatus { /// the remaining error flags should be inspected. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgHeartbeat { pub sender_id: Option, @@ -280,7 +280,7 @@ impl crate::serialize::SbpSerialize for MsgHeartbeat { /// and initialization of the inertial navigation system. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgInsStatus { pub sender_id: Option, @@ -336,7 +336,7 @@ impl crate::serialize::SbpSerialize for MsgInsStatus { /// or configuration requests. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgStartup { pub sender_id: Option, diff --git a/rust/sbp/src/messages/tracking.rs b/rust/sbp/src/messages/tracking.rs index 45da0426c4..746b26e927 100644 --- a/rust/sbp/src/messages/tracking.rs +++ b/rust/sbp/src/messages/tracking.rs @@ -29,7 +29,7 @@ use serde::{Deserialize, Serialize}; /// measurements for all tracked satellites. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgMeasurementState { pub sender_id: Option, @@ -83,7 +83,7 @@ impl crate::serialize::SbpSerialize for MsgMeasurementState { /// update interval. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgTrackingIq { pub sender_id: Option, @@ -146,7 +146,7 @@ impl crate::serialize::SbpSerialize for MsgTrackingIq { /// Deprecated. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgTrackingIqDepA { pub sender_id: Option, @@ -210,7 +210,7 @@ impl crate::serialize::SbpSerialize for MsgTrackingIqDepA { /// update interval. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgTrackingIqDepB { pub sender_id: Option, @@ -275,7 +275,7 @@ impl crate::serialize::SbpSerialize for MsgTrackingIqDepB { /// measurements for all tracked satellites. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgTrackingState { pub sender_id: Option, @@ -328,7 +328,7 @@ impl crate::serialize::SbpSerialize for MsgTrackingState { /// Deprecated. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgTrackingStateDepA { pub sender_id: Option, @@ -381,7 +381,7 @@ impl crate::serialize::SbpSerialize for MsgTrackingStateDepA { /// Deprecated. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgTrackingStateDepB { pub sender_id: Option, @@ -434,7 +434,7 @@ impl crate::serialize::SbpSerialize for MsgTrackingStateDepB { /// Deprecated. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgTrackingStateDetailedDep { pub sender_id: Option, @@ -594,7 +594,7 @@ impl crate::serialize::SbpSerialize for MsgTrackingStateDetailedDep { /// single tracking channel useful for debugging issues. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgTrackingStateDetailedDepA { pub sender_id: Option, @@ -757,7 +757,7 @@ impl crate::serialize::SbpSerialize for MsgTrackingStateDetailedDepA { /// the Slot ID (from 1 to 28) /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MeasurementState { /// Measurement Engine GNSS signal being tracked (carries either Glonass FCN @@ -814,7 +814,7 @@ impl crate::serialize::SbpSerialize for MeasurementState { /// Structure containing in-phase and quadrature correlation components. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct TrackingChannelCorrelation { /// In-phase correlation @@ -870,7 +870,7 @@ impl crate::serialize::SbpSerialize for TrackingChannelCorrelation { /// Structure containing in-phase and quadrature correlation components. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct TrackingChannelCorrelationDep { /// In-phase correlation @@ -929,7 +929,7 @@ impl crate::serialize::SbpSerialize for TrackingChannelCorrelationDep { /// measured signal power. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct TrackingChannelState { /// GNSS signal being tracked @@ -990,7 +990,7 @@ impl crate::serialize::SbpSerialize for TrackingChannelState { /// Deprecated. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct TrackingChannelStateDepA { /// Status of tracking channel @@ -1051,7 +1051,7 @@ impl crate::serialize::SbpSerialize for TrackingChannelStateDepA { /// Deprecated. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct TrackingChannelStateDepB { /// Status of tracking channel diff --git a/rust/sbp/src/messages/unknown.rs b/rust/sbp/src/messages/unknown.rs index 0723fbc8fa..beb8f84e2f 100644 --- a/rust/sbp/src/messages/unknown.rs +++ b/rust/sbp/src/messages/unknown.rs @@ -6,7 +6,7 @@ use crate::serialize::SbpSerialize; use serde::{Deserialize, Serialize}; #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct Unknown { pub msg_id: u16, pub sender_id: u16, diff --git a/rust/sbp/src/messages/user.rs b/rust/sbp/src/messages/user.rs index e437fde1e1..d0217ffdbf 100644 --- a/rust/sbp/src/messages/user.rs +++ b/rust/sbp/src/messages/user.rs @@ -27,7 +27,7 @@ use serde::{Deserialize, Serialize}; /// maximum length of 255 bytes per message. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgUserData { pub sender_id: Option, diff --git a/rust/sbp/src/messages/vehicle.rs b/rust/sbp/src/messages/vehicle.rs index 4d8075c165..4a51dbebb1 100644 --- a/rust/sbp/src/messages/vehicle.rs +++ b/rust/sbp/src/messages/vehicle.rs @@ -29,7 +29,7 @@ use serde::{Deserialize, Serialize}; /// source 0 through 3. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgOdometry { pub sender_id: Option, @@ -100,7 +100,7 @@ impl crate::serialize::SbpSerialize for MsgOdometry { /// tick count reached the value given by the contents of this message as accurately as possible. /// #[cfg_attr(feature = "sbp_serde", derive(Serialize, Deserialize))] -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(non_snake_case)] pub struct MsgWheeltick { pub sender_id: Option, diff --git a/rust/sbp/src/parser/mod.rs b/rust/sbp/src/parser/mod.rs index 8b1a76fa5c..8991c21edc 100644 --- a/rust/sbp/src/parser/mod.rs +++ b/rust/sbp/src/parser/mod.rs @@ -141,7 +141,7 @@ impl Parser { if let crate::Error::ParseError = e { // Continue parsing } else { - break Err(e) + break Err(e); } } }