[−][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]
impl Subsystem
pub fn new(eps: Box<dyn Clyde3gEps + Send>) -> EpsResult<Self>
[src]
pub fn new(eps: Box<dyn Clyde3gEps + Send>) -> EpsResult<Self>
Create a new subsystem instance for the service to use
pub fn from_path(bus: &str) -> EpsResult<Self>
[src]
pub fn from_path(bus: &str) -> EpsResult<Self>
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]
pub fn get_motherboard_telemetry(&self, telem_type: Type) -> Result<f64, String>
Get the requested telemetry item from the motherboard
pub fn get_daughterboard_telemetry(
&self,
telem_type: Type
) -> Result<f64, String>
[src]
pub fn get_daughterboard_telemetry(
&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]
pub fn get_reset_telemetry(&self, telem_type: Type) -> Result<Data, String>
Get the specific type of reset counts
pub fn get_comms_watchdog_period(&self) -> Result<u8, String>
[src]
pub fn get_comms_watchdog_period(&self) -> Result<u8, String>
Get the current watchdog period setting
pub fn get_version(&self) -> Result<VersionData, String>
[src]
pub fn get_version(&self) -> Result<VersionData, String>
Get the system version information
pub fn get_board_status(&self) -> Result<BoardData, String>
[src]
pub fn get_board_status(&self) -> Result<BoardData, String>
Get the current board status
pub fn get_last_eps_error(&self) -> Result<ErrorData, String>
[src]
pub fn get_last_eps_error(&self) -> Result<ErrorData, String>
Get the last error the EPS encountered
pub fn get_power(&self) -> Result<GetPowerResponse, String>
[src]
pub fn get_power(&self) -> Result<GetPowerResponse, String>
Get the current power state of the EPS
pub fn manual_reset(&self) -> Result<MutationResponse, String>
[src]
pub fn manual_reset(&self) -> Result<MutationResponse, String>
Trigger a manual reset of the EPS
pub fn reset_watchdog(&self) -> Result<MutationResponse, String>
[src]
pub fn reset_watchdog(&self) -> Result<MutationResponse, String>
Kick the I2C watchdog
pub fn set_watchdog_period(
&self,
period: u8
) -> Result<MutationResponse, String>
[src]
pub fn set_watchdog_period(
&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]
pub fn raw_command(
&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]
pub fn test_hardware(&self) -> Result<MutationResponse, String>
Run hardware tests to check system health
pub fn set_last_mutation(&self, mutation: Mutations)
[src]
pub fn set_last_mutation(&self, mutation: Mutations)
Record the last mutation executed by the service
pub fn get_errors(&self) -> EpsResult<Vec<String>>
[src]
pub fn get_errors(&self) -> EpsResult<Vec<String>>
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, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
impl<T> Erased for T
impl<T> Erased for T
impl<T> Same for T
impl<T> Same for T
type Output = T
Should always be Self