@@ -608,6 +608,22 @@ pub mod msg_ssr_code_phase_biases_bounds {
608608 pub satellites_signals : Vec < CodePhaseBiasesSatSig > ,
609609 }
610610
611+ impl MsgSsrCodePhaseBiasesBounds {
612+ /// Gets the [ConstId][self::ConstId] stored in the `const_id` bitfield.
613+ ///
614+ /// Returns `Ok` if the bitrange contains a known `ConstId` variant.
615+ /// Otherwise the value of the bitrange is returned as an `Err(u8)`. This may be because of a malformed message,
616+ /// or because new variants of `ConstId` were added.
617+ pub fn const_id ( & self ) -> Result < ConstId , u8 > {
618+ get_bit_range ! ( self . const_id, u8 , u8 , 7 , 0 ) . try_into ( )
619+ }
620+
621+ /// Set the bitrange corresponding to the [ConstId][ConstId] of the `const_id` bitfield.
622+ pub fn set_const_id ( & mut self , const_id : ConstId ) {
623+ set_bit_range ! ( & mut self . const_id, const_id, u8 , u8 , 7 , 0 ) ;
624+ }
625+ }
626+
611627 impl ConcreteMessage for MsgSsrCodePhaseBiasesBounds {
612628 const MESSAGE_TYPE : u16 = 1516 ;
613629 const MESSAGE_NAME : & ' static str = "MSG_SSR_CODE_PHASE_BIASES_BOUNDS" ;
@@ -684,6 +700,40 @@ pub mod msg_ssr_code_phase_biases_bounds {
684700 }
685701 }
686702 }
703+
704+ #[ derive( Debug , Clone , Copy , PartialEq , Eq , Hash ) ]
705+ pub enum ConstId {
706+ /// GPS
707+ Gps = 0 ,
708+
709+ /// BDS
710+ Bds = 3 ,
711+
712+ /// GAL
713+ Gal = 5 ,
714+ }
715+
716+ impl std:: fmt:: Display for ConstId {
717+ fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
718+ match self {
719+ ConstId :: Gps => f. write_str ( "GPS" ) ,
720+ ConstId :: Bds => f. write_str ( "BDS" ) ,
721+ ConstId :: Gal => f. write_str ( "GAL" ) ,
722+ }
723+ }
724+ }
725+
726+ impl TryFrom < u8 > for ConstId {
727+ type Error = u8 ;
728+ fn try_from ( i : u8 ) -> Result < Self , u8 > {
729+ match i {
730+ 0 => Ok ( ConstId :: Gps ) ,
731+ 3 => Ok ( ConstId :: Bds ) ,
732+ 5 => Ok ( ConstId :: Gal ) ,
733+ i => Err ( i) ,
734+ }
735+ }
736+ }
687737}
688738
689739pub mod msg_ssr_gridded_correction {
@@ -1490,6 +1540,22 @@ pub mod msg_ssr_orbit_clock_bounds {
14901540 pub orbit_clock_bounds : Vec < OrbitClockBound > ,
14911541 }
14921542
1543+ impl MsgSsrOrbitClockBounds {
1544+ /// Gets the [ConstId][self::ConstId] stored in the `const_id` bitfield.
1545+ ///
1546+ /// Returns `Ok` if the bitrange contains a known `ConstId` variant.
1547+ /// Otherwise the value of the bitrange is returned as an `Err(u8)`. This may be because of a malformed message,
1548+ /// or because new variants of `ConstId` were added.
1549+ pub fn const_id ( & self ) -> Result < ConstId , u8 > {
1550+ get_bit_range ! ( self . const_id, u8 , u8 , 7 , 0 ) . try_into ( )
1551+ }
1552+
1553+ /// Set the bitrange corresponding to the [ConstId][ConstId] of the `const_id` bitfield.
1554+ pub fn set_const_id ( & mut self , const_id : ConstId ) {
1555+ set_bit_range ! ( & mut self . const_id, const_id, u8 , u8 , 7 , 0 ) ;
1556+ }
1557+ }
1558+
14931559 impl ConcreteMessage for MsgSsrOrbitClockBounds {
14941560 const MESSAGE_TYPE : u16 = 1502 ;
14951561 const MESSAGE_NAME : & ' static str = "MSG_SSR_ORBIT_CLOCK_BOUNDS" ;
@@ -1566,6 +1632,40 @@ pub mod msg_ssr_orbit_clock_bounds {
15661632 }
15671633 }
15681634 }
1635+
1636+ #[ derive( Debug , Clone , Copy , PartialEq , Eq , Hash ) ]
1637+ pub enum ConstId {
1638+ /// GPS
1639+ Gps = 0 ,
1640+
1641+ /// BDS
1642+ Bds = 3 ,
1643+
1644+ /// GAL
1645+ Gal = 5 ,
1646+ }
1647+
1648+ impl std:: fmt:: Display for ConstId {
1649+ fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
1650+ match self {
1651+ ConstId :: Gps => f. write_str ( "GPS" ) ,
1652+ ConstId :: Bds => f. write_str ( "BDS" ) ,
1653+ ConstId :: Gal => f. write_str ( "GAL" ) ,
1654+ }
1655+ }
1656+ }
1657+
1658+ impl TryFrom < u8 > for ConstId {
1659+ type Error = u8 ;
1660+ fn try_from ( i : u8 ) -> Result < Self , u8 > {
1661+ match i {
1662+ 0 => Ok ( ConstId :: Gps ) ,
1663+ 3 => Ok ( ConstId :: Bds ) ,
1664+ 5 => Ok ( ConstId :: Gal ) ,
1665+ i => Err ( i) ,
1666+ }
1667+ }
1668+ }
15691669}
15701670
15711671pub mod msg_ssr_orbit_clock_bounds_degradation {
@@ -1601,6 +1701,22 @@ pub mod msg_ssr_orbit_clock_bounds_degradation {
16011701 pub orbit_clock_bounds_degradation : OrbitClockBoundDegradation ,
16021702 }
16031703
1704+ impl MsgSsrOrbitClockBoundsDegradation {
1705+ /// Gets the [ConstId][self::ConstId] stored in the `const_id` bitfield.
1706+ ///
1707+ /// Returns `Ok` if the bitrange contains a known `ConstId` variant.
1708+ /// Otherwise the value of the bitrange is returned as an `Err(u8)`. This may be because of a malformed message,
1709+ /// or because new variants of `ConstId` were added.
1710+ pub fn const_id ( & self ) -> Result < ConstId , u8 > {
1711+ get_bit_range ! ( self . const_id, u8 , u8 , 7 , 0 ) . try_into ( )
1712+ }
1713+
1714+ /// Set the bitrange corresponding to the [ConstId][ConstId] of the `const_id` bitfield.
1715+ pub fn set_const_id ( & mut self , const_id : ConstId ) {
1716+ set_bit_range ! ( & mut self . const_id, const_id, u8 , u8 , 7 , 0 ) ;
1717+ }
1718+ }
1719+
16041720 impl ConcreteMessage for MsgSsrOrbitClockBoundsDegradation {
16051721 const MESSAGE_TYPE : u16 = 1503 ;
16061722 const MESSAGE_NAME : & ' static str = "MSG_SSR_ORBIT_CLOCK_BOUNDS_DEGRADATION" ;
@@ -1677,6 +1793,40 @@ pub mod msg_ssr_orbit_clock_bounds_degradation {
16771793 }
16781794 }
16791795 }
1796+
1797+ #[ derive( Debug , Clone , Copy , PartialEq , Eq , Hash ) ]
1798+ pub enum ConstId {
1799+ /// GPS
1800+ Gps = 0 ,
1801+
1802+ /// BDS
1803+ Bds = 3 ,
1804+
1805+ /// GAL
1806+ Gal = 5 ,
1807+ }
1808+
1809+ impl std:: fmt:: Display for ConstId {
1810+ fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
1811+ match self {
1812+ ConstId :: Gps => f. write_str ( "GPS" ) ,
1813+ ConstId :: Bds => f. write_str ( "BDS" ) ,
1814+ ConstId :: Gal => f. write_str ( "GAL" ) ,
1815+ }
1816+ }
1817+ }
1818+
1819+ impl TryFrom < u8 > for ConstId {
1820+ type Error = u8 ;
1821+ fn try_from ( i : u8 ) -> Result < Self , u8 > {
1822+ match i {
1823+ 0 => Ok ( ConstId :: Gps ) ,
1824+ 3 => Ok ( ConstId :: Bds ) ,
1825+ 5 => Ok ( ConstId :: Gal ) ,
1826+ i => Err ( i) ,
1827+ }
1828+ }
1829+ }
16801830}
16811831
16821832pub mod msg_ssr_orbit_clock_dep_a {
0 commit comments