pub struct LocoState {
pub address: u16,
pub is_busy: Option<bool>,
pub stepping: Option<DccThrottleSteps>,
pub speed_percentage: Option<f64>,
pub double_traction: Option<bool>,
pub smart_search: Option<bool>,
pub functions: Option<[bool; 32]>,
}Fields§
§address: u16Address of the locomotive.
is_busy: Option<bool>Idicates if another X-Bus controller (like MultiMaus, or other PC) is controlling the loco.
stepping: Option<DccThrottleSteps>Stepping of throttle
speed_percentage: Option<f64>Speed of the locomotive. Negative values indicate reverse.
double_traction: Option<bool>Is in double traction mode.
smart_search: Option<bool>Is in smart search (?)
functions: Option<[bool; 32]>Functions flag, at index 0 is F0, at index 1 is F1, etc.
Trait Implementations§
Source§impl TryFrom<&XBusMessage> for LocoState
impl TryFrom<&XBusMessage> for LocoState
Auto Trait Implementations§
impl Freeze for LocoState
impl RefUnwindSafe for LocoState
impl Send for LocoState
impl Sync for LocoState
impl Unpin for LocoState
impl UnwindSafe for LocoState
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