pub struct BusController {
pub bus: Bus,
pub response_timeout: Duration,
/* private fields */
}Expand description
Bus Controller state and management
Fields§
§bus: BusBus identifier
response_timeout: DurationExpected response timeout
Implementations§
Source§impl BusController
impl BusController
Sourcepub fn register_rt(&mut self, address: Address) -> Result<()>
pub fn register_rt(&mut self, address: Address) -> Result<()>
Register a Remote Terminal
Sourcepub fn register_rts(&mut self, addresses: &[u8]) -> Result<()>
pub fn register_rts(&mut self, addresses: &[u8]) -> Result<()>
Register multiple Remote Terminals
Sourcepub fn get_rt(&self, address: Address) -> Option<&RemoteTerminal>
pub fn get_rt(&self, address: Address) -> Option<&RemoteTerminal>
Get Remote Terminal info
Sourcepub fn get_rt_mut(&mut self, address: Address) -> Option<&mut RemoteTerminal>
pub fn get_rt_mut(&mut self, address: Address) -> Option<&mut RemoteTerminal>
Get mutable Remote Terminal info
Sourcepub fn list_rts(&self) -> Vec<&RemoteTerminal>
pub fn list_rts(&self) -> Vec<&RemoteTerminal>
List all registered Remote Terminals
Sourcepub fn get_responding_rts(&self) -> Vec<&RemoteTerminal>
pub fn get_responding_rts(&self) -> Vec<&RemoteTerminal>
Get all responding Remote Terminals
Sourcepub fn record_rt_success(&mut self, address: Address) -> Result<()>
pub fn record_rt_success(&mut self, address: Address) -> Result<()>
Record a successful transaction with an RT
Sourcepub fn record_rt_error(&mut self, address: Address) -> Result<()>
pub fn record_rt_error(&mut self, address: Address) -> Result<()>
Record a failed transaction with an RT
Sourcepub fn get_rt_stats(&self, address: Address) -> Option<RTStats>
pub fn get_rt_stats(&self, address: Address) -> Option<RTStats>
Get statistics for a Remote Terminal
Sourcepub fn get_all_stats(&self) -> Vec<RTStats>
pub fn get_all_stats(&self) -> Vec<RTStats>
Get statistics for all Remote Terminals
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BusController
impl RefUnwindSafe for BusController
impl Send for BusController
impl Sync for BusController
impl Unpin for BusController
impl UnwindSafe for BusController
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