1212// Automatically generated from yaml/swiftnav/sbp/acquisition.yaml
1313// with generate.py. Please do not hand edit!
1414//****************************************************************************/
15-
1615//! Satellite acquisition messages from the device.
1716
1817extern crate byteorder;
1918#[ allow( unused_imports) ]
20- use self :: byteorder:: { LittleEndian , ReadBytesExt } ;
19+ use self :: byteorder:: { LittleEndian , ReadBytesExt } ;
2120#[ cfg( feature = "sbp_serde" ) ]
22- use serde:: { Serialize , Deserialize } ;
21+ use serde:: { Deserialize , Serialize } ;
2322
23+ use super :: gnss:: * ;
2424#[ allow( unused_imports) ]
2525use crate :: SbpString ;
26- use super :: gnss:: * ;
27-
2826
2927/// Acq perfomance measurement and debug
3028///
@@ -64,7 +62,7 @@ pub struct AcqSvProfile {
6462
6563impl AcqSvProfile {
6664 pub fn parse ( _buf : & mut & [ u8 ] ) -> Result < AcqSvProfile , crate :: Error > {
67- Ok ( AcqSvProfile {
65+ Ok ( AcqSvProfile {
6866 job_type : _buf. read_u8 ( ) ?,
6967 status : _buf. read_u8 ( ) ?,
7068 cn0 : _buf. read_u16 :: < LittleEndian > ( ) ?,
@@ -77,20 +75,20 @@ impl AcqSvProfile {
7775 cf_max : _buf. read_i32 :: < LittleEndian > ( ) ?,
7876 cf : _buf. read_i32 :: < LittleEndian > ( ) ?,
7977 cp : _buf. read_u32 :: < LittleEndian > ( ) ?,
80- } )
78+ } )
8179 }
8280 pub fn parse_array ( buf : & mut & [ u8 ] ) -> Result < Vec < AcqSvProfile > , crate :: Error > {
8381 let mut v = Vec :: new ( ) ;
8482 while buf. len ( ) > 0 {
85- v. push ( AcqSvProfile :: parse ( buf) ? ) ;
83+ v. push ( AcqSvProfile :: parse ( buf) ?) ;
8684 }
8785 Ok ( v)
8886 }
8987
9088 pub fn parse_array_limit ( buf : & mut & [ u8 ] , n : usize ) -> Result < Vec < AcqSvProfile > , crate :: Error > {
9189 let mut v = Vec :: new ( ) ;
9290 for _ in 0 ..n {
93- v. push ( AcqSvProfile :: parse ( buf) ? ) ;
91+ v. push ( AcqSvProfile :: parse ( buf) ?) ;
9492 }
9593 Ok ( v)
9694 }
@@ -167,7 +165,7 @@ pub struct AcqSvProfileDep {
167165
168166impl AcqSvProfileDep {
169167 pub fn parse ( _buf : & mut & [ u8 ] ) -> Result < AcqSvProfileDep , crate :: Error > {
170- Ok ( AcqSvProfileDep {
168+ Ok ( AcqSvProfileDep {
171169 job_type : _buf. read_u8 ( ) ?,
172170 status : _buf. read_u8 ( ) ?,
173171 cn0 : _buf. read_u16 :: < LittleEndian > ( ) ?,
@@ -180,20 +178,23 @@ impl AcqSvProfileDep {
180178 cf_max : _buf. read_i32 :: < LittleEndian > ( ) ?,
181179 cf : _buf. read_i32 :: < LittleEndian > ( ) ?,
182180 cp : _buf. read_u32 :: < LittleEndian > ( ) ?,
183- } )
181+ } )
184182 }
185183 pub fn parse_array ( buf : & mut & [ u8 ] ) -> Result < Vec < AcqSvProfileDep > , crate :: Error > {
186184 let mut v = Vec :: new ( ) ;
187185 while buf. len ( ) > 0 {
188- v. push ( AcqSvProfileDep :: parse ( buf) ? ) ;
186+ v. push ( AcqSvProfileDep :: parse ( buf) ?) ;
189187 }
190188 Ok ( v)
191189 }
192190
193- pub fn parse_array_limit ( buf : & mut & [ u8 ] , n : usize ) -> Result < Vec < AcqSvProfileDep > , crate :: Error > {
191+ pub fn parse_array_limit (
192+ buf : & mut & [ u8 ] ,
193+ n : usize ,
194+ ) -> Result < Vec < AcqSvProfileDep > , crate :: Error > {
194195 let mut v = Vec :: new ( ) ;
195196 for _ in 0 ..n {
196- v. push ( AcqSvProfileDep :: parse ( buf) ? ) ;
197+ v. push ( AcqSvProfileDep :: parse ( buf) ?) ;
197198 }
198199 Ok ( v)
199200 }
@@ -259,13 +260,13 @@ pub struct MsgAcqResult {
259260
260261impl MsgAcqResult {
261262 pub fn parse ( _buf : & mut & [ u8 ] ) -> Result < MsgAcqResult , crate :: Error > {
262- Ok ( MsgAcqResult {
263+ Ok ( MsgAcqResult {
263264 sender_id : None ,
264265 cn0 : _buf. read_f32 :: < LittleEndian > ( ) ?,
265266 cp : _buf. read_f32 :: < LittleEndian > ( ) ?,
266267 cf : _buf. read_f32 :: < LittleEndian > ( ) ?,
267268 sid : GnssSignal :: parse ( _buf) ?,
268- } )
269+ } )
269270 }
270271}
271272impl super :: SBPMessage for MsgAcqResult {
@@ -329,13 +330,13 @@ pub struct MsgAcqResultDepA {
329330
330331impl MsgAcqResultDepA {
331332 pub fn parse ( _buf : & mut & [ u8 ] ) -> Result < MsgAcqResultDepA , crate :: Error > {
332- Ok ( MsgAcqResultDepA {
333+ Ok ( MsgAcqResultDepA {
333334 sender_id : None ,
334335 snr : _buf. read_f32 :: < LittleEndian > ( ) ?,
335336 cp : _buf. read_f32 :: < LittleEndian > ( ) ?,
336337 cf : _buf. read_f32 :: < LittleEndian > ( ) ?,
337338 prn : _buf. read_u8 ( ) ?,
338- } )
339+ } )
339340 }
340341}
341342impl super :: SBPMessage for MsgAcqResultDepA {
@@ -398,13 +399,13 @@ pub struct MsgAcqResultDepB {
398399
399400impl MsgAcqResultDepB {
400401 pub fn parse ( _buf : & mut & [ u8 ] ) -> Result < MsgAcqResultDepB , crate :: Error > {
401- Ok ( MsgAcqResultDepB {
402+ Ok ( MsgAcqResultDepB {
402403 sender_id : None ,
403404 snr : _buf. read_f32 :: < LittleEndian > ( ) ?,
404405 cp : _buf. read_f32 :: < LittleEndian > ( ) ?,
405406 cf : _buf. read_f32 :: < LittleEndian > ( ) ?,
406407 sid : GnssSignalDep :: parse ( _buf) ?,
407- } )
408+ } )
408409 }
409410}
410411impl super :: SBPMessage for MsgAcqResultDepB {
@@ -466,13 +467,13 @@ pub struct MsgAcqResultDepC {
466467
467468impl MsgAcqResultDepC {
468469 pub fn parse ( _buf : & mut & [ u8 ] ) -> Result < MsgAcqResultDepC , crate :: Error > {
469- Ok ( MsgAcqResultDepC {
470+ Ok ( MsgAcqResultDepC {
470471 sender_id : None ,
471472 cn0 : _buf. read_f32 :: < LittleEndian > ( ) ?,
472473 cp : _buf. read_f32 :: < LittleEndian > ( ) ?,
473474 cf : _buf. read_f32 :: < LittleEndian > ( ) ?,
474475 sid : GnssSignalDep :: parse ( _buf) ?,
475- } )
476+ } )
476477 }
477478}
478479impl super :: SBPMessage for MsgAcqResultDepC {
@@ -529,10 +530,10 @@ pub struct MsgAcqSvProfile {
529530
530531impl MsgAcqSvProfile {
531532 pub fn parse ( _buf : & mut & [ u8 ] ) -> Result < MsgAcqSvProfile , crate :: Error > {
532- Ok ( MsgAcqSvProfile {
533+ Ok ( MsgAcqSvProfile {
533534 sender_id : None ,
534535 acq_sv_profile : AcqSvProfile :: parse_array ( _buf) ?,
535- } )
536+ } )
536537 }
537538}
538539impl super :: SBPMessage for MsgAcqSvProfile {
@@ -582,10 +583,10 @@ pub struct MsgAcqSvProfileDep {
582583
583584impl MsgAcqSvProfileDep {
584585 pub fn parse ( _buf : & mut & [ u8 ] ) -> Result < MsgAcqSvProfileDep , crate :: Error > {
585- Ok ( MsgAcqSvProfileDep {
586+ Ok ( MsgAcqSvProfileDep {
586587 sender_id : None ,
587588 acq_sv_profile : AcqSvProfileDep :: parse_array ( _buf) ?,
588- } )
589+ } )
589590 }
590591}
591592impl super :: SBPMessage for MsgAcqSvProfileDep {
0 commit comments