MachineInfo

Struct MachineInfo 

Source
pub struct MachineInfo { /* private fields */ }
Expand description

Reponse for report message

Implementations§

Source§

impl MachineInfo

Source

pub fn from(message: &str) -> Result<MachineInfo, String>

Reads startup line reponse and status

§Examples

Basic usage:

// stores all status messages from this message
let response = MachineInfo::from("<Status:0|State2|...|StateN>");
Source

pub fn is_response(message: &str) -> bool

Source

pub fn machine_state(&self) -> &MachineState

Get a reference to the report response’s machine state.

Source

pub fn set_machine_state(&mut self, machine_state: MachineState)

Source

pub fn global_position(&self) -> Option<&MachinePosition>

Get a reference to the report response’s global position.

Source

pub fn set_global_position(&mut self, global_position: MachinePosition)

Source

pub fn local_position(&self) -> Option<&MachinePosition>

Get a reference to the report response’s local position.

Source

pub fn set_local_position(&mut self, local_position: MachinePosition)

Source

pub fn local_offset(&self) -> Option<&MachinePosition>

Get a reference to the report response’s local offset.

Source

pub fn set_local_offset(&mut self, local_offset: MachinePosition)

Source

pub fn buffer_state(&self) -> Option<&BufferState>

Get a reference to the report response’s buffer state.

Source

pub fn set_buffer_state(&mut self, buffer_state: BufferState)

Source

pub fn line_number(&self) -> Option<i32>

Get a reference to the report response’s line number.

Source

pub fn set_line_number(&mut self, line_number: i32)

Source

pub fn machine_speed(&self) -> Option<&MachineSpeed>

Get a reference to the report response’s machine speed.

Source

pub fn set_machine_speed(&mut self, machine_speed: MachineSpeed)

Source

pub fn machine_signals(&self) -> Option<&Vec<MachineSignal>>

Get a reference to the report response’s machine signals.

Source

pub fn set_machine_signals(&mut self, machine_signals: Vec<MachineSignal>)

Source

pub fn machine_coordinate_system(&self) -> Option<&String>

Get a reference to the report response’s machine coordinate system.

Source

pub fn set_machine_coordinate_system( &mut self, machine_coordinate_system: String, )

Source

pub fn override_values(&self) -> Option<&Overrides>

Get a reference to the report response’s override values.

Source

pub fn set_override_values(&mut self, override_values: Overrides)

Source

pub fn accessory_state(&self) -> Option<&Vec<AccessoryState>>

Get a reference to the report response’s accessory state.

Source

pub fn set_accessory_state(&mut self, accessory_state: Vec<AccessoryState>)

Source

pub fn pendant_control(&self) -> Option<&PendantControl>

Get a reference to the report response’s pendant control.

Source

pub fn set_pendant_control(&mut self, pendant_control: PendantControl)

Source

pub fn homing_state(&self) -> Option<&HomingState>

Get a reference to the report response’s homing state.

Source

pub fn set_homing_state(&mut self, homing_state: HomingState)

Source

pub fn scaled_axes(&self) -> Option<&Vec<Axis>>

Get a reference to the report response’s scaled axis.

Source

pub fn set_scaled_axes(&mut self, scaled_axes: Vec<Axis>)

Source

pub fn tool_length_reference_offset_set(&self) -> Option<bool>

Get a reference to the report response’s tool length reference offset set.

Source

pub fn set_tool_length_reference_offset_set(&mut self, tlros: bool)

Source

pub fn firmware(&self) -> Option<&String>

Get a reference to the report response’s firmware.

Source

pub fn set_firmware(&mut self, firmware: String)

Source

pub fn input_wait_result_succeeded(&self) -> Option<bool>

Get a reference to the report response’s input wait result succeeded.

Source

pub fn set_input_wait_result_succeeded(&mut self, iwrs: bool)

Source

pub fn arc_mode(&self) -> Option<&ArcMode>

Get a reference to the report response’s arc mode.

Source

pub fn set_arc_mode(&mut self, arc_mode: ArcMode)

Trait Implementations§

Source§

impl Clone for MachineInfo

Source§

fn clone(&self) -> MachineInfo

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MachineInfo

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.