pub struct Subsystem {
    pub eps: Arc<Mutex<Box<dyn Clyde3gEps + Send>>>,
    pub last_mutation: Arc<RwLock<Mutations>>,
    pub errors: Arc<RwLock<Vec<String>>>,
    pub watchdog_handle: Arc<Mutex<JoinHandle<()>>>,
    pub checksum: Arc<Mutex<Checksum>>,
}
Expand description

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

Implementations

Create a new subsystem instance for the service to use

Create the underlying EPS object and then create a new subsystem which will use it

Get the requested telemetry item from the motherboard

Get the requested telemetry item from the daughterboard

Get the specific type of reset counts

Get the current watchdog period setting

Get the system version information

Get the current board status

Get the last error the EPS encountered

Get the current power state of the EPS

Trigger a manual reset of the EPS

Kick the I2C watchdog

Set the I2C watchdog timeout period

Pass raw command values through to the EPS

Run hardware tests to check system health

Record the last mutation executed by the service

Fetch all errors since the last time this function was called, then clear the errors storage

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.