pub use acq_sv_profile::AcqSvProfile;
pub use acq_sv_profile_dep::AcqSvProfileDep;
pub use msg_acq_result::MsgAcqResult;
pub use msg_acq_result_dep_a::MsgAcqResultDepA;
pub use msg_acq_result_dep_b::MsgAcqResultDepB;
pub use msg_acq_result_dep_c::MsgAcqResultDepC;
pub use msg_acq_sv_profile::MsgAcqSvProfile;
pub use msg_acq_sv_profile_dep::MsgAcqSvProfileDep;
pub mod acq_sv_profile {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct AcqSvProfile {
#[cfg_attr(feature = "serde", serde(rename = "job_type"))]
pub job_type: u8,
#[cfg_attr(feature = "serde", serde(rename = "status"))]
pub status: u8,
#[cfg_attr(feature = "serde", serde(rename = "cn0"))]
pub cn0: u16,
#[cfg_attr(feature = "serde", serde(rename = "int_time"))]
pub int_time: u8,
#[cfg_attr(feature = "serde", serde(rename = "sid"))]
pub sid: GnssSignal,
#[cfg_attr(feature = "serde", serde(rename = "bin_width"))]
pub bin_width: u16,
#[cfg_attr(feature = "serde", serde(rename = "timestamp"))]
pub timestamp: u32,
#[cfg_attr(feature = "serde", serde(rename = "time_spent"))]
pub time_spent: u32,
#[cfg_attr(feature = "serde", serde(rename = "cf_min"))]
pub cf_min: i32,
#[cfg_attr(feature = "serde", serde(rename = "cf_max"))]
pub cf_max: i32,
#[cfg_attr(feature = "serde", serde(rename = "cf"))]
pub cf: i32,
#[cfg_attr(feature = "serde", serde(rename = "cp"))]
pub cp: u32,
}
impl WireFormat for AcqSvProfile {
const MIN_LEN: usize = <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <GnssSignal as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <u32 as WireFormat>::MIN_LEN
+ <u32 as WireFormat>::MIN_LEN
+ <i32 as WireFormat>::MIN_LEN
+ <i32 as WireFormat>::MIN_LEN
+ <i32 as WireFormat>::MIN_LEN
+ <u32 as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.job_type)
+ WireFormat::len(&self.status)
+ WireFormat::len(&self.cn0)
+ WireFormat::len(&self.int_time)
+ WireFormat::len(&self.sid)
+ WireFormat::len(&self.bin_width)
+ WireFormat::len(&self.timestamp)
+ WireFormat::len(&self.time_spent)
+ WireFormat::len(&self.cf_min)
+ WireFormat::len(&self.cf_max)
+ WireFormat::len(&self.cf)
+ WireFormat::len(&self.cp)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.job_type, buf);
WireFormat::write(&self.status, buf);
WireFormat::write(&self.cn0, buf);
WireFormat::write(&self.int_time, buf);
WireFormat::write(&self.sid, buf);
WireFormat::write(&self.bin_width, buf);
WireFormat::write(&self.timestamp, buf);
WireFormat::write(&self.time_spent, buf);
WireFormat::write(&self.cf_min, buf);
WireFormat::write(&self.cf_max, buf);
WireFormat::write(&self.cf, buf);
WireFormat::write(&self.cp, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
AcqSvProfile {
job_type: WireFormat::parse_unchecked(buf),
status: WireFormat::parse_unchecked(buf),
cn0: WireFormat::parse_unchecked(buf),
int_time: WireFormat::parse_unchecked(buf),
sid: WireFormat::parse_unchecked(buf),
bin_width: WireFormat::parse_unchecked(buf),
timestamp: WireFormat::parse_unchecked(buf),
time_spent: WireFormat::parse_unchecked(buf),
cf_min: WireFormat::parse_unchecked(buf),
cf_max: WireFormat::parse_unchecked(buf),
cf: WireFormat::parse_unchecked(buf),
cp: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod acq_sv_profile_dep {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct AcqSvProfileDep {
#[cfg_attr(feature = "serde", serde(rename = "job_type"))]
pub job_type: u8,
#[cfg_attr(feature = "serde", serde(rename = "status"))]
pub status: u8,
#[cfg_attr(feature = "serde", serde(rename = "cn0"))]
pub cn0: u16,
#[cfg_attr(feature = "serde", serde(rename = "int_time"))]
pub int_time: u8,
#[cfg_attr(feature = "serde", serde(rename = "sid"))]
pub sid: GnssSignalDep,
#[cfg_attr(feature = "serde", serde(rename = "bin_width"))]
pub bin_width: u16,
#[cfg_attr(feature = "serde", serde(rename = "timestamp"))]
pub timestamp: u32,
#[cfg_attr(feature = "serde", serde(rename = "time_spent"))]
pub time_spent: u32,
#[cfg_attr(feature = "serde", serde(rename = "cf_min"))]
pub cf_min: i32,
#[cfg_attr(feature = "serde", serde(rename = "cf_max"))]
pub cf_max: i32,
#[cfg_attr(feature = "serde", serde(rename = "cf"))]
pub cf: i32,
#[cfg_attr(feature = "serde", serde(rename = "cp"))]
pub cp: u32,
}
impl WireFormat for AcqSvProfileDep {
const MIN_LEN: usize = <u8 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN
+ <GnssSignalDep as WireFormat>::MIN_LEN
+ <u16 as WireFormat>::MIN_LEN
+ <u32 as WireFormat>::MIN_LEN
+ <u32 as WireFormat>::MIN_LEN
+ <i32 as WireFormat>::MIN_LEN
+ <i32 as WireFormat>::MIN_LEN
+ <i32 as WireFormat>::MIN_LEN
+ <u32 as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.job_type)
+ WireFormat::len(&self.status)
+ WireFormat::len(&self.cn0)
+ WireFormat::len(&self.int_time)
+ WireFormat::len(&self.sid)
+ WireFormat::len(&self.bin_width)
+ WireFormat::len(&self.timestamp)
+ WireFormat::len(&self.time_spent)
+ WireFormat::len(&self.cf_min)
+ WireFormat::len(&self.cf_max)
+ WireFormat::len(&self.cf)
+ WireFormat::len(&self.cp)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.job_type, buf);
WireFormat::write(&self.status, buf);
WireFormat::write(&self.cn0, buf);
WireFormat::write(&self.int_time, buf);
WireFormat::write(&self.sid, buf);
WireFormat::write(&self.bin_width, buf);
WireFormat::write(&self.timestamp, buf);
WireFormat::write(&self.time_spent, buf);
WireFormat::write(&self.cf_min, buf);
WireFormat::write(&self.cf_max, buf);
WireFormat::write(&self.cf, buf);
WireFormat::write(&self.cp, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
AcqSvProfileDep {
job_type: WireFormat::parse_unchecked(buf),
status: WireFormat::parse_unchecked(buf),
cn0: WireFormat::parse_unchecked(buf),
int_time: WireFormat::parse_unchecked(buf),
sid: WireFormat::parse_unchecked(buf),
bin_width: WireFormat::parse_unchecked(buf),
timestamp: WireFormat::parse_unchecked(buf),
time_spent: WireFormat::parse_unchecked(buf),
cf_min: WireFormat::parse_unchecked(buf),
cf_max: WireFormat::parse_unchecked(buf),
cf: WireFormat::parse_unchecked(buf),
cp: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod msg_acq_result {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct MsgAcqResult {
#[cfg_attr(feature = "serde", serde(skip_serializing, alias = "sender"))]
pub sender_id: Option<u16>,
#[cfg_attr(feature = "serde", serde(rename = "cn0"))]
pub cn0: f32,
#[cfg_attr(feature = "serde", serde(rename = "cp"))]
pub cp: f32,
#[cfg_attr(feature = "serde", serde(rename = "cf"))]
pub cf: f32,
#[cfg_attr(feature = "serde", serde(rename = "sid"))]
pub sid: GnssSignal,
}
impl ConcreteMessage for MsgAcqResult {
const MESSAGE_TYPE: u16 = 47;
const MESSAGE_NAME: &'static str = "MSG_ACQ_RESULT";
}
impl SbpMessage for MsgAcqResult {
fn message_name(&self) -> &'static str {
<Self as ConcreteMessage>::MESSAGE_NAME
}
fn message_type(&self) -> Option<u16> {
Some(<Self as ConcreteMessage>::MESSAGE_TYPE)
}
fn sender_id(&self) -> Option<u16> {
self.sender_id
}
fn set_sender_id(&mut self, new_id: u16) {
self.sender_id = Some(new_id);
}
fn encoded_len(&self) -> usize {
WireFormat::len(self) + crate::HEADER_LEN + crate::CRC_LEN
}
fn is_valid(&self) -> bool {
true
}
fn into_valid_msg(self) -> Result<Self, crate::messages::invalid::Invalid> {
Ok(self)
}
}
impl FriendlyName for MsgAcqResult {
fn friendly_name() -> &'static str {
"ACQ RESULT"
}
}
impl TryFrom<Sbp> for MsgAcqResult {
type Error = TryFromSbpError;
fn try_from(msg: Sbp) -> Result<Self, Self::Error> {
match msg {
Sbp::MsgAcqResult(m) => Ok(m),
_ => Err(TryFromSbpError(msg)),
}
}
}
impl WireFormat for MsgAcqResult {
const MIN_LEN: usize = <f32 as WireFormat>::MIN_LEN
+ <f32 as WireFormat>::MIN_LEN
+ <f32 as WireFormat>::MIN_LEN
+ <GnssSignal as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.cn0)
+ WireFormat::len(&self.cp)
+ WireFormat::len(&self.cf)
+ WireFormat::len(&self.sid)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.cn0, buf);
WireFormat::write(&self.cp, buf);
WireFormat::write(&self.cf, buf);
WireFormat::write(&self.sid, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
MsgAcqResult {
sender_id: None,
cn0: WireFormat::parse_unchecked(buf),
cp: WireFormat::parse_unchecked(buf),
cf: WireFormat::parse_unchecked(buf),
sid: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod msg_acq_result_dep_a {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct MsgAcqResultDepA {
#[cfg_attr(feature = "serde", serde(skip_serializing, alias = "sender"))]
pub sender_id: Option<u16>,
#[cfg_attr(feature = "serde", serde(rename = "snr"))]
pub snr: f32,
#[cfg_attr(feature = "serde", serde(rename = "cp"))]
pub cp: f32,
#[cfg_attr(feature = "serde", serde(rename = "cf"))]
pub cf: f32,
#[cfg_attr(feature = "serde", serde(rename = "prn"))]
pub prn: u8,
}
impl ConcreteMessage for MsgAcqResultDepA {
const MESSAGE_TYPE: u16 = 21;
const MESSAGE_NAME: &'static str = "MSG_ACQ_RESULT_DEP_A";
}
impl SbpMessage for MsgAcqResultDepA {
fn message_name(&self) -> &'static str {
<Self as ConcreteMessage>::MESSAGE_NAME
}
fn message_type(&self) -> Option<u16> {
Some(<Self as ConcreteMessage>::MESSAGE_TYPE)
}
fn sender_id(&self) -> Option<u16> {
self.sender_id
}
fn set_sender_id(&mut self, new_id: u16) {
self.sender_id = Some(new_id);
}
fn encoded_len(&self) -> usize {
WireFormat::len(self) + crate::HEADER_LEN + crate::CRC_LEN
}
fn is_valid(&self) -> bool {
true
}
fn into_valid_msg(self) -> Result<Self, crate::messages::invalid::Invalid> {
Ok(self)
}
}
impl FriendlyName for MsgAcqResultDepA {
fn friendly_name() -> &'static str {
"ACQ RESULT DEP A"
}
}
impl TryFrom<Sbp> for MsgAcqResultDepA {
type Error = TryFromSbpError;
fn try_from(msg: Sbp) -> Result<Self, Self::Error> {
match msg {
Sbp::MsgAcqResultDepA(m) => Ok(m),
_ => Err(TryFromSbpError(msg)),
}
}
}
impl WireFormat for MsgAcqResultDepA {
const MIN_LEN: usize = <f32 as WireFormat>::MIN_LEN
+ <f32 as WireFormat>::MIN_LEN
+ <f32 as WireFormat>::MIN_LEN
+ <u8 as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.snr)
+ WireFormat::len(&self.cp)
+ WireFormat::len(&self.cf)
+ WireFormat::len(&self.prn)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.snr, buf);
WireFormat::write(&self.cp, buf);
WireFormat::write(&self.cf, buf);
WireFormat::write(&self.prn, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
MsgAcqResultDepA {
sender_id: None,
snr: WireFormat::parse_unchecked(buf),
cp: WireFormat::parse_unchecked(buf),
cf: WireFormat::parse_unchecked(buf),
prn: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod msg_acq_result_dep_b {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct MsgAcqResultDepB {
#[cfg_attr(feature = "serde", serde(skip_serializing, alias = "sender"))]
pub sender_id: Option<u16>,
#[cfg_attr(feature = "serde", serde(rename = "snr"))]
pub snr: f32,
#[cfg_attr(feature = "serde", serde(rename = "cp"))]
pub cp: f32,
#[cfg_attr(feature = "serde", serde(rename = "cf"))]
pub cf: f32,
#[cfg_attr(feature = "serde", serde(rename = "sid"))]
pub sid: GnssSignalDep,
}
impl ConcreteMessage for MsgAcqResultDepB {
const MESSAGE_TYPE: u16 = 20;
const MESSAGE_NAME: &'static str = "MSG_ACQ_RESULT_DEP_B";
}
impl SbpMessage for MsgAcqResultDepB {
fn message_name(&self) -> &'static str {
<Self as ConcreteMessage>::MESSAGE_NAME
}
fn message_type(&self) -> Option<u16> {
Some(<Self as ConcreteMessage>::MESSAGE_TYPE)
}
fn sender_id(&self) -> Option<u16> {
self.sender_id
}
fn set_sender_id(&mut self, new_id: u16) {
self.sender_id = Some(new_id);
}
fn encoded_len(&self) -> usize {
WireFormat::len(self) + crate::HEADER_LEN + crate::CRC_LEN
}
fn is_valid(&self) -> bool {
true
}
fn into_valid_msg(self) -> Result<Self, crate::messages::invalid::Invalid> {
Ok(self)
}
}
impl FriendlyName for MsgAcqResultDepB {
fn friendly_name() -> &'static str {
"ACQ RESULT DEP B"
}
}
impl TryFrom<Sbp> for MsgAcqResultDepB {
type Error = TryFromSbpError;
fn try_from(msg: Sbp) -> Result<Self, Self::Error> {
match msg {
Sbp::MsgAcqResultDepB(m) => Ok(m),
_ => Err(TryFromSbpError(msg)),
}
}
}
impl WireFormat for MsgAcqResultDepB {
const MIN_LEN: usize = <f32 as WireFormat>::MIN_LEN
+ <f32 as WireFormat>::MIN_LEN
+ <f32 as WireFormat>::MIN_LEN
+ <GnssSignalDep as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.snr)
+ WireFormat::len(&self.cp)
+ WireFormat::len(&self.cf)
+ WireFormat::len(&self.sid)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.snr, buf);
WireFormat::write(&self.cp, buf);
WireFormat::write(&self.cf, buf);
WireFormat::write(&self.sid, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
MsgAcqResultDepB {
sender_id: None,
snr: WireFormat::parse_unchecked(buf),
cp: WireFormat::parse_unchecked(buf),
cf: WireFormat::parse_unchecked(buf),
sid: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod msg_acq_result_dep_c {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct MsgAcqResultDepC {
#[cfg_attr(feature = "serde", serde(skip_serializing, alias = "sender"))]
pub sender_id: Option<u16>,
#[cfg_attr(feature = "serde", serde(rename = "cn0"))]
pub cn0: f32,
#[cfg_attr(feature = "serde", serde(rename = "cp"))]
pub cp: f32,
#[cfg_attr(feature = "serde", serde(rename = "cf"))]
pub cf: f32,
#[cfg_attr(feature = "serde", serde(rename = "sid"))]
pub sid: GnssSignalDep,
}
impl ConcreteMessage for MsgAcqResultDepC {
const MESSAGE_TYPE: u16 = 31;
const MESSAGE_NAME: &'static str = "MSG_ACQ_RESULT_DEP_C";
}
impl SbpMessage for MsgAcqResultDepC {
fn message_name(&self) -> &'static str {
<Self as ConcreteMessage>::MESSAGE_NAME
}
fn message_type(&self) -> Option<u16> {
Some(<Self as ConcreteMessage>::MESSAGE_TYPE)
}
fn sender_id(&self) -> Option<u16> {
self.sender_id
}
fn set_sender_id(&mut self, new_id: u16) {
self.sender_id = Some(new_id);
}
fn encoded_len(&self) -> usize {
WireFormat::len(self) + crate::HEADER_LEN + crate::CRC_LEN
}
fn is_valid(&self) -> bool {
true
}
fn into_valid_msg(self) -> Result<Self, crate::messages::invalid::Invalid> {
Ok(self)
}
}
impl FriendlyName for MsgAcqResultDepC {
fn friendly_name() -> &'static str {
"ACQ RESULT DEP C"
}
}
impl TryFrom<Sbp> for MsgAcqResultDepC {
type Error = TryFromSbpError;
fn try_from(msg: Sbp) -> Result<Self, Self::Error> {
match msg {
Sbp::MsgAcqResultDepC(m) => Ok(m),
_ => Err(TryFromSbpError(msg)),
}
}
}
impl WireFormat for MsgAcqResultDepC {
const MIN_LEN: usize = <f32 as WireFormat>::MIN_LEN
+ <f32 as WireFormat>::MIN_LEN
+ <f32 as WireFormat>::MIN_LEN
+ <GnssSignalDep as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.cn0)
+ WireFormat::len(&self.cp)
+ WireFormat::len(&self.cf)
+ WireFormat::len(&self.sid)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.cn0, buf);
WireFormat::write(&self.cp, buf);
WireFormat::write(&self.cf, buf);
WireFormat::write(&self.sid, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
MsgAcqResultDepC {
sender_id: None,
cn0: WireFormat::parse_unchecked(buf),
cp: WireFormat::parse_unchecked(buf),
cf: WireFormat::parse_unchecked(buf),
sid: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod msg_acq_sv_profile {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct MsgAcqSvProfile {
#[cfg_attr(feature = "serde", serde(skip_serializing, alias = "sender"))]
pub sender_id: Option<u16>,
#[cfg_attr(feature = "serde", serde(rename = "acq_sv_profile"))]
pub acq_sv_profile: Vec<AcqSvProfile>,
}
impl ConcreteMessage for MsgAcqSvProfile {
const MESSAGE_TYPE: u16 = 46;
const MESSAGE_NAME: &'static str = "MSG_ACQ_SV_PROFILE";
}
impl SbpMessage for MsgAcqSvProfile {
fn message_name(&self) -> &'static str {
<Self as ConcreteMessage>::MESSAGE_NAME
}
fn message_type(&self) -> Option<u16> {
Some(<Self as ConcreteMessage>::MESSAGE_TYPE)
}
fn sender_id(&self) -> Option<u16> {
self.sender_id
}
fn set_sender_id(&mut self, new_id: u16) {
self.sender_id = Some(new_id);
}
fn encoded_len(&self) -> usize {
WireFormat::len(self) + crate::HEADER_LEN + crate::CRC_LEN
}
fn is_valid(&self) -> bool {
true
}
fn into_valid_msg(self) -> Result<Self, crate::messages::invalid::Invalid> {
Ok(self)
}
}
impl FriendlyName for MsgAcqSvProfile {
fn friendly_name() -> &'static str {
"ACQ SV PROFILE"
}
}
impl TryFrom<Sbp> for MsgAcqSvProfile {
type Error = TryFromSbpError;
fn try_from(msg: Sbp) -> Result<Self, Self::Error> {
match msg {
Sbp::MsgAcqSvProfile(m) => Ok(m),
_ => Err(TryFromSbpError(msg)),
}
}
}
impl WireFormat for MsgAcqSvProfile {
const MIN_LEN: usize = <Vec<AcqSvProfile> as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.acq_sv_profile)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.acq_sv_profile, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
MsgAcqSvProfile {
sender_id: None,
acq_sv_profile: WireFormat::parse_unchecked(buf),
}
}
}
}
pub mod msg_acq_sv_profile_dep {
#![allow(unused_imports)]
use super::*;
use crate::messages::gnss::*;
use crate::messages::lib::*;
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Debug, PartialEq, Clone)]
pub struct MsgAcqSvProfileDep {
#[cfg_attr(feature = "serde", serde(skip_serializing, alias = "sender"))]
pub sender_id: Option<u16>,
#[cfg_attr(feature = "serde", serde(rename = "acq_sv_profile"))]
pub acq_sv_profile: Vec<AcqSvProfileDep>,
}
impl ConcreteMessage for MsgAcqSvProfileDep {
const MESSAGE_TYPE: u16 = 30;
const MESSAGE_NAME: &'static str = "MSG_ACQ_SV_PROFILE_DEP";
}
impl SbpMessage for MsgAcqSvProfileDep {
fn message_name(&self) -> &'static str {
<Self as ConcreteMessage>::MESSAGE_NAME
}
fn message_type(&self) -> Option<u16> {
Some(<Self as ConcreteMessage>::MESSAGE_TYPE)
}
fn sender_id(&self) -> Option<u16> {
self.sender_id
}
fn set_sender_id(&mut self, new_id: u16) {
self.sender_id = Some(new_id);
}
fn encoded_len(&self) -> usize {
WireFormat::len(self) + crate::HEADER_LEN + crate::CRC_LEN
}
fn is_valid(&self) -> bool {
true
}
fn into_valid_msg(self) -> Result<Self, crate::messages::invalid::Invalid> {
Ok(self)
}
}
impl FriendlyName for MsgAcqSvProfileDep {
fn friendly_name() -> &'static str {
"ACQ SV PROFILE DEP"
}
}
impl TryFrom<Sbp> for MsgAcqSvProfileDep {
type Error = TryFromSbpError;
fn try_from(msg: Sbp) -> Result<Self, Self::Error> {
match msg {
Sbp::MsgAcqSvProfileDep(m) => Ok(m),
_ => Err(TryFromSbpError(msg)),
}
}
}
impl WireFormat for MsgAcqSvProfileDep {
const MIN_LEN: usize = <Vec<AcqSvProfileDep> as WireFormat>::MIN_LEN;
fn len(&self) -> usize {
WireFormat::len(&self.acq_sv_profile)
}
fn write<B: BufMut>(&self, buf: &mut B) {
WireFormat::write(&self.acq_sv_profile, buf);
}
fn parse_unchecked<B: Buf>(buf: &mut B) -> Self {
MsgAcqSvProfileDep {
sender_id: None,
acq_sv_profile: WireFormat::parse_unchecked(buf),
}
}
}
}