pub struct Base { /* private fields */ }Expand description
The base machine.
Implementations§
Source§impl Base
impl Base
Sourcepub fn new(min_dur_s: u32, target_accuracy_m: f64) -> Self
pub fn new(min_dur_s: u32, target_accuracy_m: f64) -> Self
An idle machine with the configured survey defaults.
Sourcepub fn active(&self) -> bool
pub fn active(&self) -> bool
True while this receiver acts as a base (its RTCM3 output is forwarded).
Sourcepub fn confirmed(&self) -> bool
pub fn confirmed(&self) -> bool
The receiver confirmed the current command (a running survey-in report, or the fixed-mode acknowledgement).
Sourcepub fn request(&mut self, mode: BaseMode)
pub fn request(&mut self, mode: BaseMode)
Record the configured mode while the receiver port is not open yet.
Nothing is claimed: the state stays off until Base::apply
commands the receiver.
Sourcepub fn apply(
&mut self,
mode: BaseMode,
cap: &Capability,
now: u64,
) -> Result<Option<Vec<u8>>, (&'static str, String)>
pub fn apply( &mut self, mode: BaseMode, cap: &Capability, now: u64, ) -> Result<Option<Vec<u8>>, (&'static str, String)>
Apply a requested mode. Ok(bytes) are to be written to the receiver
(none when it cannot be written and none are needed); Err is the
error code and detail of a refused request, which also leaves the
machine failed.
Sourcepub fn on_valset_ack(&mut self, ok: bool)
pub fn on_valset_ack(&mut self, ok: bool)
ACK-ACK (ok) or ACK-NAK for a CFG-VALSET.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Base
impl RefUnwindSafe for Base
impl Send for Base
impl Sync for Base
impl Unpin for Base
impl UnsafeUnpin for Base
impl UnwindSafe for Base
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more