[−][src]Struct clyde_3g_eps_service::models::subsystem::Subsystem
Main structure for controlling and accessing system resources
Fields
eps: Arc<Mutex<Box<dyn Clyde3gEps + Send>>>
Underlying EPS object
last_mutation: Arc<RwLock<Mutations>>
Last mutation executed
errors: Arc<RwLock<Vec<String>>>
Errors accumulated over all queries and mutations
watchdog_handle: Arc<Mutex<JoinHandle<()>>>
Watchdog kicking thread handle
checksum: Arc<Mutex<Checksum>>
Last known checksum of EPS ROM
Methods
impl Subsystem
[src]
pub fn new(eps: Box<dyn Clyde3gEps + Send>) -> EpsResult<Self>
[src]
Create a new subsystem instance for the service to use
pub fn from_path(bus: &str) -> EpsResult<Self>
[src]
Create the underlying EPS object and then create a new subsystem which will use it
pub fn get_motherboard_telemetry(&self, telem_type: Type) -> Result<f64, String>
[src]
Get the requested telemetry item from the motherboard
pub fn get_daughterboard_telemetry(
&self,
telem_type: Type
) -> Result<f64, String>
[src]
&self,
telem_type: Type
) -> Result<f64, String>
Get the requested telemetry item from the daughterboard
pub fn get_reset_telemetry(&self, telem_type: Type) -> Result<Data, String>
[src]
Get the specific type of reset counts
pub fn get_comms_watchdog_period(&self) -> Result<u8, String>
[src]
Get the current watchdog period setting
pub fn get_version(&self) -> Result<VersionData, String>
[src]
Get the system version information
pub fn get_board_status(&self) -> Result<BoardData, String>
[src]
Get the current board status
pub fn get_last_eps_error(&self) -> Result<ErrorData, String>
[src]
Get the last error the EPS encountered
pub fn get_power(&self) -> Result<GetPowerResponse, String>
[src]
Get the current power state of the EPS
pub fn manual_reset(&self) -> Result<MutationResponse, String>
[src]
Trigger a manual reset of the EPS
pub fn reset_watchdog(&self) -> Result<MutationResponse, String>
[src]
Kick the I2C watchdog
pub fn set_watchdog_period(
&self,
period: u8
) -> Result<MutationResponse, String>
[src]
&self,
period: u8
) -> Result<MutationResponse, String>
Set the I2C watchdog timeout period
pub fn raw_command(
&self,
command: u8,
data: Vec<u8>
) -> Result<MutationResponse, String>
[src]
&self,
command: u8,
data: Vec<u8>
) -> Result<MutationResponse, String>
Pass raw command values through to the EPS
pub fn test_hardware(&self) -> Result<MutationResponse, String>
[src]
Run hardware tests to check system health
pub fn set_last_mutation(&self, mutation: Mutations)
[src]
Record the last mutation executed by the service
pub fn get_errors(&self) -> EpsResult<Vec<String>>
[src]
Fetch all errors since the last time this function was called, then clear the errors storage
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<T> Same<T> for T
type Output = T
Should always be Self