Skip to content

Commit

Permalink
Exposed steering state.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidv1992 authored and cikzh committed Oct 2, 2023
1 parent 9464193 commit d300ef9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion statime-linux/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use std::{
path::PathBuf,
pin::{pin, Pin},
str::FromStr,
sync::OnceLock,
};

use clap::Parser;
Expand Down
4 changes: 4 additions & 0 deletions statime/src/port/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,10 @@ impl<L, R, C: Clock, F: Filter> Port<L, R, C, F> {
}

impl<L, R, C, F: Filter> Port<L, R, C, F> {
pub fn is_steering(&self) -> bool {
matches!(self.port_state, PortState::Slave(_))
}

pub(crate) fn state(&self) -> &PortState<F> {
&self.port_state
}
Expand Down

0 comments on commit d300ef9

Please sign in to comment.